Skip to content

Commit 2d54c74

Browse files
Merge pull request #68 from ThomasWaldmann/pyproject
migrate to using pyproject.toml
2 parents 01a1669 + ac6a84a commit 2d54c74

File tree

7 files changed

+101
-93
lines changed

7 files changed

+101
-93
lines changed

.coveragerc

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,31 @@ jobs:
1313
python-version: "3.11"
1414
- name: Lint with flake8
1515
run: |
16-
pip install flake8
16+
pip install flake8-pyproject
1717
flake8
1818
test:
1919
needs: lint
20-
runs-on: ubuntu-latest
20+
runs-on: ${{ matrix.os }}
2121
strategy:
2222
fail-fast: false
2323
matrix:
2424
include:
25-
- os: ubuntu-22.04
26-
python-version: "3.8"
27-
toxenv: py38
2825
- os: ubuntu-22.04
2926
python-version: "3.9"
3027
toxenv: py39
31-
- os: ubuntu-22.04
28+
- os: ubuntu-24.04
3229
python-version: "3.10"
3330
toxenv: py310
34-
- os: ubuntu-22.04
31+
- os: ubuntu-24.04
3532
python-version: "3.11"
3633
toxenv: py311
37-
- os: ubuntu-22.04
34+
- os: ubuntu-24.04
3835
python-version: "3.12"
3936
toxenv: py312
37+
- os: ubuntu-24.04
38+
python-version: "3.13"
39+
toxenv: py313
40+
4041
env:
4142
TOXENV: ${{ matrix.toxenv }}
4243
steps:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ borg-env
99
*.pyo
1010
.idea/
1111
.cache/
12+
.coverage
1213
src/borg_import/_version.py
1314
.eggs/

pyproject.toml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
[build-system]
2+
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=6.2"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "borg-import"
7+
description = "Import backups made with misc. other software into borgbackup"
8+
readme = "README.rst"
9+
authors = [
10+
{name = "The Borg Collective (see AUTHORS file)", email = "borgbackup@python.org"}
11+
]
12+
license = {text = "BSD"}
13+
classifiers = [
14+
"Development Status :: 3 - Alpha",
15+
"Environment :: Console",
16+
"Intended Audience :: System Administrators",
17+
"License :: OSI Approved :: BSD License",
18+
"Operating System :: POSIX :: Linux",
19+
"Programming Language :: Python",
20+
"Programming Language :: Python :: 3",
21+
"Programming Language :: Python :: 3.9",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
"Programming Language :: Python :: 3.13",
26+
"Topic :: System :: Archiving :: Backup",
27+
]
28+
requires-python = ">=3.9"
29+
dynamic = ["version"]
30+
31+
[project.urls]
32+
Homepage = "https://borgimport.readthedocs.io/"
33+
34+
[project.scripts]
35+
borg-import = "borg_import.main:main"
36+
37+
[tool.setuptools]
38+
package-dir = {"" = "src"}
39+
include-package-data = true
40+
zip-safe = false
41+
42+
[tool.setuptools.packages.find]
43+
where = ["src"]
44+
45+
[tool.setuptools_scm]
46+
write_to = "src/borg_import/_version.py"
47+
48+
[tool.pytest]
49+
python_files = "testsuite/*.py"
50+
testpaths = ["src"]
51+
52+
[tool.pytest.ini_options]
53+
addopts = "-rs --cov=borg_import --cov-config=pyproject.toml"
54+
55+
[tool.flake8]
56+
max-line-length = 120
57+
exclude = "build,dist,.git,.idea,.cache,.tox,docs/conf.py,.eggs"
58+
59+
[tool.coverage.run]
60+
branch = true
61+
source = ["src/borg_import"]
62+
omit = ["*/borg_import/helpers/testsuite/*"]
63+
64+
[tool.coverage.report]
65+
exclude_lines = [
66+
"pragma: no cover",
67+
"def __repr__",
68+
"raise AssertionError",
69+
"raise NotImplementedError",
70+
"if 0:",
71+
"if __name__ == .__main__.:"
72+
]
73+
ignore_errors = true
74+
75+
[tool.tox]
76+
env_list = ["py39", "py310", "py311", "py312", "py313", "flake8"]
77+
78+
[tool.tox.env_run_base]
79+
package = "editable-legacy"
80+
passenv = ["*"]
81+
82+
[tool.tox.env_pkg_base]
83+
passenv = ["*"]
84+
85+
[tool.tox.env.testenv]
86+
deps = ["-rrequirements.d/development.txt"]
87+
commands = [["pytest", "-rs", "--cov=borg_import", "--cov-config=pyproject.toml", "--pyargs={posargs:borg_import.helpers.testsuite}"]]
88+
89+
[tool.tox.env.flake8]
90+
deps = ["flake8-pyproject"]
91+
commands = [["flake8"]]

setup.cfg

Lines changed: 0 additions & 6 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

tox.ini

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)