Skip to content

Commit cac040d

Browse files
committed
Switch packaging to use hatchling
And rework dev, doc, lint dependencies
1 parent 4567a63 commit cac040d

File tree

11 files changed

+99
-161
lines changed

11 files changed

+99
-161
lines changed

.github/workflows/tox.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
- name: Run tox -e lint
3939
run: |
4040
tox -e lint
41+
- name: Run tox -e mypy
42+
run: |
43+
tox -e mypy
4144
build:
4245
runs-on: ubuntu-latest
4346
strategy:

.pre-commit-config.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,3 @@ repos:
3737
entry: ruff format --check --diff
3838
language: system
3939
types: [python]
40-
- repo: https://github.com/pre-commit/mirrors-mypy
41-
rev: v1.4.1
42-
hooks:
43-
- id: mypy
44-
# empty args needed in order to match mypy cli behavior
45-
additional_dependencies:
46-
- types-paramiko
47-
- types-setuptools
48-
- setuptools-scm
49-
- alabaster
50-
- pytest

MANIFEST.in

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

dev-requirements.txt

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

doc/source/conf.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
# serve to show the default.
2323

2424
import datetime
25+
import importlib.metadata
2526
import os
26-
import subprocess
2727
import sys
2828

2929
import alabaster
@@ -68,14 +68,7 @@
6868
# built documents.
6969
#
7070
# The short X.Y version.
71-
version = (
72-
subprocess.check_output(
73-
["python3", "setup.py", "--version"],
74-
cwd=os.path.join(os.path.dirname(__file__), os.pardir, os.pardir),
75-
)
76-
.decode()
77-
.strip()
78-
)
71+
version = importlib.metadata.version("pytest-testinfra")
7972
# The full version, including alpha/beta/rc tags.
8073
release = version
8174

hatch.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[version]
2+
source = "vcs"
3+
4+
[build.targets.sdist]
5+
packages = ["testinfra"]
6+
7+
[build.targets.wheel]
8+
packages = ["testinfra"]

pyproject.toml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
[build-system]
2+
requires = ["hatchling", "hatch-vcs"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "pytest-testinfra"
7+
description = "Test infrastructures"
8+
requires-python = ">=3.9"
9+
dynamic = ["version"]
10+
readme = "README.rst"
11+
license-files = ["LICENSE"]
12+
authors = [{ name = "Philippe Pepiot", email = "[email protected]" }]
13+
classifiers = [
14+
"Development Status :: 5 - Production/Stable",
15+
"Environment :: Console",
16+
"Intended Audience :: Developers",
17+
"Intended Audience :: Information Technology",
18+
"Intended Audience :: System Administrators",
19+
"License :: OSI Approved :: Apache Software License",
20+
"Operating System :: POSIX",
21+
"Programming Language :: Python",
22+
"Programming Language :: Python :: 3",
23+
"Programming Language :: Python :: 3 :: Only",
24+
"Programming Language :: Python :: 3.9",
25+
"Programming Language :: Python :: 3.10",
26+
"Programming Language :: Python :: 3.11",
27+
"Topic :: Software Development :: Testing",
28+
"Topic :: System :: Systems Administration",
29+
"Framework :: Pytest",
30+
]
31+
32+
dependencies = [
33+
"pytest>=6",
34+
]
35+
36+
[project.optional-dependencies]
37+
ansible = ["ansible"]
38+
paramiko = ["paramiko"]
39+
salt = ["salt", "tornado", "distro", "looseversion", "msgpack"]
40+
winrm = ["pywinrm"]
41+
test = [
42+
"pytest-cov",
43+
"pytest-xdist",
44+
"pytest-testinfra[ansible,paramiko,salt,winrm]",
45+
]
46+
typing = [
47+
"mypy",
48+
"types-paramiko",
49+
]
50+
lint = [
51+
"ruff",
52+
]
53+
doc = [
54+
"sphinx>=7.1,<7.2",
55+
"alabaster>=0.7.2",
56+
]
57+
dev = ["pytest-testinfra[test,typing,doc,lint]"]
58+
59+
[project.entry-points."pytest11"]
60+
"pytest11.testinfra" = "testinfra.plugin"

setup.cfg

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

setup.py

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

test-requirements.txt

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

0 commit comments

Comments
 (0)