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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.buildout
Commits
970ffc9e
Commit
970ffc9e
authored
Oct 21, 2015
by
Kazuhiko Shiozaki
Committed by
Julien Muchembled
Dec 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zc.recipe.egg: Support setup-eggs in :develop.
parent
b5397079
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
34 deletions
+43
-34
zc.recipe.egg_/src/zc/recipe/egg/custom.py
zc.recipe.egg_/src/zc/recipe/egg/custom.py
+39
-34
zc.recipe.egg_/src/zc/recipe/egg/custom.rst
zc.recipe.egg_/src/zc/recipe/egg/custom.rst
+4
-0
No files found.
zc.recipe.egg_/src/zc/recipe/egg/custom.py
View file @
970ffc9e
...
@@ -29,6 +29,8 @@ class Base:
...
@@ -29,6 +29,8 @@ class Base:
self
.
name
,
self
.
options
=
name
,
options
self
.
name
,
self
.
options
=
name
,
options
options
[
'_d'
]
=
buildout
[
'buildout'
][
'develop-eggs-directory'
]
options
[
'_d'
]
=
buildout
[
'buildout'
][
'develop-eggs-directory'
]
options
[
'_e'
]
=
buildout
[
'buildout'
][
'eggs-directory'
]
environment_section
=
options
.
get
(
'environment'
)
environment_section
=
options
.
get
(
'environment'
)
if
environment_section
:
if
environment_section
:
...
@@ -41,9 +43,28 @@ class Base:
...
@@ -41,9 +43,28 @@ class Base:
self
.
build_ext
=
build_ext
(
buildout
,
options
)
self
.
build_ext
=
build_ext
(
buildout
,
options
)
links
=
options
.
get
(
'find-links'
,
buildout
[
'buildout'
].
get
(
'find-links'
))
if
links
:
links
=
links
.
split
()
options
[
'find-links'
]
=
'
\
n
'
.
join
(
links
)
else
:
links
=
()
self
.
links
=
links
index
=
options
.
get
(
'index'
,
buildout
[
'buildout'
].
get
(
'index'
))
if
index
is
not
None
:
options
[
'index'
]
=
index
self
.
index
=
index
self
.
newest
=
buildout
[
'buildout'
].
get
(
'newest'
)
==
'true'
def
install
(
self
):
def
install
(
self
):
self
.
_set_environment
()
self
.
_set_environment
()
try
:
try
:
self
.
_install_setup_eggs
()
return
self
.
_install
()
return
self
.
_install
()
finally
:
finally
:
self
.
_restore_environment
()
self
.
_restore_environment
()
...
@@ -71,6 +92,24 @@ class Base:
...
@@ -71,6 +92,24 @@ class Base:
except
KeyError
:
except
KeyError
:
pass
pass
def
_install_setup_eggs
(
self
):
options
=
self
.
options
setup_eggs
=
[
r
.
strip
()
for
r
in
options
.
get
(
'setup-eggs'
,
''
).
split
(
'
\
n
'
)
if
r
.
strip
()]
if
setup_eggs
:
ws
=
zc
.
buildout
.
easy_install
.
install
(
setup_eggs
,
options
[
'_e'
],
links
=
self
.
links
,
index
=
self
.
index
,
executable
=
sys
.
executable
,
path
=
[
options
[
'_d'
],
options
[
'_e'
]],
newest
=
self
.
newest
,
)
extra_path
=
os
.
pathsep
.
join
(
ws
.
entries
)
self
.
environment
[
'PYTHONEXTRAPATH'
]
=
os
.
environ
[
'PYTHONEXTRAPATH'
]
=
extra_path
def
_get_patch_dict
(
self
,
options
,
distribution
):
def
_get_patch_dict
(
self
,
options
,
distribution
):
patch_dict
=
{}
patch_dict
=
{}
global_patch_binary
=
options
.
get
(
'patch-binary'
,
'patch'
)
global_patch_binary
=
options
.
get
(
'patch-binary'
,
'patch'
)
...
@@ -100,27 +139,9 @@ class Custom(Base):
...
@@ -100,27 +139,9 @@ class Custom(Base):
def
__init__
(
self
,
buildout
,
name
,
options
):
def
__init__
(
self
,
buildout
,
name
,
options
):
Base
.
__init__
(
self
,
buildout
,
name
,
options
)
Base
.
__init__
(
self
,
buildout
,
name
,
options
)
links
=
options
.
get
(
'find-links'
,
buildout
[
'buildout'
].
get
(
'find-links'
))
if
links
:
links
=
links
.
split
()
options
[
'find-links'
]
=
'
\
n
'
.
join
(
links
)
else
:
links
=
()
self
.
links
=
links
index
=
options
.
get
(
'index'
,
buildout
[
'buildout'
].
get
(
'index'
))
if
index
is
not
None
:
options
[
'index'
]
=
index
self
.
index
=
index
options
[
'_e'
]
=
buildout
[
'buildout'
][
'eggs-directory'
]
if
buildout
[
'buildout'
].
get
(
'offline'
)
==
'true'
:
if
buildout
[
'buildout'
].
get
(
'offline'
)
==
'true'
:
self
.
_install
=
lambda
:
()
self
.
_install
=
lambda
:
()
self
.
newest
=
buildout
[
'buildout'
].
get
(
'newest'
)
==
'true'
def
_install
(
self
):
def
_install
(
self
):
options
=
self
.
options
options
=
self
.
options
distribution
=
options
.
get
(
'egg'
)
distribution
=
options
.
get
(
'egg'
)
...
@@ -135,22 +156,6 @@ class Custom(Base):
...
@@ -135,22 +156,6 @@ class Custom(Base):
distribution
=
options
.
get
(
'egg'
,
options
.
get
(
'eggs'
,
self
.
name
)
distribution
=
options
.
get
(
'egg'
,
options
.
get
(
'eggs'
,
self
.
name
)
).
strip
()
).
strip
()
setup_eggs
=
[
r
.
strip
()
for
r
in
options
.
get
(
'setup-eggs'
,
''
).
split
(
'
\
n
'
)
if
r
.
strip
()]
if
setup_eggs
:
ws
=
zc
.
buildout
.
easy_install
.
install
(
setup_eggs
,
options
[
'_e'
],
links
=
self
.
links
,
index
=
self
.
index
,
executable
=
sys
.
executable
,
path
=
[
options
[
'_d'
],
options
[
'_e'
]],
newest
=
self
.
newest
,
)
extra_path
=
os
.
pathsep
.
join
(
ws
.
entries
)
self
.
environment
[
'PYTHONEXTRAPATH'
]
=
os
.
environ
[
'PYTHONEXTRAPATH'
]
=
extra_path
patch_dict
=
self
.
_get_patch_dict
(
options
,
distribution
)
patch_dict
=
self
.
_get_patch_dict
(
options
,
distribution
)
return
zc
.
buildout
.
easy_install
.
build
(
return
zc
.
buildout
.
easy_install
.
build
(
distribution
,
options
[
'_d'
],
self
.
build_ext
,
distribution
,
options
[
'_d'
],
self
.
build_ext
,
...
...
zc.recipe.egg_/src/zc/recipe/egg/custom.rst
View file @
970ffc9e
...
@@ -472,6 +472,10 @@ rpath
...
@@ -472,6 +472,10 @@ rpath
A new-line separated list of directories to search for dynamic libraries
A new-line separated list of directories to search for dynamic libraries
at run time.
at run time.
setup-eggs
A new-line separated list of eggs that need to be installed
beforehand. It is useful to meet the `setup_requires` requirement.
define
define
A comma-separated list of names of C preprocessor variables to
A comma-separated list of names of C preprocessor variables to
define.
define.
...
...
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