Skip to content

Commit

Permalink
Remove setup.py (#757)
Browse files Browse the repository at this point in the history
* Remove setup.py

* Use isolated_build for pyproject.toml

* Remove 'twine check' from docs build

* Add 'twine check' to release

* Use build instead of pep517

* Update tox minversion

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

* Move 'twine check' back to docs

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
  • Loading branch information
bhrutledge and jaraco committed May 29, 2021
1 parent eff3a45 commit 6e6cf82
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 29 deletions.
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# pyproject.toml
[build-system]
requires = ["setuptools>=40.8", "wheel", "setuptools_scm>=1.15"]
build-backend = "setuptools.build_meta:__legacy__"
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]

[tool.towncrier]
package = "twine"
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ author = Donald Stufft and individual contributors
author_email = donald@stufft.io
description = Collection of utilities for publishing packages on PyPI
long_description = file:README.rst
long_description_content_type = text/x-rst
url = https://twine.readthedocs.io/
project_urls =
Source = https://github.com/pypa/twine/
Expand Down Expand Up @@ -43,8 +44,6 @@ install_requires=
keyring >= 15.1
rfc3986 >= 1.4.0
colorama >= 0.4.3
setup_requires =
setuptools_scm >= 1.15
include_package_data = True

[options.entry_points]
Expand Down
17 changes: 0 additions & 17 deletions setup.py

This file was deleted.

13 changes: 5 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tox]
minversion = 2.4
minversion = 3.3
envlist = lint,types,py{36,37,38,39},integration,docs
isolated_build = True

[testenv]
deps =
Expand Down Expand Up @@ -35,8 +36,7 @@ commands =
sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
doc8 docs README.rst --ignore-path docs/_build/html
sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/linkcheck
python setup.py sdist
twine check dist/*
python -m twine check --strict {distdir}/*

[testenv:watch-docs]
deps =
Expand Down Expand Up @@ -85,13 +85,10 @@ commands =
towncrier {posargs}

[testenv:release]
# disabled for twine to cause it to upload itself
# skip_install = True
# specify Python 3 to use platform's default Python 3
basepython = python3
deps =
pep517>=0.5
twine>=1.13
build
path.py
passenv =
TWINE_PASSWORD
Expand All @@ -100,7 +97,7 @@ setenv =
TWINE_USERNAME = {env:TWINE_USERNAME:__token__}
commands =
python -c "import path; path.Path('dist').rmtree_p()"
python -m pep517.build .
python -m build
python -m twine upload dist/*

[testenv:devpi]
Expand Down

0 comments on commit 6e6cf82

Please sign in to comment.