Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove setup.py #1762

Merged
merged 1 commit into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 2 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,6 @@ ci:
- pip-compile-docs-upgrade
- pip-compile-upgrade
repos:
- repo: local
hooks:
- id: immutable-setup-py
name: Verify that setup.py stays immutable
description: >-
This is a sanity check that makes sure that
the `setup.py` file isn't changed.
# Using Python here because using
# shell test does not seem to work in CIs:
entry: >-
sh -c 'git hash-object setup.py
|
python -c raise\ SystemExit\(input\(\)\ !=\ \"f6d1010b609cbe816d3ef652eee452d09d52979f\"\)
'
pass_filenames: false
language: system
files: >-
^setup\.py$
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.0.1
hooks:
Expand Down Expand Up @@ -138,7 +120,7 @@ repos:
hooks:
- id: pip-compile
name: pip-compile
entry: pip-compile -q --no-annotate --output-file=constraints.txt setup.py setup.cfg --extra test --extra yamllint --strip-extras
entry: pip-compile -q --no-annotate --output-file=constraints.txt setup.cfg --extra test --extra yamllint --strip-extras
language: system
files: ^(setup\.cfg|=constraints\.txt)$
pass_filenames: false
Expand All @@ -150,7 +132,7 @@ repos:
pass_filenames: false
- id: pip-compile-upgrade
name: pip-compile-upgrade
entry: pip-compile -q --upgrade --no-annotate --output-file=constraints.txt setup.py setup.cfg --extra test --extra yamllint --strip-extras
entry: pip-compile -q --upgrade --no-annotate --output-file=constraints.txt setup.cfg --extra test --extra yamllint --strip-extras
language: system
files: ^(setup\.cfg|=constraints\.txt)$
pass_filenames: false
Expand Down
2 changes: 1 addition & 1 deletion constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile --extra=test --extra=yamllint --no-annotate --output-file=constraints.txt --strip-extras setup.cfg setup.py
# pip-compile --extra=test --extra=yamllint --no-annotate --output-file=constraints.txt --strip-extras setup.cfg
#
attrs==21.2.0
bracex==2.2
Expand Down
5 changes: 0 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ package_dir =
packages = find:
zip_safe = False

# These are required during `setup.py` run:
setup_requires =
setuptools_scm>=1.15.0
setuptools_scm_git_archive>=1.0

# These are required in actual runtime:
install_requires =
# ansible-lint does not list ansible as direct dependency in order to
Expand Down
13 changes: 0 additions & 13 deletions setup.py

This file was deleted.

23 changes: 9 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,16 @@ requires =
setuptools >= 41.4.0
pip >= 19.3.0
skip_missing_interpreters = True
# `usedevelop = true` overrides `skip_install` instruction, it's unwanted
usedevelop = false

[testenv]
description =
Run the tests under {basepython} and
devel: ansible devel branch
ansible29: ansible 2.9
core: ansible-core 2.11+
extras =
yamllint
core: core
test
deps =
--editable .[yamllint,test]
core: ansible-core
ansible29: ansible>=2.9,<2.10
py: ansible-core>=2.11
devel: ansible-core @ git+https://github.com/ansible/ansible.git # GPLv3+
Expand All @@ -41,11 +37,6 @@ commands =
--cov-report term-missing:skip-covered \
--cov-report xml:.test-results/pytest/cov.xml \
--no-cov-on-fail}
install_command =
{envpython} -m \
pip install \
{opts} \
{packages}
passenv =
CURL_CA_BUNDLE # https proxies, https://github.com/tox-dev/tox/issues/1437
FORCE_COLOR
Expand All @@ -67,6 +58,9 @@ setenv =
FORCE_COLOR = 1
allowlist_externals =
sh
# both options needed to workaround https://github.com/tox-dev/tox/issues/2197
usedevelop = false
skip_install = true

[testenv:lint]
description = Run all linters
Expand Down Expand Up @@ -103,6 +97,7 @@ commands =
description = Builds docs
basepython = python3
deps =
--editable .[yamllint]
-r{toxinidir}/docs/requirements.in
setenv =
PIP_CONSTRAINT = {toxinidir}/docs/requirements.txt
Expand Down Expand Up @@ -148,9 +143,9 @@ changedir = {[testenv:docs]changedir}
description = Perform ecosystem impact (downstream testing) https://github.com/ansible-community/ansible-lint/discussions/1403
commands =
ansible-playbook -i localhost, playbooks/eco.yml
extras =
yamllint
community
deps =
--editable .[yamllint]
ansible-core
setenv =
ANSIBLE_FORCE_COLOR=1
ANSIBLE_NOCOWS=1
Expand Down