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
77fa2369
Commit
77fa2369
authored
Nov 15, 2019
by
Benoit Pierre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweak workaround for #1644
Work around buggy pip detection code for "pip.exe install/update pip ...".
parent
55994609
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
tools/tox_pip.py
tools/tox_pip.py
+10
-1
tox.ini
tox.ini
+1
-1
No files found.
tools/tox_pip.py
View file @
77fa2369
...
@@ -17,12 +17,21 @@ def pip(args):
...
@@ -17,12 +17,21 @@ def pip(args):
'pip'
])
'pip'
])
shutil
.
rmtree
(
glob
(
os
.
path
.
join
(
TOX_PIP_DIR
,
'pip-*.dist-info'
))[
0
])
shutil
.
rmtree
(
glob
(
os
.
path
.
join
(
TOX_PIP_DIR
,
'pip-*.dist-info'
))[
0
])
# And use that version.
# And use that version.
pypath
=
os
.
environ
.
get
(
'PYTHONPATH'
)
pypath
=
pypath
.
split
(
os
.
pathsep
)
if
pypath
is
not
None
else
[]
pypath
.
insert
(
0
,
TOX_PIP_DIR
)
os
.
environ
[
'PYTHONPATH'
]
=
os
.
pathsep
.
join
(
pypath
)
# Disable PEP 517 support when using editable installs.
for
n
,
a
in
enumerate
(
args
):
for
n
,
a
in
enumerate
(
args
):
if
not
a
.
startswith
(
'-'
):
if
not
a
.
startswith
(
'-'
):
if
a
in
'install'
and
'-e'
in
args
[
n
:]:
if
a
in
'install'
and
'-e'
in
args
[
n
:]:
args
.
insert
(
n
+
1
,
'--no-use-pep517'
)
args
.
insert
(
n
+
1
,
'--no-use-pep517'
)
break
break
subprocess
.
check_call
([
sys
.
executable
,
os
.
path
.
join
(
TOX_PIP_DIR
,
'pip'
)]
+
args
)
# Fix call for setuptools editable install.
for
n
,
a
in
enumerate
(
args
):
if
a
==
'.'
:
args
[
n
]
=
os
.
getcwd
()
subprocess
.
check_call
([
sys
.
executable
,
'-m'
,
'pip'
]
+
args
,
cwd
=
TOX_PIP_DIR
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
tox.ini
View file @
77fa2369
...
@@ -14,7 +14,7 @@ envlist=python
...
@@ -14,7 +14,7 @@ envlist=python
pip
=
python {toxinidir}/tools/tox_pip.py
pip
=
python {toxinidir}/tools/tox_pip.py
[testenv]
[testenv]
deps
=
-rtests/requirements.txt
deps
=
-r
{toxinidir}/
tests/requirements.txt
install_command
=
{[helpers]pip} install {opts} {packages}
install_command
=
{[helpers]pip} install {opts} {packages}
list_dependencies_command
=
{[helpers]pip} freeze --all
list_dependencies_command
=
{[helpers]pip} freeze --all
setenv
=
COVERAGE_FILE={toxworkdir}/.coverage.{envname}
setenv
=
COVERAGE_FILE={toxworkdir}/.coverage.{envname}
...
...
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