Skip to content

Commit

Permalink
Migrate to PEP 517 build system (#746)
Browse files Browse the repository at this point in the history
- all remaining setuptools configuration is moved from setup.py to setup.cfg
- description is now checked with twine rather than `setup.py check`

Split from #734, including suggestions from @webknjaz

Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
  • Loading branch information
Nothing4You and webknjaz committed Mar 25, 2022
1 parent c8a4334 commit 42532c8
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 29 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -83,13 +83,17 @@ jobs:
run: |
python -m pip install --upgrade --requirement requirements-dev.txt
- name: Install aiomysql
- name: Build distribution packages
run: |
python -m pip install .
python -m build
- name: Check package description
run: |
python -m twine check --strict dist/*
- name: Check rst
- name: Install aiomysql
run: |
python setup.py check --restructuredtext
python -m pip install .
# this ensures our database is ready. typically by the time the preparations have completed its first start logic.
# unfortunately we need this hacky workaround as GitHub Actions service containers can't reference data from our repo.
Expand Down
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -23,6 +23,7 @@ To be included in 1.0.0 (unreleased)
* Fix error packet handling for SSCursor #428
* Required python version is now properly documented in python_requires instead of failing on setup.py execution #731
* Add rsa extras_require depending on PyMySQL[rsa] #557
* Migrate to PEP 517 build system #746


0.0.22 (2021-11-14)
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
@@ -0,0 +1,6 @@
[build-system]
requires = [
# Essentials
"setuptools >= 42",
]
build-backend = "setuptools.build_meta"
10 changes: 10 additions & 0 deletions setup.cfg
@@ -1,5 +1,6 @@
[metadata]
name = aiomysql
version = attr: aiomysql.__version__
url = https://github.com/aio-libs/aiomysql
download_url = https://pypi.python.org/pypi/aiomysql
project_urls =
Expand All @@ -9,6 +10,8 @@ project_urls =
GitHub: issues = https://github.com/aio-libs/aiomysql/issues
GitHub: discussions = https://github.com/aio-libs/aiomysql/discussions
description = MySQL driver for asyncio.
long_description = file: README.rst, CHANGES.txt
long_description_content_type = text/x-rst
author = Nikolay Novik
author_email = nickolainovik@gmail.com
classifiers =
Expand Down Expand Up @@ -38,6 +41,8 @@ platforms =
python_requires = >=3.7
include_package_data = True

packages = find:

# runtime requirements
install_requires =
PyMySQL>=1.0
Expand All @@ -47,3 +52,8 @@ sa =
sqlalchemy>=1.0,<1.4
rsa =
PyMySQL[rsa]>=1.0

[options.packages.find]
exclude =
tests
tests.*
25 changes: 0 additions & 25 deletions setup.py

This file was deleted.

0 comments on commit 42532c8

Please sign in to comment.