Skip to content

Commit 3e28f9f

Browse files
authored
Remove setup.py (#1762)
1 parent af8318a commit 3e28f9f

File tree

5 files changed

+12
-53
lines changed

5 files changed

+12
-53
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,6 @@ ci:
1414
- pip-compile-docs-upgrade
1515
- pip-compile-upgrade
1616
repos:
17-
- repo: local
18-
hooks:
19-
- id: immutable-setup-py
20-
name: Verify that setup.py stays immutable
21-
description: >-
22-
This is a sanity check that makes sure that
23-
the `setup.py` file isn't changed.
24-
# Using Python here because using
25-
# shell test does not seem to work in CIs:
26-
entry: >-
27-
sh -c 'git hash-object setup.py
28-
|
29-
python -c raise\ SystemExit\(input\(\)\ !=\ \"f6d1010b609cbe816d3ef652eee452d09d52979f\"\)
30-
'
31-
pass_filenames: false
32-
language: system
33-
files: >-
34-
^setup\.py$
3517
- repo: https://github.com/pre-commit/pre-commit-hooks.git
3618
rev: v4.0.1
3719
hooks:
@@ -138,7 +120,7 @@ repos:
138120
hooks:
139121
- id: pip-compile
140122
name: pip-compile
141-
entry: pip-compile -q --no-annotate --output-file=constraints.txt setup.py setup.cfg --extra test --extra yamllint --strip-extras
123+
entry: pip-compile -q --no-annotate --output-file=constraints.txt setup.cfg --extra test --extra yamllint --strip-extras
142124
language: system
143125
files: ^(setup\.cfg|=constraints\.txt)$
144126
pass_filenames: false
@@ -150,7 +132,7 @@ repos:
150132
pass_filenames: false
151133
- id: pip-compile-upgrade
152134
name: pip-compile-upgrade
153-
entry: pip-compile -q --upgrade --no-annotate --output-file=constraints.txt setup.py setup.cfg --extra test --extra yamllint --strip-extras
135+
entry: pip-compile -q --upgrade --no-annotate --output-file=constraints.txt setup.cfg --extra test --extra yamllint --strip-extras
154136
language: system
155137
files: ^(setup\.cfg|=constraints\.txt)$
156138
pass_filenames: false

constraints.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
# To update, run:
44
#
5-
# pip-compile --extra=test --extra=yamllint --no-annotate --output-file=constraints.txt --strip-extras setup.cfg setup.py
5+
# pip-compile --extra=test --extra=yamllint --no-annotate --output-file=constraints.txt --strip-extras setup.cfg
66
#
77
attrs==21.2.0
88
bracex==2.2

setup.cfg

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ package_dir =
6363
packages = find:
6464
zip_safe = False
6565

66-
# These are required during `setup.py` run:
67-
setup_requires =
68-
setuptools_scm>=1.15.0
69-
setuptools_scm_git_archive>=1.0
70-
7166
# These are required in actual runtime:
7267
install_requires =
7368
# ansible-lint does not list ansible as direct dependency in order to

setup.py

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

tox.ini

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,16 @@ requires =
1111
setuptools >= 41.4.0
1212
pip >= 19.3.0
1313
skip_missing_interpreters = True
14-
# `usedevelop = true` overrides `skip_install` instruction, it's unwanted
15-
usedevelop = false
1614

1715
[testenv]
1816
description =
1917
Run the tests under {basepython} and
2018
devel: ansible devel branch
2119
ansible29: ansible 2.9
2220
core: ansible-core 2.11+
23-
extras =
24-
yamllint
25-
core: core
26-
test
2721
deps =
22+
--editable .[yamllint,test]
23+
core: ansible-core
2824
ansible29: ansible>=2.9,<2.10
2925
py: ansible-core>=2.11
3026
devel: ansible-core @ git+https://github.com/ansible/ansible.git # GPLv3+
@@ -41,11 +37,6 @@ commands =
4137
--cov-report term-missing:skip-covered \
4238
--cov-report xml:.test-results/pytest/cov.xml \
4339
--no-cov-on-fail}
44-
install_command =
45-
{envpython} -m \
46-
pip install \
47-
{opts} \
48-
{packages}
4940
passenv =
5041
CURL_CA_BUNDLE # https proxies, https://github.com/tox-dev/tox/issues/1437
5142
FORCE_COLOR
@@ -67,6 +58,9 @@ setenv =
6758
FORCE_COLOR = 1
6859
allowlist_externals =
6960
sh
61+
# both options needed to workaround https://github.com/tox-dev/tox/issues/2197
62+
usedevelop = false
63+
skip_install = true
7064

7165
[testenv:lint]
7266
description = Run all linters
@@ -103,6 +97,7 @@ commands =
10397
description = Builds docs
10498
basepython = python3
10599
deps =
100+
--editable .[yamllint]
106101
-r{toxinidir}/docs/requirements.in
107102
setenv =
108103
PIP_CONSTRAINT = {toxinidir}/docs/requirements.txt
@@ -148,9 +143,9 @@ changedir = {[testenv:docs]changedir}
148143
description = Perform ecosystem impact (downstream testing) https://github.com/ansible-community/ansible-lint/discussions/1403
149144
commands =
150145
ansible-playbook -i localhost, playbooks/eco.yml
151-
extras =
152-
yamllint
153-
community
146+
deps =
147+
--editable .[yamllint]
148+
ansible-core
154149
setenv =
155150
ANSIBLE_FORCE_COLOR=1
156151
ANSIBLE_NOCOWS=1

0 commit comments

Comments
 (0)