Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
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
Libraries
fmt
Commits
5e70843a
Commit
5e70843a
authored
May 31, 2016
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't fail if a package was not found
parent
d25e0766
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
doc/build.py
doc/build.py
+8
-5
No files found.
doc/build.py
View file @
5e70843a
...
...
@@ -10,11 +10,14 @@ def pip_install(package, commit=None, **kwargs):
"Install package using pip."
min_version
=
kwargs
.
get
(
'min_version'
)
if
min_version
:
from
pkg_resources
import
get_distribution
from
pkg_resources
import
get_distribution
,
DistributionNotFound
try
:
installed_version
=
get_distribution
(
os
.
path
.
basename
(
package
)).
version
if
LooseVersion
(
installed_version
)
>=
min_version
:
print
(
'{} {} already installed'
.
format
(
package
,
min_version
))
return
except
DistributionNotFound
:
pass
if
commit
:
package
=
'git+git://github.com/{0}.git@{1}'
.
format
(
package
,
commit
)
print
(
'Installing {}'
.
format
(
package
))
...
...
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