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
7956986e
Commit
7956986e
authored
Nov 13, 2019
by
Benoit Pierre
Committed by
GitHub
Nov 13, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1864 from benoit-pierre/improve_workaround_for_1644
improve workaround for #1644
parents
705d41e4
0d831c90
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
8 deletions
+38
-8
pytest.ini
pytest.ini
+1
-1
tests/requirements.txt
tests/requirements.txt
+0
-1
tools/tox_pip.py
tools/tox_pip.py
+29
-0
tox.ini
tox.ini
+8
-6
No files found.
pytest.ini
View file @
7956986e
[pytest]
addopts
=
--doctest-modules --doctest-glob=pkg_resources/api_tests.txt -r sxX
norecursedirs
=
dist build *.egg setuptools/extern pkg_resources/extern .*
norecursedirs
=
dist build *.egg setuptools/extern pkg_resources/extern
tools
.*
flake8-ignore
=
setuptools/site-patch.py
F821
setuptools/py*compat.py
F811
...
...
tests/requirements.txt
View file @
7956986e
...
...
@@ -9,4 +9,3 @@ coverage>=4.5.1
pytest-cov>=2.5.1
paver; python_version>="3.6"
futures; python_version=="2.7"
pip==18.1 # Temporary workaround for #1644.
tools/tox_pip.py
0 → 100644
View file @
7956986e
import
os
import
shutil
import
subprocess
import
sys
from
glob
import
glob
VIRTUAL_ENV
=
os
.
environ
[
'VIRTUAL_ENV'
]
TOX_PIP_DIR
=
os
.
path
.
join
(
VIRTUAL_ENV
,
'pip'
)
def
pip
(
args
):
# First things first, get a recent (stable) version of pip.
if
not
os
.
path
.
exists
(
TOX_PIP_DIR
):
subprocess
.
check_call
([
sys
.
executable
,
'-m'
,
'pip'
,
'--disable-pip-version-check'
,
'install'
,
'-t'
,
TOX_PIP_DIR
,
'pip'
])
shutil
.
rmtree
(
glob
(
os
.
path
.
join
(
TOX_PIP_DIR
,
'pip-*.dist-info'
))[
0
])
# And use that version.
for
n
,
a
in
enumerate
(
args
):
if
not
a
.
startswith
(
'-'
):
if
a
in
'install'
and
'-e'
in
args
[
n
:]:
args
.
insert
(
n
+
1
,
'--no-use-pep517'
)
break
subprocess
.
check_call
([
sys
.
executable
,
os
.
path
.
join
(
TOX_PIP_DIR
,
'pip'
)]
+
args
)
if
__name__
==
'__main__'
:
pip
(
sys
.
argv
[
1
:])
tox.ini
View file @
7956986e
...
...
@@ -7,14 +7,16 @@
[tox]
envlist
=
python
[helpers]
# Wrapper for calls to pip that make sure the version being used is a
# up-to-date, and to prevent the current working directory from being
# added to `sys.path`.
pip
=
python {toxinidir}/tools/tox_pip.py
[testenv]
deps
=
-rtests/requirements.txt
# Changed from default (`python -m pip ...`)
# to prevent the current working directory
# from being added to `sys.path`.
install_command
=
python -c 'import sys; sys.path.remove(""); from pkg_resources import load_entry_point; load_entry_point("pip", "console_scripts", "pip")()' install {opts} {packages}
# Same as above.
list_dependencies_command
=
{envbindir}/pip freeze --all
install_command
=
{[helpers]pip} install {opts} {packages}
list_dependencies_command
=
{[helpers]pip} freeze --all
setenv
=
COVERAGE_FILE={toxworkdir}/.coverage.{envname}
# TODO: The passed environment variables came from copying other tox.ini files
# These should probably be individually annotated to explain what needs them.
...
...
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