From 98db711ccadaaa89947bb0c874b51337a1e488bd Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Fri, 18 Mar 2022 11:28:44 -0400 Subject: [PATCH] Update package metadata Signed-off-by: Ofek Lev --- .readthedocs.yaml | 12 ++++---- MANIFEST.in | 11 -------- pyproject.toml | 72 +++++++++++++++++++++++++++++++++++++++++++++-- setup.cfg | 50 -------------------------------- 4 files changed, 77 insertions(+), 68 deletions(-) delete mode 100644 MANIFEST.in delete mode 100644 setup.cfg diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 0f0e73d6..11d82d2a 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,14 +7,16 @@ version: 2 # Build documentation with Sphinx sphinx: - builder: html - configuration: docs/conf.py - fail_on_warning: true + builder: html + configuration: docs/conf.py + fail_on_warning: true # Optionally build your docs in additional formats such as PDF formats: [] # Optionally set the version of Python and requirements required to build your docs python: - install: - - requirements: requirements-docs.txt + install: + - requirements: requirements-docs.txt + - method: pip + path: . diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 9a035945..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,11 +0,0 @@ -# License files -include LICENSE* - -# Development and testing -include *.txt -include tox.ini -graft tests - -# Documentation -graft docs -recursive-include tuf *.md diff --git a/pyproject.toml b/pyproject.toml index 266d2cfd..23fc741c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,75 @@ # Build-system section [build-system] -requires = ["setuptools>=46.4.0", "wheel"] -build-backend = "setuptools.build_meta" +requires = ["hatchling>=0.21.0"] +build-backend = "hatchling.build" + +[project] +name = "tuf" +description = "A secure updater framework for Python" +readme = "README.md" +license = "MIT OR Apache-2.0" +requires-python = ">=3.7" +authors = [ + { email = "theupdateframework@googlegroups.com" }, +] +keywords = [ + "authentication", + "compromise", + "key", + "revocation", + "secure", + "update", + "updater", +] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "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", +] +dependencies = [ + "requests>=2.19.1", + "securesystemslib>=0.22.0", +] +dynamic = ["version"] + +[project.urls] +Documentation = "https://theupdateframework.readthedocs.io/en/stable/" +Homepage = "https://www.updateframework.com" +Issues = "https://github.com/theupdateframework/python-tuf/issues" +Source = "https://github.com/theupdateframework/python-tuf" + +[tool.hatch.version] +path = "tuf/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/docs", + "/tests", + "/tuf", + "/requirements*.txt", + "/tox.ini", + "/setup.py", +] + +[tool.hatch.build.targets.wheel] +# The testing phase changes the current working directory to `tests` but the test scripts import +# from `tests` so the root directory must be added to Python's path for editable installations +dev-mode-dirs = ["."] # Black section # Read more here: https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 2eb11ee7..00000000 --- a/setup.cfg +++ /dev/null @@ -1,50 +0,0 @@ -[metadata] -name = tuf -version = attr: tuf.__version__ -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.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 = 'MIT or Apache License 2.0' -license_files = LICENSE LICENSE-MIT - -[options] -packages = find: -python_requires = >=3.7 -install_requires = - requests>=2.19.1 - securesystemslib>=0.22.0 - -[options.packages.find] -exclude = tests - -[options.package_data] -tuf = py.typed - -[check-manifest] -ignore = - .readthedocs.yaml