Skip to content

Commit 51cc995

Browse files
authored
Merge pull request #89 from dhellmann/fix-publish-workflow
fix action-based package publishing
2 parents dfb573a + 4052c58 commit 51cc995

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.github/workflows/python-publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
- name: Install dependencies
2525
run: |
2626
python -m pip install --upgrade pip
27-
pip install setuptools wheel twine pbr
27+
pip install .[build]
2828
- name: Build sdist and wheel
2929
run: |
30-
python setup.py sdist bdist_wheel
30+
python -m build
3131
- name: Publish distribution to PyPI
3232
# This condition prevents PRs from being published as part of
3333
# the test job.

pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ dependencies = [
3636
"stevedore",
3737
]
3838

39+
[project.optional-dependencies]
40+
linter = [
41+
"flake8",
42+
]
43+
build = [
44+
"build",
45+
"twine",
46+
"check-python-versions",
47+
]
48+
3949
# https://github.com/pypa/setuptools_scm/
4050
[tool.setuptools_scm]
4151
write_to = "virtualenvwrapper/version.py"

tox.ini

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ setenv =
2020
FAIL_FAST = true
2121

2222
[testenv:style]
23-
deps = flake8
23+
deps = .[linter]
2424
commands = flake8 virtualenvwrapper docs/source/conf.py
2525

2626
[testenv:zsh]
@@ -38,10 +38,7 @@ commands =
3838
sphinx-build -W -j auto -b linkcheck -d docs/build/doctrees docs/source docs/build/linkcheck
3939

4040
[testenv:pkglint]
41-
deps=
42-
build
43-
twine
44-
check-python-versions
41+
deps=.[build]
4542
commands=
4643
python -m build
4744
twine check dist/*.tar.gz dist/*.whl

0 commit comments

Comments
 (0)