pyproject-transition #922
@ -1,3 +1,48 @@
|
||||
[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 = ["borgmatic"]
|
||||
|
||||
[tool.black]
|
||||
line-length = 100
|
||||
skip-string-normalization = true
|
||||
|
26
setup.cfg
@ -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
|
42
setup.py
@ -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*']),
|
||||
witten marked this conversation as resolved
Outdated
|
||||
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'],
|
||||
witten marked this conversation as resolved
Outdated
witten
commented
This didn't get carried forward to the This didn't get carried forward to the `pyproject.toml`, but that's probably okay given how much it's ancient history.
kaliko
commented
Right, it can still be ported to
Right, it can still be ported to `pyproject.toml` with an extra conf :
```ini
[tool.setuptools]
obsoletes = ['atticmatic']
```
witten
commented
I really don't feel strongly either way. Just thought I'd mention it. I really don't feel strongly either way. Just thought I'd mention it.
|
||||
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,
|
||||
witten marked this conversation as resolved
Outdated
witten
commented
Looks like the Looks like the `pyproject.toml` equivalent of this line is missing? I think the main reason this exists is so that the configuration schema file gets installed. (It's at `borgmatic/config/schema.yaml` in the source.) But also the systemd and other sample files (`sample/`) probably get included too.
kaliko
commented
These files (systemd units and schema) are declared in I can see these files in the resulting source dist tar ball. These files (systemd units and schema) are declared in ``MANIFEST.in`` and by default, [include-package-data is true in pyproject.toml](https://setuptools.pypa.io/en/latest/userguide/datafiles.html#configuration-options).
I can see these files in the resulting source dist tar ball.
witten
commented
Awesome, thanks! Awesome, thanks!
|
||||
python_requires='>=3.8',
|
||||
)
|
I don't know if something like this is necessary in
pyproject.toml
so tests don't get installed into the final package? Or is that done automatically? I didn't see tests end up in the resulting tarball, so maybe it's fine as is.It's done automatically indeed.
And the resulting tar ball does not contain any test files.
But to make sure to package all modules in borgmatic package I used
tool.setuptools.packages.find
then I believe anything outside./borgmatic
folder in not covered anyway.Please not that
tool.setuptools.packages.find
also setnamespaces = false
, from the doc “This will prevent any folder without an init.py file from being scanned.“ src.That makes sense. The only thing potentially missing that I could see of being use is the
sample/
directory, as I'm vaguely recalling that some Linux distribution packages of borgmatic programmatically consume those files.We discussed it already :)
These files are in the source distribution. The MANIFEST.in is declaring it and setuptools includes them by default, no need to explicitly declare
We used systemd unit file in Debian as well, but we got the source from the tagged version in github, then we get the whole source tree. I'm not familiar with PKGBUILD but I think they use the git source as well, not the pypi source distribution. Anyway thanks for shipping these, it's helpful for packaging.
Okay, just making sure since you quoted: "This will prevent any folder without an __init.py__ file from being scanned." But if the MANIFEST.in still takes care of
sample/
, great.Getting the tagged version from GitHub should be fine, although note that projects.torsion.org is the canonical source for the source and GitHub is "only" a mirror.