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
059971ab
Commit
059971ab
authored
Oct 16, 2006
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
You can now create develop eggs for setup scripts that don't use setuptools.
parent
a4abc524
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
20 deletions
+57
-20
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+30
-20
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+27
-0
No files found.
src/zc/buildout/buildout.py
View file @
059971ab
...
...
@@ -420,16 +420,7 @@ class Buildout(dict):
setup
=
os
.
path
.
join
(
setup
,
'setup.py'
)
self
.
_logger
.
info
(
"Develop: %s"
,
setup
)
os
.
chdir
(
os
.
path
.
dirname
(
setup
))
args
=
[
zc
.
buildout
.
easy_install
.
_safe_arg
(
setup
),
'-q'
,
'develop'
,
'-mxN'
,
'-f'
,
zc
.
buildout
.
easy_install
.
_safe_arg
(
' '
.
join
(
self
.
_links
)
),
'-d'
,
zc
.
buildout
.
easy_install
.
_safe_arg
(
dest
),
]
if
self
.
_log_level
<=
logging
.
DEBUG
:
if
self
.
_log_level
==
logging
.
DEBUG
:
...
...
@@ -439,10 +430,32 @@ class Buildout(dict):
self
.
_logger
.
debug
(
"in: %s
\
n
%r"
,
os
.
path
.
dirname
(
setup
),
args
)
args
.
append
(
env
)
assert
os
.
spawnle
(
os
.
P_WAIT
,
sys
.
executable
,
sys
.
executable
,
*
args
)
==
0
fd
,
tsetup
=
tempfile
.
mkstemp
()
try
:
os
.
write
(
fd
,
runsetup_template
%
dict
(
setuptools
=
pkg_resources_loc
,
setupdir
=
os
.
path
.
dirname
(
setup
),
setup
=
setup
,
__file__
=
setup
,
))
args
=
[
zc
.
buildout
.
easy_install
.
_safe_arg
(
tsetup
),
'-q'
,
'develop'
,
'-mxN'
,
'-f'
,
zc
.
buildout
.
easy_install
.
_safe_arg
(
' '
.
join
(
self
.
_links
)
),
'-d'
,
zc
.
buildout
.
easy_install
.
_safe_arg
(
dest
),
]
assert
os
.
spawnl
(
os
.
P_WAIT
,
sys
.
executable
,
sys
.
executable
,
*
args
)
==
0
finally
:
os
.
close
(
fd
)
os
.
remove
(
tsetup
)
except
:
# if we had an error, we need to roll back changes, by
# removing any files we created.
...
...
@@ -452,6 +465,8 @@ class Buildout(dict):
for
f
in
os
.
listdir
(
dest
)
if
f
not
in
old_files
]))
raise
else
:
self
.
_sanity_check_develop_eggs_files
(
dest
,
old_files
)
return
'
\
n
'
.
join
([
os
.
path
.
join
(
dest
,
f
)
...
...
@@ -725,15 +740,10 @@ class Buildout(dict):
self
.
_logger
.
info
(
"Running setup script %s"
,
setup
)
setup
=
os
.
path
.
abspath
(
setup
)
setuptools
=
pkg_resources
.
working_set
.
find
(
pkg_resources
.
Requirement
.
parse
(
'setuptools'
)
).
location
fd
,
tsetup
=
tempfile
.
mkstemp
()
try
:
os
.
write
(
fd
,
runsetup_template
%
dict
(
setuptools
=
setuptools
,
setuptools
=
pkg_resources_loc
,
setupdir
=
os
.
path
.
dirname
(
setup
),
setup
=
setup
,
__file__
=
setup
,
...
...
src/zc/buildout/tests.py
View file @
059971ab
...
...
@@ -25,6 +25,33 @@ os_path_sep = os.path.sep
if
os_path_sep
==
'
\
\
'
:
os_path_sep
*=
2
def
develop_w_non_setuptools_setup_scripts
():
"""
We should be able to deal with setup scripts that aren't setuptools based.
>>> mkdir('foo')
>>> write('foo', 'setup.py',
... '''
... from distutils.core import setup
... setup(name="foo")
... ''')
>>> write('buildout.cfg',
... '''
... [buildout]
... develop = foo
... parts =
... ''')
>>> print system(join('bin', 'buildout')),
buildout: Develop: /sample-buildout/foo/setup.py
>>> ls('develop-eggs')
- foo.egg-link
"""
def
buildout_error_handling
():
r"""Buildout error handling
...
...
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