Skip to content

Commit 69977a1

Browse files
committed
better package build
1 parent c7bb570 commit 69977a1

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,11 @@ jobs:
116116
python-version: '3.x'
117117
- name: Install dependencies
118118
run: |
119-
python -m pip install --upgrade pip wheel setuptools_scm
120-
pip install --upgrade -r CI_REQUIREMENTS.txt
121-
pip install --upgrade twine
119+
python -m pip install --upgrade pip
120+
pip install --upgrade twine build
122121
- name: Build package
123122
run: |
124-
python setup.py sdist bdist_wheel clean
123+
python -m build
125124
- name: Deploy
126125
env:
127126
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ exclude .gitignore .dockerignore
99
prune test
1010
prune .github
1111
prune .azure_pipelines
12+
prune .tox
1213
prune doc
1314
exclude CODEOWNERS CODE_OF_CONDUCT.md _config.yml

pyproject.toml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# PEP 508 specifications for PEP 518.
44
requires = [
55
"setuptools>=45", # PSF/ZPL
6-
"wheel",
76
"setuptools_scm[toml]>=6.2",
87
]
98
build-backend="setuptools.build_meta"
@@ -24,9 +23,21 @@ maintainers=[
2423
]
2524
dynamic = ["version", "classifiers", "dependencies"]
2625

27-
[tool.setuptools]
28-
packages= ["exec_helpers", "exec_helpers.async_api"]
29-
package-data={"exec_helpers"=["py.typed"], "*"=["*.pyi"]}
26+
[tool.setuptools.package-data]
27+
exec_helpers=[
28+
"py.typed",
29+
"*.pyi",
30+
"*/*.pyi"
31+
]
32+
33+
[tool.setuptools.packages.find]
34+
exclude = [
35+
"doc",
36+
"test",
37+
".*"
38+
]
39+
include = ["exec_helpers"]
40+
namespaces = false
3041

3142
[tool.setuptools.dynamic]
3243
dependencies = {file = ["requirements.txt"]}
@@ -39,8 +50,8 @@ yaml = ["PyYAML>=3.12"]
3950
all_formats = ["defusedxml", "lxml>=4.6.2", "PyYAML>=3.12"]
4051
all-formats = ["defusedxml", "lxml>=4.6.2", "PyYAML>=3.12"]
4152

42-
[tool.bdist_wheel]
43-
universal = false
53+
[tool.distutils.bdist_wheel]
54+
universal = 0
4455

4556
[tool.black]
4657
line-length = 120

0 commit comments

Comments
 (0)