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
Łukasz Nowak
slapos.buildout
Commits
7c30a819
Commit
7c30a819
authored
Jan 15, 2013
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed: relative-paths weren't honored when bootstrapping or upgrading
(which is how the buildout script gets generated).
parent
f21a26be
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
93 additions
and
1 deletion
+93
-1
CHANGES.rst
CHANGES.rst
+3
-0
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+11
-1
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+31
-0
src/zc/buildout/update.txt
src/zc/buildout/update.txt
+48
-0
No files found.
CHANGES.rst
View file @
7c30a819
...
@@ -4,6 +4,9 @@ Change History
...
@@ -4,6 +4,9 @@ Change History
2.0.0b1 (2013-01-??)
2.0.0b1 (2013-01-??)
====================
====================
Fixed: relative-paths weren't honored when bootstrapping or upgrading
(which is how the buildout script gets generated).
Fixed: initialization code wasn't included in interpeter scripts.
Fixed: initialization code wasn't included in interpeter scripts.
Fixed: macro inheritance bug, https://github.com/buildout/buildout/pull/37
Fixed: macro inheritance bug, https://github.com/buildout/buildout/pull/37
...
...
src/zc/buildout/buildout.py
View file @
7c30a819
...
@@ -351,9 +351,15 @@ class Buildout(DictMixin):
...
@@ -351,9 +351,15 @@ class Buildout(DictMixin):
# Create buildout script
# Create buildout script
ws
=
pkg_resources
.
WorkingSet
(
entries
)
ws
=
pkg_resources
.
WorkingSet
(
entries
)
ws
.
require
(
'zc.buildout'
)
ws
.
require
(
'zc.buildout'
)
options
=
self
[
'buildout'
]
zc
.
buildout
.
easy_install
.
scripts
(
zc
.
buildout
.
easy_install
.
scripts
(
[
'zc.buildout'
],
ws
,
sys
.
executable
,
[
'zc.buildout'
],
ws
,
sys
.
executable
,
self
[
'buildout'
][
'bin-directory'
])
self
[
'buildout'
][
'bin-directory'
],
relative_paths
=
(
bool_option
(
options
,
'relative-paths'
,
False
)
and
options
[
'directory'
]
or
''
),
)
def
_init_config
(
self
,
config_file
,
args
):
def
_init_config
(
self
,
config_file
,
args
):
print_
(
'Creating %r.'
%
config_file
)
print_
(
'Creating %r.'
%
config_file
)
...
@@ -897,6 +903,10 @@ class Buildout(DictMixin):
...
@@ -897,6 +903,10 @@ class Buildout(DictMixin):
zc
.
buildout
.
easy_install
.
scripts
(
zc
.
buildout
.
easy_install
.
scripts
(
[
'zc.buildout'
],
ws
,
sys
.
executable
,
[
'zc.buildout'
],
ws
,
sys
.
executable
,
self
[
'buildout'
][
'bin-directory'
],
self
[
'buildout'
][
'bin-directory'
],
relative_paths
=
(
bool_option
(
options
,
'relative-paths'
,
False
)
and
options
[
'directory'
]
or
''
),
)
)
# Restart
# Restart
...
...
src/zc/buildout/tests.py
View file @
7c30a819
...
@@ -2751,6 +2751,37 @@ now works.
...
@@ -2751,6 +2751,37 @@ now works.
- python
- python
"""
"""
def
bootstrap_honors_relative_paths
():
"""
>>> working = tmpdir('working')
>>> cd(working)
>>> write('buildout.cfg',
... '''
... [buildout]
... parts =
... relative-paths = true
... ''')
>>> _ = system(buildout+' bootstrap')
>>> cat('bin', 'buildout')
#!/Users/jim/bin/python3.3
<BLANKLINE>
import os
<BLANKLINE>
join = os.path.join
base = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
base = os.path.dirname(base)
<BLANKLINE>
import sys
sys.path[0:0] = [
join(base, 'eggs/distribute-0.6.30-py2.7.egg'),
'/Users/jim/p/zc/buildout/2/src',
]
<BLANKLINE>
import zc.buildout.buildout
<BLANKLINE>
if __name__ == '__main__':
sys.exit(zc.buildout.buildout.main())
"""
######################################################################
######################################################################
...
...
src/zc/buildout/update.txt
View file @
7c30a819
...
@@ -184,3 +184,51 @@ directory:
...
@@ -184,3 +184,51 @@ directory:
Not upgrading because not running a local buildout command.
Not upgrading because not running a local buildout command.
>>> ls('bin')
>>> ls('bin')
.. The relative-paths option is honored:
>>> cd(sample_buildout)
>>> write(sample_buildout, 'buildout.cfg',
... """
... [buildout]
... find-links = %(new_releases)s
... index = %(new_releases)s
... parts = show-versions
... develop = showversions
... relative-paths = true
...
... [show-versions]
... recipe = showversions
... """ % dict(new_releases=new_releases))
>>> print_(system(buildout), end='')
Upgraded:
zc.buildout version 99.99,
distribute version 99.99;
restarting.
Generated script '/sample-buildout/bin/buildout'.
Develop: '/sample-buildout/showversions'
Unused options for buildout: 'relative-paths'.
Updating show-versions.
zc.buildout 99.99
distribute 99.99
>>> cat('bin', 'buildout')
#!/Users/jim/bin/python3.3
<BLANKLINE>
import os
<BLANKLINE>
join = os.path.join
base = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
base = os.path.dirname(base)
<BLANKLINE>
import sys
sys.path[0:0] = [
join(base, 'eggs/zc.buildout-99.99-py3.3.egg'),
join(base, 'eggs/distribute-99.99-py3.3.egg'),
]
<BLANKLINE>
import zc.buildout.buildout
<BLANKLINE>
if __name__ == '__main__':
sys.exit(zc.buildout.buildout.main())
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