diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 5d931745..00000000 --- a/.flake8 +++ /dev/null @@ -1 +0,0 @@ -select = Q0 diff --git a/pyproject.toml b/pyproject.toml index 10572daa..978a484d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/scripts/release b/scripts/release index b4ab65cf..f84681db 100755 --- a/scripts/release +++ b/scripts/release @@ -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 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index a5ba3a6a..00000000 --- a/setup.cfg +++ /dev/null @@ -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 diff --git a/setup.py b/setup.py deleted file mode 100644 index 7252ddd0..00000000 --- a/setup.py +++ /dev/null @@ -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', -) diff --git a/tox.ini b/tox.ini index 098a8926..6685b88b 100644 --- a/tox.ini +++ b/tox.ini @@ -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 = '''