diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2024-04-29 10:22:27 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2024-04-29 10:22:27 +0200 |
commit | d2362a629d9871f535493b2ff92bcad415ae6dcd (patch) | |
tree | 61008eb7d84aff15e9b551b4e37d8cd7c94099b4 | |
parent | 89d51e87a3fe4bdcb1efabbe7a4923958998a61c (diff) | |
download | git-deps-d2362a629d9871f535493b2ff92bcad415ae6dcd.tar.gz |
Standardize and modernize package configuration.
-rw-r--r-- | pyproject.toml | 3 | ||||
-rw-r--r-- | requirements.txt | 3 | ||||
-rw-r--r-- | setup.cfg | 40 | ||||
-rw-r--r-- | setup.py | 16 | ||||
-rw-r--r-- | test-requirements.txt | 5 | ||||
-rw-r--r-- | tox.ini | 4 |
6 files changed, 25 insertions, 46 deletions
diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..fed528d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 94f02aa..0000000 --- a/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pip >= 10.0.1 -pygit2 >= 0.24.0 -flask @@ -1,6 +1,8 @@ [metadata] name = git-deps -summary = automatically detect dependencies between git commits +description = automatically detect dependencies between git commits +long_description = file: README.md +long_description_content_type = text/markdown author = Adam Spiers author_email = git@adamspiers.org license = GPL-2+ @@ -19,7 +21,22 @@ classifier = Topic :: Software Development :: Version Control Topic :: Utilities -[entry_points] +[options] +packages = + git_deps +install_requires = + pygit2 >= 0.24.0 + flask + sphinx + pyscaffold + +[options.extras_require] +testing = + pytest-cov + pytest + flake8 + +[options.entry_points] console_scripts = git-deps = git_deps.cli:run gitfile-handler = git_deps.handler:run @@ -30,24 +47,9 @@ scripts = data_files = share/git_deps = share/gitfile-handler.desktop -[options] -packages = - git_deps - -[options.entry_points] -console_scripts = - git-deps = git_deps.cli:run - -[test] -# py.test options when running `python setup.py test` -addopts = tests - -[pytest] -# Options for py.test: -# Specify command line options as you would do when invoking py.test directly. -# e.g. --cov-report html (or xml) for html/xml output or --junitxml junit.xml -# in order to write a coverage file that can be read by Jenkins. +[tool:pytest] addopts = + tests --cov git_deps --cov-report term-missing --verbose @@ -11,19 +11,5 @@ import sys from setuptools import setup - -def setup_package(): - needs_sphinx = {'build_sphinx', 'upload_docs'}.intersection(sys.argv) - sphinx = ['sphinx'] if needs_sphinx else [] - setup( - setup_requires=[ - 'pyscaffold', - ] + sphinx, - long_description='README.md', - long_description_content_type="text/markdown", - use_pyscaffold=True - ) - - if __name__ == "__main__": - setup_package() + setup() diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index 468f195..0000000 --- a/test-requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -# Add requirements only needed for your unittests and during development here. -# They will be installed automatically when running `python setup.py test`. -# ATTENTION: Don't remove pytest-cov and pytest as they are needed. -pytest-cov -pytest @@ -11,14 +11,10 @@ usedevelop = True changedir = tests commands = py.test {posargs} -deps = - pytest - -r{toxinidir}/requirements.txt [testenv:flake8] skip_install = True changedir = {toxinidir} -deps = flake8 commands = flake8 setup.py git_deps tests # Options for pytest |