Skip to content

Commit d110205

Browse files
authored
chore: drop usage of setup.cfg & setup.py (#80)
1 parent 13c6ee0 commit d110205

File tree

5 files changed

+69
-82
lines changed

5 files changed

+69
-82
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,19 @@ jobs:
2222

2323
# build & publish to PyPI
2424
- uses: actions/checkout@v4
25-
if: ${{ steps.release.outputs.release_created }}
2625

2726
- name: Set up Python
2827
uses: actions/setup-python@v5
2928
with:
3029
python-version: "3.11"
31-
if: ${{ steps.release.outputs.release_created }}
3230

3331
- name: Install dependencies
3432
run: |
3533
python -m pip install --upgrade pip
3634
pip install build
37-
if: ${{ steps.release.outputs.release_created }}
3835
3936
- name: Build package
4037
run: python -m build
41-
if: ${{ steps.release.outputs.release_created }}
4238

4339
- name: Publish package
4440
uses: pypa/gh-action-pypi-publish@0ab0b79471669eb3a4d647e625009c62f9f3b241

pyproject.toml

Lines changed: 68 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,83 @@
1-
# for now only be used for black and ruff config
2-
# maybe in the future we will use it instead of setup.py / setup.cfg
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "ansible-variables"
7+
version = "0.7.2"
8+
dependencies = [
9+
"ansible-core>=2.11.0",
10+
"rich"
11+
]
12+
requires-python = ">=3.8"
13+
authors = [
14+
{"name" = "Christoph Hille", "email" = "[email protected]"}
15+
]
16+
description = "Keep track of Ansible host context variables"
17+
readme = "README.md"
18+
license = {file = "LICENSE"}
19+
classifiers = [
20+
"Development Status :: 4 - Beta",
21+
"Environment :: Console",
22+
"Intended Audience :: Developers",
23+
"Intended Audience :: Information Technology",
24+
"Intended Audience :: System Administrators",
25+
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
26+
"Natural Language :: English",
27+
"Operating System :: POSIX",
28+
"Programming Language :: Python :: 3",
29+
"Programming Language :: Python :: 3.8",
30+
"Programming Language :: Python :: 3.9",
31+
"Programming Language :: Python :: 3.10",
32+
"Programming Language :: Python :: 3.11",
33+
"Programming Language :: Python :: 3.12",
34+
"Programming Language :: Python :: 3 :: Only",
35+
"Topic :: System :: Installation/Setup",
36+
"Topic :: System :: Systems Administration",
37+
"Topic :: Utilities",
38+
]
39+
40+
[project.urls]
41+
Homepage = "https://github.com/hille721/ansible-variables"
42+
Documentation = "https://github.com/hille721/ansible-variables/blob/main/README.md"
43+
Repository = "https://github.com/hille721/ansible-variables.git"
44+
"Bug Tracker" = "https://github.com/hille721/ansible-variables/issues"
45+
Changelog = "https://github.com/hille721/ansible-variables/blob/master/CHANGELOG.md"
46+
47+
[project.scripts]
48+
ansible-variables = "ansible_variables.cli.variables:main"
49+
50+
[tool.setuptools]
51+
include-package-data = true
52+
53+
[tool.setuptools.packages.find]
54+
where = ["lib"]
55+
exclude = ["tests"]
56+
357
[tool.black]
458
line-length = 120
559

60+
[tool.pylint.format]
61+
max-line-length = 120
62+
63+
[tool.pylint."message control"]
64+
disable= ["C", "R"]
65+
666
[tool.ruff]
767
line-length = 120
68+
69+
[tool.ruff.lint]
870
select = [
971
# Pyflakes
1072
"F",
1173
# Pycodestyle
1274
"E",
1375
"W",
1476
# isort
15-
"I001"
77+
"I",
78+
# pylint
79+
"PLE", "PLW"
1680
]
1781

18-
[tool.ruff.isort]
82+
[tool.ruff.lint.isort]
1983
known-first-party = ["ansible_variables"]

setup.cfg

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

setup.py

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

tests/test_cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
C.set_constant("CONFIG_FILE", "tests/test_data/ansible.cfg")
88
C.set_constant("DEFAULT_HOST_LIST", "tests/test_data/inventory")
99

10+
# pylint: disable=fixme
1011
# FIXME: we should not invoke the test with main() or VariablesCLI() as this will lead to context.CLIArgs set
1112
# which will not be cleared between the tests and so could lead to unexpected results
1213

0 commit comments

Comments
 (0)