Skip to content

Commit 713e68a

Browse files
committed
Switch to using flit for building the package
1 parent 0626f14 commit 713e68a

File tree

8 files changed

+119
-111
lines changed

8 files changed

+119
-111
lines changed

.github/workflows/publish.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Publish to PyPI
22

33
on:
44
release:
5-
types: [released, prereleased]
5+
types: [published]
66

77
jobs:
88
build_and_publish:
@@ -11,22 +11,23 @@ jobs:
1111
- uses: actions/checkout@v3
1212
with:
1313
fetch-depth: 0
14-
15-
- name: Set up Python 3.8
16-
uses: actions/setup-python@v4
14+
- uses: actions/setup-python@v4
1715
with:
18-
python-version: '3.8'
16+
python-version: '3.11'
17+
cache: 'pip'
18+
cache-dependency-path: '**/pyproject.toml'
1919

2020
- name: Install dependencies
2121
run: |
2222
python -m pip install --upgrade pip
23-
pip install wheel
24-
23+
python -m pip install "flit>=3.8.0"
24+
flit install --symlink
2525
- name: Build
26-
run: python setup.py sdist bdist_wheel
26+
run: flit build
2727

28-
- name: Publish to PyPI
29-
uses: pypa/gh-action-pypi-publish@release/v1
30-
with:
31-
user: '__token__'
32-
password: ${{ secrets.PYPI_API_TOKEN }}
28+
- name: 🚀 Publish to live PyPI
29+
env:
30+
FLIT_USERNAME: '__token__'
31+
FLIT_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
32+
FLIT_INDEX_URL: https://upload.pypi.org/legacy/
33+
run: flit publish

LICENCE.txt

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

LICENSE

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD License
2+
3+
Copyright (c) 2019-present Torchbox Ltd and individual contributors.
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without modification,
7+
are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice, this
13+
list of conditions and the following disclaimer in the documentation and/or
14+
other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from this
18+
software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
24+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
27+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
28+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29+
OF THE POSSIBILITY OF SUCH DAMAGE.

MANIFEST.in

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

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ Wagtail >= 4.1
7171

7272
### Installation
7373

74+
Install using pip
75+
7476
```bash
75-
pip install wagtail_grapple
77+
python -m pip install wagtail_grapple
7678
```
7779

7880
Add the following to the `INSTALLED_APPS` list in your Wagtail settings file:

pyproject.toml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
[build-system]
2+
requires = ["flit_core >=3.2,<4"]
3+
build-backend = "flit_core.buildapi"
4+
5+
[project]
6+
name = "wagtail-grapple"
7+
authors = [
8+
{name = "Nathan Horrigan", email = "[email protected]"}
9+
]
10+
maintainers = [
11+
{name = "Dan Braghis", email = "[email protected]"}
12+
]
13+
description = "A Wagtail package that speeds up and simplifies implementing a GraphQL endpoint!"
14+
readme = "README.md"
15+
license = {file = "LICENSE"}
16+
keywords = ["wagtail", "django", "graphql", "graphene", "api"]
17+
classifiers = [
18+
"Development Status :: 4 - Beta",
19+
"Intended Audience :: Developers",
20+
"License :: OSI Approved :: BSD License",
21+
"Operating System :: OS Independent",
22+
"Programming Language :: Python",
23+
"Programming Language :: Python :: 3",
24+
"Programming Language :: Python :: 3.8",
25+
"Programming Language :: Python :: 3.9",
26+
"Programming Language :: Python :: 3.10",
27+
"Programming Language :: Python :: 3.11",
28+
"Framework :: Wagtail",
29+
"Framework :: Wagtail :: 4",
30+
"Framework :: Wagtail :: 5",
31+
]
32+
dynamic = ["version"]
33+
requires-python = ">=3.8"
34+
dependencies = [
35+
"Wagtail>=4.1",
36+
"graphene-django>=3,<4",
37+
"wagtail-headless-preview"
38+
]
39+
40+
[project.optional-dependencies]
41+
channels = [
42+
"Django>=3.2,<4.0",
43+
"channels>=3.0,<3.1",
44+
"channels_redis==3.3.0",
45+
"graphql-ws>=0.4.4,<0.5"
46+
]
47+
48+
[project.urls]
49+
Changelog = "https://github.com/torchbox/wagtail-grapple/blob/main/CHANGELOG.md"
50+
Documentation = "https://wagtail-grapple.readthedocs.io/en/latest/"
51+
52+
[tool.flit.module]
53+
name = "grapple"
54+
55+
[tool.flit.sdist]
56+
include = ["LICENSE"]
57+
exclude = [
58+
"docs/",
59+
"tests/",
60+
"CHANGELOG.md",
61+
"Dockerfile",
62+
"Makefile",
63+
".*",
64+
"*.json",
65+
"*.ini",
66+
"*.yml",
67+
"*.yaml",
68+
"ruff.toml",
69+
]
70+
71+
[tool.doc8]
72+
ignore = ["D000", "D001"]
73+
ignore_path = ["docs/build", "src", "tests", ".git", ".tox", ".venv", "venv"]

setup.cfg

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

setup.py

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

0 commit comments

Comments
 (0)