Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
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
6
Merge Requests
6
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
slapos.buildout
Commits
9521ac53
Commit
9521ac53
authored
Jun 29, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always detect missing extras, and let buildout exit cleanly if we find them.
Also add the required changes to zc.recipe.egg.
parent
5df83961
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
12 deletions
+25
-12
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+16
-7
src/zc/buildout/easy_install.txt
src/zc/buildout/easy_install.txt
+1
-1
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+1
-3
zc.recipe.egg_/src/zc/recipe/egg/egg.py
zc.recipe.egg_/src/zc/recipe/egg/egg.py
+7
-1
No files found.
src/zc/buildout/easy_install.py
View file @
9521ac53
...
...
@@ -736,20 +736,29 @@ class Installer(object):
pkg_resources
.
VersionConflict
(
dist
,
req
),
ws
)
best
[
req
.
key
]
=
dist
if
self
.
_allow_unknown_extras
:
missing_requested
=
sorted
(
set
(
req
.
extras
)
-
set
(
dist
.
extras
)
missing_requested
=
sorted
(
set
(
req
.
extras
)
-
set
(
dist
.
extras
)
)
for
missing
in
missing_requested
:
logger
.
warning
(
'%s does not provide the extra
\
'
%s
\
'
'
,
dist
,
missing
)
for
missing
in
missing_requested
:
logger
.
warning
(
'%s does not provide the extra
\
'
%s
\
'
'
,
dist
,
missing
if
missing_requested
:
if
not
self
.
_allow_unknown_extras
:
raise
zc
.
buildout
.
UserError
(
"Couldn't find the required extras. Add 'allow-unknown-extras=true' "
"to the [buildout] configuration if this is acceptable."
)
extra_requirements
=
sorted
(
set
(
dist
.
extras
)
&
set
(
req
.
extras
)
)
else
:
extra_requirements
=
dist
.
requires
(
req
.
extras
)[::
-
1
]
for
extra_requirement
in
extra_requirements
:
self
.
_requirements_and_constraints
.
append
(
"Requirement of %s: %s"
%
(
...
...
src/zc/buildout/easy_install.txt
View file @
9521ac53
...
...
@@ -225,7 +225,7 @@ is an error.
... index=link_server+'index/')
Traceback (most recent call last):
...
U
nknownExtra: demo 0.3 has no such extra feature 'unknown_extra'
U
serError: Couldn't find the required extras. Add 'allow-unknown-extras=true' to the [buildout] configuration if this is acceptable.
We can pass the ``allow_unknown_extras`` argument to force the
installation to proceed.
...
...
src/zc/buildout/tests.py
View file @
9521ac53
...
...
@@ -3730,9 +3730,7 @@ def test_suite():
(re.compile(r'
\\
[
\\
]
?
'), '
/
'),
(re.compile('
(
\
n
?
)
-
([
a
-
zA
-
Z_
.
-
]
+
)
\
n
-
\\
2.
exe
\
n
'),
'
\\
1
-
\\
2
\
n
'),
(re.compile(r'
^
(
\
w
+
\
.)
*
(
UnknownExtra
:
)
'),
'
\
2
'),
]+(sys.version_info < (2, 5) and [
]+(sys.version_info < (2, 5) and [
(re.compile('
.
*
No
module
named
runpy
.
*
', re.S), ''),
(re.compile('
.
*
usage
:
pdb
.
py
scriptfile
.
*
', re.S), ''),
(re.compile('
.
*
Error
:
what
does
not
exist
.
*
', re.S), ''),
...
...
zc.recipe.egg_/src/zc/recipe/egg/egg.py
View file @
9521ac53
...
...
@@ -23,6 +23,8 @@ import re
import
sys
import
zc.buildout.easy_install
from
zc.buildout.buildout
import
bool_option
class
Eggs
(
object
):
...
...
@@ -82,6 +84,7 @@ class Eggs(object):
links
=
self
.
links
,
index
=
self
.
index
,
allow_hosts
=
self
.
allow_hosts
,
allow_unknown_extras
=
bool_option
(
buildout
[
'buildout'
],
'allow-unknown-extras'
)
)
return
orig_distributions
,
ws
...
...
@@ -127,6 +130,7 @@ class Eggs(object):
links
=
(),
index
=
None
,
allow_hosts
=
(
'*'
,),
allow_unknown_extras
=
False
,
):
"""Helper function to build a working set.
...
...
@@ -145,6 +149,7 @@ class Eggs(object):
tuple
(
links
),
index
,
tuple
(
allow_hosts
),
allow_unknown_extras
,
)
if
cache_key
not
in
cache_storage
:
if
offline
:
...
...
@@ -159,7 +164,8 @@ class Eggs(object):
index
=
index
,
path
=
[
develop_eggs_dir
],
newest
=
newest
,
allow_hosts
=
allow_hosts
)
allow_hosts
=
allow_hosts
,
allow_unknown_extras
=
allow_unknown_extras
)
ws
=
self
.
_sort_working_set
(
ws
)
cache_storage
[
cache_key
]
=
ws
...
...
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