Skip to content

Commit 54fd33a

Browse files
authored
Merge pull request #146 from ssbarnea/fic/pep-621
Adopt PEP-621
2 parents 84ab7b7 + 46a6c3c commit 54fd33a

File tree

5 files changed

+61
-55
lines changed

5 files changed

+61
-55
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ repos:
5757
rev: 6.11.0
5858
hooks:
5959
- id: pip-compile
60-
entry: pip-compile --resolver=backtracking -q --no-annotate --output-file=requirements.txt setup.cfg pyproject.toml --extra test --strip-extras
60+
entry: pip-compile --resolver=backtracking -q --no-annotate --output-file=requirements.txt pyproject.toml --extra test --strip-extras
6161
language: python
6262
files: ^(requirements\.txt|pyproject\.toml)$
6363
alias: deps
6464
language_version: "3.9" # minimal we support officially
6565
additional_dependencies:
6666
- pip>=22.3.1
6767
- id: pip-compile
68-
entry: pip-compile --resolver=backtracking -q --no-annotate --output-file=requirements.txt setup.cfg pyproject.toml --extra test --strip-extras
68+
entry: pip-compile --resolver=backtracking -q --no-annotate --output-file=requirements.txt pyproject.toml --extra test --strip-extras --upgrade
6969
language: python
7070
files: ^(requirements\.txt|pyproject\.toml)$
7171
alias: up

pyproject.toml

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,46 @@
11
[build-system]
22
requires = [
3-
"setuptools >= 45.0.0", # required by pyproject+setuptools_scm integration
4-
"setuptools_scm >= 6.3.1", # required for "no-local-version" scheme
5-
"setuptools_scm_git_archive >= 1.0",
6-
"wheel",
3+
"setuptools >= 61.0", # PEP-621
4+
"setuptools_scm[toml] >= 7.0.0",
75
]
86
build-backend = "setuptools.build_meta"
97

8+
[project]
9+
# https://peps.python.org/pep-0621/#readme
10+
requires-python = ">=3.8"
11+
dynamic = ["version"]
12+
name = "python-vagrant"
13+
description = "Python bindings for interacting with Vagrant virtual machines."
14+
readme = "README.md"
15+
authors = [{ "name" = "Todd Francis DeLuca", "email" = "[email protected]" }]
16+
maintainers = [
17+
{ "name" = "Sorin Sbarnea", "email" = "[email protected]" }
18+
]
19+
license = { text = "MIT" }
20+
classifiers = [
21+
"Development Status :: 4 - Beta",
22+
"License :: OSI Approved :: MIT License",
23+
"Operating System :: OS Independent",
24+
"Programming Language :: Python :: 3.10",
25+
"Programming Language :: Python :: 3.8",
26+
"Programming Language :: Python :: 3.9",
27+
"Topic :: Utilities",
28+
]
29+
keywords = ["box", "vagrant", "vagrantfile", "virtual-machine", "virtualbox"]
30+
31+
[project.urls]
32+
homepage = "https://github.com/pycontribs/python-vagrant"
33+
repository = "https://github.com/pycontribs/python-vagrant"
34+
changelog = "https://github.com/pycontribs/python-vagrant/releases"
35+
36+
[project.optional-dependencies]
37+
test = [
38+
"coverage>=6.3",
39+
"pytest-cov>=3.0.0",
40+
"pytest>=7.0.0",
41+
"pytest-plus>=0.2",
42+
]
43+
1044
[tool.coverage.run]
1145
source = ["src"]
1246
branch = true

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is autogenerated by pip-compile with Python 3.9
33
# by the following command:
44
#
5-
# pip-compile --extra=test --no-annotate --output-file=requirements.txt --resolver=backtracking --strip-extras pyproject.toml setup.cfg
5+
# pip-compile --extra=test --no-annotate --output-file=requirements.txt --resolver=backtracking --strip-extras pyproject.toml
66
#
77
attrs==22.1.0
88
coverage==6.5.0

setup.cfg

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

tox.ini

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,39 @@ setenv =
3737
COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}}
3838
PIP_CONSTRAINT = requirements.txt
3939
allowlist_externals =
40+
git
4041
sh
4142
*/create_dummy_box.sh
4243

4344
[testenv:dev]
4445
commands = {posargs}
4546

47+
[testenv:deps]
48+
description = Bump all test dependencies
49+
# we reuse the lint environment
50+
envdir = {toxworkdir}/lint
51+
skip_install = true
52+
deps =
53+
{[testenv:lint]deps}
54+
setenv =
55+
# without his upgrade would likely not do anything
56+
PIP_CONSTRAINT = /dev/null
57+
commands_pre =
58+
commands =
59+
pre-commit run --all-files --show-diff-on-failure --hook-stage manual up
60+
# Update pre-commit hooks
61+
pre-commit autoupdate
62+
# We fail if files are modified at the end
63+
git diff --exit-code
64+
4665
[testenv:lint]
4766
description = Run all linters
4867
deps =
4968
pre-commit>=2.6.0
5069
setenv =
5170
PIP_CONSTRAINT = /dev/null
5271
skip_install = true
72+
commands_pre =
5373
commands =
5474
{envpython} -m pre_commit run --all-files --show-diff-on-failure {posargs:}
5575

0 commit comments

Comments
 (0)