-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate package setup to pyproject.toml
- Loading branch information
1 parent
b5bbde8
commit 0238a01
Showing
13 changed files
with
266 additions
and
54 deletions.
There are no files selected for viewing
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,11 @@ | |
**/fixity.db | ||
*~ | ||
.coverage | ||
|
||
# Tox files | ||
.tox/ | ||
|
||
# Build output | ||
build/ | ||
dist/ | ||
*.egg-info/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
include LICENSE | ||
include README.md | ||
include TRADEMARK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.PHONY: clean package package-deps package-source package-upload package-wheel | ||
|
||
package-deps: | ||
pip install --upgrade twine wheel | ||
|
||
package-source: | ||
python setup.py sdist | ||
|
||
package-wheel: package-deps | ||
python setup.py bdist_wheel | ||
|
||
package-check: package-source package-wheel ## Check the distribution is valid | ||
twine check dist/* | ||
|
||
package-upload: package-deps package-check | ||
twine upload dist/* --repository-url https://upload.pypi.org/legacy/ | ||
|
||
package: package-upload | ||
|
||
clean: | ||
rm -rf metsrw.egg-info/ | ||
rm -rf build/ | ||
rm -rf dist/ | ||
|
||
pip-compile: | ||
pip-compile --allow-unsafe --output-file=requirements.txt pyproject.toml | ||
pip-compile --allow-unsafe --extra=dev --output-file=requirements-dev.txt pyproject.toml | ||
|
||
pip-upgrade: | ||
pip-compile --allow-unsafe --upgrade --output-file=requirements.txt pyproject.toml | ||
pip-compile --allow-unsafe --upgrade --extra=dev --output-file=requirements-dev.txt pyproject.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
__version__ = "0.6.0" | ||
|
||
__all__ = [ | ||
"__version__", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=68", | ||
"wheel>=0.41", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools.packages.find] | ||
where = [""] | ||
include = ["fixity*"] | ||
namespaces = false | ||
|
||
[project] | ||
name = "fixity" | ||
dynamic = [ | ||
"version", | ||
"readme", | ||
] | ||
description = "Command line tool to check fixity for AIPs stored in the Archivematica Storage Service." | ||
requires-python = ">=3.8" | ||
license = {file = "LICENSE"} | ||
dependencies = [ | ||
"requests", | ||
"SQLAlchemy", | ||
] | ||
keywords = [ | ||
"archivematica", | ||
"preservation", | ||
] | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"Environment :: Console", | ||
"Intended Audience :: Information Technology", | ||
"License :: OSI Approved :: GNU Affero General Public License v3", | ||
"Operating System :: POSIX :: Linux", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
authors = [ | ||
{name = "Artefactual Systems Inc.", email = "[email protected]"} | ||
] | ||
maintainers = [ | ||
{name = "Artefactual Systems Inc.", email = "[email protected]"} | ||
] | ||
|
||
[project.urls] | ||
homepage = "https://github.com/artefactual/fixity/" | ||
repository = "https://github.com/artefactual/fixity/" | ||
issues = "https://github.com/archivematica/Issues/issues" | ||
|
||
[project.scripts] | ||
fixity = "fixity.fixity:main" | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"coverage", | ||
"pip-tools", | ||
"pytest-cov", | ||
"pytest", | ||
"vcrpy", | ||
] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "fixity.__version__"} | ||
readme = {file = ["README.md"], content-type = "text/markdown"} | ||
|
||
[tool.pytest.ini_options] | ||
python_files = [ | ||
"test_*.py", | ||
] | ||
testpaths = [ | ||
"tests", | ||
] | ||
|
||
[tool.coverage.run] | ||
source = [ | ||
"fixity", | ||
] | ||
branch = true | ||
omit = [ | ||
"tests/*", | ||
] | ||
|
||
[tool.tox] | ||
legacy_tox_ini = """ | ||
[tox] | ||
envlist = py{38,39,310,311,312}, linting | ||
[gh-actions] | ||
python = | ||
3.8: py38 | ||
3.9: py39 | ||
3.10: py310 | ||
3.11: py311 | ||
3.12: py312 | ||
[testenv] | ||
skip_install = true | ||
deps = -r {toxinidir}/requirements-dev.txt | ||
commands = pytest {posargs} | ||
[testenv:linting] | ||
basepython = python3 | ||
deps = pre-commit | ||
commands = pre-commit run --all-files --show-diff-on-failure | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,83 @@ | ||
-r requirements.txt | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.9 | ||
# by the following command: | ||
# | ||
# pip-compile --allow-unsafe --extra=dev --output-file=requirements-dev.txt pyproject.toml | ||
# | ||
build==1.0.3 | ||
# via pip-tools | ||
certifi==2023.7.22 | ||
# via requests | ||
charset-normalizer==3.3.2 | ||
# via requests | ||
click==8.1.7 | ||
# via pip-tools | ||
coverage[toml]==7.3.2 | ||
# via | ||
# fixity (pyproject.toml) | ||
# pytest-cov | ||
exceptiongroup==1.1.3 | ||
# via pytest | ||
greenlet==3.0.1 | ||
# via sqlalchemy | ||
idna==3.4 | ||
# via | ||
# requests | ||
# yarl | ||
importlib-metadata==6.8.0 | ||
# via build | ||
iniconfig==2.0.0 | ||
# via pytest | ||
multidict==6.0.4 | ||
# via yarl | ||
packaging==23.2 | ||
# via | ||
# build | ||
# pytest | ||
pip-tools==7.3.0 | ||
# via fixity (pyproject.toml) | ||
pluggy==1.3.0 | ||
# via pytest | ||
pyproject-hooks==1.0.0 | ||
# via build | ||
pytest==7.4.3 | ||
# via | ||
# fixity (pyproject.toml) | ||
# pytest-cov | ||
pytest-cov==4.1.0 | ||
# via fixity (pyproject.toml) | ||
pyyaml==6.0.1 | ||
# via vcrpy | ||
requests==2.31.0 | ||
# via fixity (pyproject.toml) | ||
sqlalchemy==2.0.23 | ||
# via fixity (pyproject.toml) | ||
tomli==2.0.1 | ||
# via | ||
# build | ||
# coverage | ||
# pip-tools | ||
# pyproject-hooks | ||
# pytest | ||
typing-extensions==4.8.0 | ||
# via sqlalchemy | ||
urllib3==1.26.18 | ||
# via | ||
# requests | ||
# vcrpy | ||
vcrpy==5.1.0 | ||
# via fixity (pyproject.toml) | ||
wheel==0.41.3 | ||
# via pip-tools | ||
wrapt==1.15.0 | ||
# via vcrpy | ||
yarl==1.9.2 | ||
# via vcrpy | ||
zipp==3.17.0 | ||
# via importlib-metadata | ||
|
||
# The following packages are considered to be unsafe in a requirements file: | ||
pip==23.3.1 | ||
# via pip-tools | ||
setuptools==68.2.2 | ||
# via pip-tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,22 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.9 | ||
# by the following command: | ||
# | ||
# pip-compile --allow-unsafe --output-file=requirements.txt pyproject.toml | ||
# | ||
certifi==2023.7.22 | ||
# via requests | ||
charset-normalizer==3.3.2 | ||
# via requests | ||
greenlet==3.0.1 | ||
# via sqlalchemy | ||
idna==3.4 | ||
# via requests | ||
requests==2.31.0 | ||
SQLAlchemy==1.4.49 | ||
# via fixity (pyproject.toml) | ||
sqlalchemy==2.0.23 | ||
# via fixity (pyproject.toml) | ||
typing-extensions==4.8.0 | ||
# via sqlalchemy | ||
urllib3==2.0.7 | ||
# via requests |