Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
6d4e2388
Commit
6d4e2388
authored
Jan 19, 2020
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move test dependencies to package metadata.
parent
7cd8b496
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
14 deletions
+34
-14
setup.cfg
setup.cfg
+13
-0
tests/requirements.txt
tests/requirements.txt
+0
-12
tools/tox_pip.py
tools/tox_pip.py
+19
-1
tox.ini
tox.ini
+2
-1
No files found.
setup.cfg
View file @
6d4e2388
...
...
@@ -57,3 +57,16 @@ ssl =
wincertstore==0.2; sys_platform=='win32'
certs =
certifi==2016.9.26
tests =
mock
pytest-flake8
flake8-2020; python_version>="3.6"
virtualenv>=13.0.0
pytest-virtualenv>=1.2.7
pytest>=3.7
wheel
coverage>=4.5.1
pytest-cov>=2.5.1
paver; python_version>="3.6"
futures; python_version=="2.7"
pip>=19.1 # For proper file:// URLs support.
tests/requirements.txt
deleted
100644 → 0
View file @
7cd8b496
mock
pytest-flake8
flake8-2020; python_version>="3.6"
virtualenv>=13.0.0
pytest-virtualenv>=1.2.7
pytest>=3.7
wheel
coverage>=4.5.1
pytest-cov>=2.5.1
paver; python_version>="3.6"
futures; python_version=="2.7"
pip>=19.1 # For proper file:// URLs support.
tools/tox_pip.py
View file @
6d4e2388
import
os
import
subprocess
import
sys
import
re
def
remove_setuptools
():
...
...
@@ -20,12 +21,29 @@ def bootstrap():
subprocess
.
check_call
(
cmd
)
def
is_install_self
(
args
):
"""
Do the args represent an install of .?
"""
def
strip_extras
(
arg
):
match
=
re
.
match
(
r'(.*)?\
[.*
\]$'
,
arg
)
return
match
.
group
(
1
)
if
match
else
arg
return
(
'install'
in
args
and
any
(
arg
in
[
'.'
,
os
.
getcwd
()]
for
arg
in
map
(
strip_extras
,
args
)
)
)
def
pip
(
args
):
# Honor requires-python when installing test suite dependencies
if
any
(
'-r'
in
arg
for
arg
in
args
):
os
.
environ
[
'PIP_IGNORE_REQUIRES_PYTHON'
]
=
'0'
if
'.'
in
args
:
if
is_install_self
(
args
)
:
remove_setuptools
()
bootstrap
()
...
...
tox.ini
View file @
6d4e2388
...
...
@@ -13,7 +13,6 @@ requires =
pip
=
python {toxinidir}/tools/tox_pip.py
[testenv]
deps
=
-r{toxinidir}/tests/requirements.txt
pip_version
=
pip
install_command
=
{[helpers]pip} install {opts} {packages}
list_dependencies_command
=
{[helpers]pip} freeze --all
...
...
@@ -25,6 +24,8 @@ setenv =
passenv
=
APPDATA HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* NETWORK_REQUIRED
commands
=
pytest --cov-config={toxinidir}/tox.ini --cov-report= {posargs}
usedevelop
=
True
extras
=
tests
[testenv:coverage]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment