Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pip-deps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SCS
pip-deps
Commits
19f11fbf
Commit
19f11fbf
authored
6 years ago
by
Marek Chrastina
Browse files
Options
Downloads
Patches
Plain Diff
Upgrade pip first
parent
7ee2fedb
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1
Add py script
Pipeline
#8032
passed
6 years ago
Stage: test
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pipdeps/pipdeps.py
+5
-7
5 additions, 7 deletions
pipdeps/pipdeps.py
with
5 additions
and
7 deletions
pipdeps/pipdeps.py
+
5
−
7
View file @
19f11fbf
...
...
@@ -61,12 +61,6 @@ def check_requires_python(pyver, requires_python):
return
True
return
False
def
upgrade_pip
():
"""
pip install --upgrade pip
"""
subprocess
.
check_call
([
"
pip
"
,
"
install
"
,
"
--upgrade
"
,
"
pip
"
],
stderr
=
subprocess
.
STDOUT
)
def
upgrade_package
(
package
,
versions
):
"""
pip install --upgrade
"
<package><versions>
"
...
...
@@ -196,10 +190,14 @@ def main():
print
"
There is nothing to upgrade.
"
sys
.
exit
(
0
)
for
index
,
pkg
in
enumerate
(
upgradable_packages
):
if
pkg
[
'
package
'
]
==
'
pip
'
:
package
=
upgradable_packages
.
pop
(
index
)
upgrade_package
(
package
[
'
package
'
],
package
[
'
upgradable_version
'
])
try
:
package
=
upgradable_packages
.
pop
(
-
1
)
except
IndexError
:
upgrade_pip
()
break
upgrade_package
(
package
[
'
package
'
],
package
[
'
upgradable_version
'
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment