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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xavier Thompson
slapos.buildout
Commits
5fbec349
Commit
5fbec349
authored
Jul 27, 2017
by
Rafael Oliveira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PEP8
parent
2517f01c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
zc.recipe.egg_/src/zc/recipe/egg/egg.py
zc.recipe.egg_/src/zc/recipe/egg/egg.py
+8
-7
No files found.
zc.recipe.egg_/src/zc/recipe/egg/egg.py
View file @
5fbec349
...
@@ -19,7 +19,7 @@ import os
...
@@ -19,7 +19,7 @@ import os
import
re
import
re
import
sys
import
sys
import
zc.buildout.easy_install
import
zc.buildout.easy_install
import
zipfile
class
Eggs
(
object
):
class
Eggs
(
object
):
...
@@ -43,13 +43,13 @@ class Eggs(object):
...
@@ -43,13 +43,13 @@ class Eggs(object):
allow_hosts
=
b_options
[
'allow-hosts'
]
allow_hosts
=
b_options
[
'allow-hosts'
]
allow_hosts
=
tuple
([
host
.
strip
()
for
host
in
allow_hosts
.
split
(
'
\
n
'
)
allow_hosts
=
tuple
([
host
.
strip
()
for
host
in
allow_hosts
.
split
(
'
\
n
'
)
if
host
.
strip
()
!=
''
])
if
host
.
strip
()
!=
''
])
self
.
allow_hosts
=
allow_hosts
self
.
allow_hosts
=
allow_hosts
options
[
'eggs-directory'
]
=
b_options
[
'eggs-directory'
]
options
[
'eggs-directory'
]
=
b_options
[
'eggs-directory'
]
options
[
'_e'
]
=
options
[
'eggs-directory'
]
# backward compat.
options
[
'_e'
]
=
options
[
'eggs-directory'
]
# backward compat.
options
[
'develop-eggs-directory'
]
=
b_options
[
'develop-eggs-directory'
]
options
[
'develop-eggs-directory'
]
=
b_options
[
'develop-eggs-directory'
]
options
[
'_d'
]
=
options
[
'develop-eggs-directory'
]
# backward compat.
options
[
'_d'
]
=
options
[
'develop-eggs-directory'
]
# backward compat.
def
working_set
(
self
,
extra
=
()):
def
working_set
(
self
,
extra
=
()):
"""Separate method to just get the working set
"""Separate method to just get the working set
...
@@ -57,7 +57,6 @@ class Eggs(object):
...
@@ -57,7 +57,6 @@ class Eggs(object):
This is intended for reuse by similar recipes.
This is intended for reuse by similar recipes.
"""
"""
options
=
self
.
options
options
=
self
.
options
b_options
=
self
.
buildout
[
'buildout'
]
# Backward compat. :(
# Backward compat. :(
options
[
'executable'
]
=
sys
.
executable
options
[
'executable'
]
=
sys
.
executable
...
@@ -91,13 +90,14 @@ class Eggs(object):
...
@@ -91,13 +90,14 @@ class Eggs(object):
update
=
install
update
=
install
class
Scripts
(
Eggs
):
class
Scripts
(
Eggs
):
def
__init__
(
self
,
buildout
,
name
,
options
):
def
__init__
(
self
,
buildout
,
name
,
options
):
super
(
Scripts
,
self
).
__init__
(
buildout
,
name
,
options
)
super
(
Scripts
,
self
).
__init__
(
buildout
,
name
,
options
)
options
[
'bin-directory'
]
=
buildout
[
'buildout'
][
'bin-directory'
]
options
[
'bin-directory'
]
=
buildout
[
'buildout'
][
'bin-directory'
]
options
[
'_b'
]
=
options
[
'bin-directory'
]
# backward compat.
options
[
'_b'
]
=
options
[
'bin-directory'
]
# backward compat.
self
.
extra_paths
=
[
self
.
extra_paths
=
[
os
.
path
.
join
(
buildout
[
'buildout'
][
'directory'
],
p
.
strip
())
os
.
path
.
join
(
buildout
[
'buildout'
][
'directory'
],
p
.
strip
())
...
@@ -107,7 +107,6 @@ class Scripts(Eggs):
...
@@ -107,7 +107,6 @@ class Scripts(Eggs):
if
self
.
extra_paths
:
if
self
.
extra_paths
:
options
[
'extra-paths'
]
=
'
\
n
'
.
join
(
self
.
extra_paths
)
options
[
'extra-paths'
]
=
'
\
n
'
.
join
(
self
.
extra_paths
)
relative_paths
=
options
.
get
(
relative_paths
=
options
.
get
(
'relative-paths'
,
'relative-paths'
,
buildout
[
'buildout'
].
get
(
'relative-paths'
,
'false'
)
buildout
[
'buildout'
].
get
(
'relative-paths'
,
'false'
)
...
@@ -122,6 +121,7 @@ class Scripts(Eggs):
...
@@ -122,6 +121,7 @@ class Scripts(Eggs):
parse_entry_point
=
re
.
compile
(
parse_entry_point
=
re
.
compile
(
'([^=]+)=(
\
w+(?:[.]
\
w+)*):(
\
w+(?:[.]
\
w+)*)$'
'([^=]+)=(
\
w+(?:[.]
\
w+)*):(
\
w+(?:[.]
\
w+)*)$'
).
match
).
match
def
install
(
self
):
def
install
(
self
):
reqs
,
ws
=
self
.
working_set
()
reqs
,
ws
=
self
.
working_set
()
options
=
self
.
options
options
=
self
.
options
...
@@ -166,6 +166,7 @@ class Scripts(Eggs):
...
@@ -166,6 +166,7 @@ class Scripts(Eggs):
update
=
install
update
=
install
def
get_bool
(
options
,
name
,
default
=
False
):
def
get_bool
(
options
,
name
,
default
=
False
):
value
=
options
.
get
(
name
)
value
=
options
.
get
(
name
)
if
not
value
:
if
not
value
:
...
...
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