Skip to content

Commit

Permalink
Merge pull request #1626 from joshuagl/joshuagl/build
Browse files Browse the repository at this point in the history
Modernise packaging configuration
  • Loading branch information
joshuagl committed Oct 21, 2021
2 parents 69eb29f + de1a3af commit 6d18d53
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 158 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ tests/htmlcov/*
*~
*.tmp
.pre-commit-config.yaml
.vscode

# Debian generated files
debian/.debhelper/*
Expand Down
Empty file removed .gitmodules
Empty file.
36 changes: 11 additions & 25 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,29 +1,15 @@
# License files
include LICENSE*
include README.md

# Development and testing
include *.txt
global-include pylintrc
include tox.ini
include tests/repository_data/keystore/delegation_key
include tests/repository_data/keystore/root_key*
include tests/repository_data/keystore/snapshot_key
include tests/repository_data/keystore/targets_key
include tests/repository_data/keystore/timestamp_key
include tests/ssl_certs/*.crt
include tests/ssl_certs/*.key
graft tests

recursive-include docs *.txt
recursive-include docs *.md
recursive-include docs *.rst
recursive-include docs/images *.png
recursive-include tuf/scripts *.py
recursive-include examples *
recursive-include tests *.py
recursive-include tests *.pem
recursive-include tests *.json
recursive-include tests *.txt
recursive-include tests *.cfg
recursive-include tests *.coveragerc
recursive-include tests *.gz
recursive-include tests *.pub
recursive-include tuf *.gitignore
# Documentation
graft docs
recursive-include tuf *.md
recursive-include tuf *.rst
recursive-include tuf *.yml

# To remove
recursive-include tuf/scripts *.py
10 changes: 4 additions & 6 deletions docs/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
tracked by git
* Ensure `docs/CHANGELOG.md` contains a one-line summary of each [notable
change](https://keepachangelog.com/) since the prior release
* Update `setup.py` and `tuf/__init__.py` to the new version number vA.B.C
* Update `setup.cfg` and `tuf/__init__.py` to the new version number vA.B.C
* Test packaging, uploading to Test PyPI and installing from a virtual environment
(ensure commands invoking `python` below are using Python 3)
* Remove existing dist build dirs
* Create source dist `python3 setup.py sdist`
* Create wheel `python3 setup.py bdist_wheel`
* Create source dist and wheel `python3 -m build`
* Sign the dists `gpg --detach-sign -a dist/tuf-vA.B.C.tar.gz`
* Upload to test PyPI `twine upload --repository testpypi dist/*`
* Verify the uploaded package https://testpypi.python.org/pypi/tuf/
Expand All @@ -24,13 +23,12 @@
* Create a package for the formal release
(ensure commands invoking `python` below are using Python 3)
* Remove existing dist build dirs
* Create source dist `python3 setup.py sdist`
* Create wheel `python3 setup.py bdist_wheel`
* Create source dist and wheel `python3 -m build`
* Sign source dist `gpg --detach-sign -a dist/tuf-vA.B.C.tar.gz`
* Sign wheel `gpg --detach-sign -a dist/tuf-vA.B.C-py3-none-any.whl`
* Upload to test PyPI `twine upload --repository testpypi dist/*`
* Verify the uploaded package https://testpypi.python.org/pypi/tuf/
* Upload to PyPI `twine upload dist/*`
* Attach the signed dists to the release on GitHub
* Attach both signed dists and their detached signatures to the release on GitHub
* Announce the release on [#tuf on CNCF Slack](https://cloud-native.slack.com/archives/C8NMD3QJ3)
* Ensure [POUF 1](https://github.com/theupdateframework/taps/blob/master/POUFs/reference-POUF/pouf1.md), for the reference implementation, is up-to-date
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=40.8.0", "wheel"]
build-backend = "setuptools.build_meta"
3 changes: 3 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Install tuf in editable mode and requirements for local testing with tox,
# and also for running test suite or individual tests manually
build
tox
twine
wheel
-r requirements-test.txt
-e .
52 changes: 49 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,54 @@
[metadata]
name = tuf
version = 0.19.0
author = https://www.updateframework.com
author_email = theupdateframework@googlegroups.com
description = A secure updater framework for Python
long_description = file: README.md
long_description_content_type = text/markdown
url = https://www.updateframework.com
project_urls =
Documentation = https://theupdateframework.readthedocs.io/en/stable/
Issues = https://github.com/theupdateframework/python-tuf/issues
Source = https://github.com/theupdateframework/python-tuf
classifiers =
Development Status :: 4 - Beta
Intended Audience :: Developers
License :: OSI Approved :: MIT License
License :: OSI Approved :: Apache Software License
Operating System :: POSIX
Operating System :: POSIX :: Linux
Operating System :: MacOS :: MacOS X
Operating System :: Microsoft :: Windows
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: Implementation :: CPython
Topic :: Security
Topic :: Software Development
keywords = update updater secure authentication key compromise revocation
license_files = LICENSE LICENSE-MIT

[options]
packages = find:
scripts =
tuf/scripts/repo.py
tuf/scripts/client.py
python_requires = ~=3.6
install_requires =
requests>=2.19.1
securesystemslib>=0.20.0

[options.packages.find]
exclude = tests

[check-manifest]
ignore =
requirements-dev.txt
.travis.yml
.coveragerc
.fossa.yml
.readthedocs.yaml

[mypy]
warn_unused_configs = True
Expand Down
123 changes: 0 additions & 123 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion tuf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This value is used in the requests user agent.
# setup.py has it hard-coded separately.
# setup.cfg has it hard-coded separately.
# Currently, when the version is changed, it must be set in both locations.
# TODO: Single-source the version number.
__version__ = "0.19.0"
Expand Down

0 comments on commit 6d18d53

Please sign in to comment.