Replace setup.py with pyproject.toml.
Some checks failed
build / docs (push) Blocked by required conditions
build / test (push) Has been cancelled

Reviewed-on: #922
This commit is contained in:
Dan Helfman 2024-10-26 23:38:34 +00:00
commit c7ca9bf844
6 changed files with 67 additions and 71 deletions

View File

@ -1 +0,0 @@
select = Q0

View File

@ -1,3 +1,62 @@
[project]
name = "borgmatic"
version = "1.9.0.dev0"
authors = [
{ name="Dan Helfman", email="witten@torsion.org" },
]
description = "Simple, configuration-driven backup software for servers and workstations"
readme = "README.md"
requires-python = ">=3.8"
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python",
"Topic :: Security :: Cryptography",
"Topic :: System :: Archiving :: Backup",
]
dependencies = [
"colorama>=0.4.1,<0.5",
"jsonschema",
"packaging",
"requests",
"ruamel.yaml>0.15.0",
]
[project.scripts]
borgmatic = "borgmatic.commands.borgmatic:main"
generate-borgmatic-config = "borgmatic.commands.generate_config:main"
validate-borgmatic-config = "borgmatic.commands.validate_config:main"
[project.optional-dependencies]
Apprise = ["apprise"]
[project.urls]
Homepage = "https://torsion.org/borgmatic"
[build-system]
requires = ["setuptools>=61.0"]
# allow looking for conf in setup.{cfg,py}
#build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
include = ["borgmatic*"]
namespaces = false
[tool.black]
line-length = 100
skip-string-normalization = true
[tool.pytest.ini_options]
testpaths = "tests"
addopts = "--cov-report term-missing:skip-covered --cov=borgmatic --ignore=tests/end-to-end"
[tool.isort]
profile = "black"
known_first_party = "borgmatic"
line_length = 100
skip = ".tox"
[tool.codespell]
skip = ".git,.tox,build"

View File

@ -33,8 +33,7 @@ git push github $version
# Build borgmatic and publish to pypi.
rm -fr dist
python3 setup.py bdist_wheel
python3 setup.py sdist
python3 -m build
twine upload -r pypi --username __token__ dist/borgmatic-*.tar.gz
twine upload -r pypi --username __token__ dist/borgmatic-*-py3-none-any.whl

View File

@ -1,26 +0,0 @@
[metadata]
description_file=README.md
[tool:pytest]
testpaths = tests
addopts = --cov-report term-missing:skip-covered --cov=borgmatic --ignore=tests/end-to-end
[flake8]
max-line-length = 100
extend-ignore = E203,E501,W503
exclude = *.*/*
multiline-quotes = '''
docstring-quotes = '''
[tool:isort]
profile=black
known_first_party = borgmatic
line_length = 100
skip = .tox
[codespell]
skip = .git,.tox,build
[pycodestyle]
ignore = E203
max_line_length = 100

View File

@ -1,42 +0,0 @@
from setuptools import find_packages, setup
VERSION = '1.9.0.dev0'
setup(
name='borgmatic',
version=VERSION,
description='Simple, configuration-driven backup software for servers and workstations',
author='Dan Helfman',
author_email='witten@torsion.org',
url='https://torsion.org/borgmatic',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Programming Language :: Python',
'Topic :: Security :: Cryptography',
'Topic :: System :: Archiving :: Backup',
],
packages=find_packages(exclude=['tests*']),
entry_points={
'console_scripts': [
'borgmatic = borgmatic.commands.borgmatic:main',
'generate-borgmatic-config = borgmatic.commands.generate_config:main',
'validate-borgmatic-config = borgmatic.commands.validate_config:main',
]
},
obsoletes=['atticmatic'],
install_requires=(
'colorama>=0.4.1,<0.5',
'jsonschema',
'packaging',
'requests',
'ruamel.yaml>0.15.0',
'setuptools',
),
extras_require={"Apprise": ["apprise"]},
include_package_data=True,
python_requires='>=3.8',
)

View File

@ -45,3 +45,10 @@ commands =
deps = {[testenv]deps}
commands =
codespell --write-changes
[flake8]
max-line-length = 100
extend-ignore = E203,E501,W503
exclude = *.*/*
multiline-quotes = '''
docstring-quotes = '''