Skip to content

Use flit for packaging #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish to PyPI

on:
release:
types: [released, prereleased]
types: [published]

jobs:
build_and_publish:
Expand All @@ -11,22 +11,23 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python 3.8
uses: actions/setup-python@v4
- uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel

python -m pip install "flit>=3.8.0"
flit install --symlink
- name: Build
run: python setup.py sdist bdist_wheel
run: flit build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: '__token__'
password: ${{ secrets.PYPI_API_TOKEN }}
- name: 🚀 Publish to live PyPI
env:
FLIT_USERNAME: '__token__'
FLIT_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
FLIT_INDEX_URL: https://upload.pypi.org/legacy/
run: flit publish
27 changes: 0 additions & 27 deletions LICENCE.txt

This file was deleted.

29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD License

Copyright (c) 2019-present Torchbox Ltd and individual contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
9 changes: 0 additions & 9 deletions MANIFEST.in

This file was deleted.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ Wagtail >= 4.1

### Installation

Install using pip

```bash
pip install wagtail_grapple
python -m pip install wagtail_grapple
```

Add the following to the `INSTALLED_APPS` list in your Wagtail settings file:
Expand Down
73 changes: 73 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "wagtail-grapple"
authors = [
{name = "Nathan Horrigan", email = "[email protected]"}
]
maintainers = [
{name = "Dan Braghis", email = "[email protected]"}
]
description = "A Wagtail package that speeds up and simplifies implementing a GraphQL endpoint!"
readme = "README.md"
license = {file = "LICENSE"}
keywords = ["wagtail", "django", "graphql", "graphene", "api"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Framework :: Wagtail",
"Framework :: Wagtail :: 4",
"Framework :: Wagtail :: 5",
]
dynamic = ["version"]
requires-python = ">=3.8"
dependencies = [
"Wagtail>=4.1",
"graphene-django>=3,<4",
"wagtail-headless-preview"
]

[project.optional-dependencies]
channels = [
"Django>=3.2,<4.0",
"channels>=3.0,<3.1",
"channels_redis==3.3.0",
"graphql-ws>=0.4.4,<0.5"
]

[project.urls]
Changelog = "https://github.com/torchbox/wagtail-grapple/blob/main/CHANGELOG.md"
Documentation = "https://wagtail-grapple.readthedocs.io/en/latest/"

[tool.flit.module]
name = "grapple"

[tool.flit.sdist]
include = ["LICENSE"]
exclude = [
"docs/",
"tests/",
"CHANGELOG.md",
"Dockerfile",
"Makefile",
".*",
"*.json",
"*.ini",
"*.yml",
"*.yaml",
"ruff.toml",
]

[tool.doc8]
ignore = ["D000", "D001"]
ignore_path = ["docs/build", "src", "tests", ".git", ".tox", ".venv", "venv"]
57 changes: 0 additions & 57 deletions setup.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions setup.py

This file was deleted.