Skip to content

fix action-based package publishing #89

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
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
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine pbr
pip install .[build]
- name: Build sdist and wheel
run: |
python setup.py sdist bdist_wheel
python -m build
- name: Publish distribution to PyPI
# This condition prevents PRs from being published as part of
# the test job.
Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ dependencies = [
"stevedore",
]

[project.optional-dependencies]
linter = [
"flake8",
]
build = [
"build",
"twine",
"check-python-versions",
]

# https://github.com/pypa/setuptools_scm/
[tool.setuptools_scm]
write_to = "virtualenvwrapper/version.py"
Expand Down
7 changes: 2 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ setenv =
FAIL_FAST = true

[testenv:style]
deps = flake8
deps = .[linter]
commands = flake8 virtualenvwrapper docs/source/conf.py

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

[testenv:pkglint]
deps=
build
twine
check-python-versions
deps=.[build]
commands=
python -m build
twine check dist/*.tar.gz dist/*.whl
Expand Down