Skip to content

Commit d21402a

Browse files
authored
Switch to using flit for package build (#54)
1 parent 15ba70f commit d21402a

File tree

5 files changed

+83
-66
lines changed

5 files changed

+83
-66
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ jobs:
2121
- uses: actions/setup-python@v4
2222
with:
2323
python-version: ${{env.PYTHON_LATEST}}
24+
cache: "pip"
25+
cache-dependency-path: "pyproject.toml"
2426

2527
- name: ⬇️ Install dependencies
2628
run: |
27-
python -Im pip install --upgrade pip
28-
python -Im pip install wheel
29+
python -Im pip install flit
30+
python -Im flit install --symlink
2931
3032
- name: 🏗️ Build
31-
run: python setup.py sdist bdist_wheel
33+
run: python -Im flit build
3234

3335
- uses: actions/upload-artifact@v3
3436
with:

.github/workflows/test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ jobs:
5151
python-version: ${{ matrix.python }}
5252
- name: 📦 Install dependencies
5353
run: |
54-
python -Im pip install tox tox-gh-actions wheel
54+
python -Im pip install tox tox-gh-actions flit
55+
python -Im flit install --symlink
5556
5657
- name: 🏗️ Build wheel
57-
run: python setup.py bdist_wheel
58+
run: python -Im flit build --format wheel
5859

5960
- name: 🧪 Run tox targets for Python ${{ matrix.python-version }}
6061
run: tox --installpkg ./dist/*.whl

pyproject.toml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,78 @@
1+
[project]
2+
name = "wagtail-footnotes"
3+
description = "Add footnotes to rich text in your Wagtail pages"
4+
authors = [{name = "Cameron Lamb ", email = "[email protected]"}]
5+
maintainers = [
6+
{name = "Kevin Howbrook", email="[email protected]"},
7+
{name = "Dan Braghis", email="[email protected]"}
8+
]
9+
readme = "README.md"
10+
license = {file = "LICENSE"}
11+
keywords = ["Wagtail", "Django", "footnotes", "rich text"]
12+
classifiers = [
13+
"Development Status :: 4 - Beta",
14+
"Environment :: Web Environment",
15+
"Intended Audience :: Developers",
16+
"Operating System :: OS Independent",
17+
"License :: OSI Approved :: MIT License",
18+
"Programming Language :: Python",
19+
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3.8",
21+
"Programming Language :: Python :: 3.9",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Framework :: Django",
25+
"Framework :: Django :: 3",
26+
"Framework :: Django :: 3.2",
27+
"Framework :: Django :: 4",
28+
"Framework :: Django :: 4.1",
29+
"Framework :: Django :: 4.2",
30+
"Framework :: Wagtail",
31+
"Framework :: Wagtail :: 4",
32+
"Framework :: Wagtail :: 5",
33+
]
34+
35+
dynamic = ["version"] # will read __version__ from wagtail_footnotes/__init__.py
36+
requires-python = ">=3.8"
37+
dependencies = [
38+
"Wagtail>=4.1",
39+
"Django>=3.2",
40+
]
41+
42+
[project.optional-dependencies]
43+
testing = [
44+
"pre-commit>=3.3.0,<4",
45+
"tox>=4.6.4,<5",
46+
"black==23.7.0",
47+
"ruff==0.0.280",
48+
"coverage[toml]>=7.2,<8.0",
49+
]
50+
51+
[project.urls]
52+
Repository = "https://github.com/torchbox/wagtail-footnotes"
53+
Changelog = "https://github.com/torchbox/wagtail-footnotes/blob/main/CHANGELOG.md"
54+
55+
56+
[build-system]
57+
requires = ["flit_core >=3.2,<4"]
58+
build-backend = "flit_core.buildapi"
59+
60+
[tool.flit.module]
61+
name = "wagtail_footnotes"
62+
63+
[tool.flit.sdist]
64+
exclude = [
65+
"tests",
66+
"Makefile",
67+
"docs",
68+
".*",
69+
"*.json",
70+
"*.ini",
71+
"*.yml",
72+
"CHANGELOG.md",
73+
"testmanage.py",
74+
]
75+
176
[tool.black]
277
line_length = 88
378
target-version = ["py38"]

setup.py

Lines changed: 0 additions & 60 deletions
This file was deleted.

tox.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ pass_env =
2424

2525
deps =
2626
coverage[toml]>=7.2,<8.0
27-
tblib>=2.0,<3.0
2827

2928
django3.2: Django>=3.2,<4.0
3029
django4.1: Django>=4.1,<4.2

0 commit comments

Comments
 (0)