Skip to content

Commit 8b433bf

Browse files
authored
Update build system - PEP 517 (#161)
1 parent 0b0c13e commit 8b433bf

5 files changed

Lines changed: 18 additions & 34 deletions

File tree

.github/workflows/release.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,10 @@ jobs:
2020
uses: actions/[email protected]
2121
with:
2222
python-version: ${{ env.DEFAULT_PYTHON }}
23-
- name: Install requirements
24-
run: |
25-
python -m pip install -U pip twine wheel
26-
python -m pip install -U "setuptools>=57.1.0"
2723
- name: Build distributions
2824
run: |
29-
python setup.py sdist bdist_wheel
25+
python -m pip install -U pip twine build wheel
26+
python -m build
3027
- name: Upload to PyPI
3128
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
3229
env:

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
[build-system]
2+
requires = ["setuptools~=60.5", "wheel~=0.37.1"]
3+
build-backend = "setuptools.build_meta"
4+
15
[tool.pytest.ini_options]
26
asyncio_mode = "auto" # https://github.com/pytest-dev/pytest-asyncio#modes

python_typing_update/const.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@
66
from enum import Flag, auto
77
from typing import NamedTuple
88

9-
version = (0, 3, 6)
10-
dev_version = 1 # Set to `None` for release
11-
12-
version_str = '.'.join(map(str, version))
13-
if dev_version is not None:
14-
version_str += f'.dev{dev_version}'
15-
169

1710
class FileAttributes(NamedTuple):
1811
status: FileStatus

setup.cfg

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[metadata]
22
name = python-typing-update
3+
# Version template: x.x.x[.dev1]
4+
version = 0.3.6.dev1
35
author = Marc Mueller
46
description = Update Python typing syntax
57
long_description = file:README.md
@@ -21,6 +23,16 @@ classifier =
2123
packages = find:
2224
python_requires = >=3.8,<3.10
2325
include_package_data = True
26+
install_requires =
27+
aiofiles==0.8.0
28+
autoflake==1.4
29+
isort==5.10.1
30+
pyupgrade==2.32.0
31+
reorder-python-imports==3.0.1
32+
33+
[options.extras_require]
34+
black =
35+
black==22.3.0
2436

2537
[options.package_data]
2638
* = py.typed, *.pyi

setup.py

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

0 commit comments

Comments
 (0)