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
522d9598
Commit
522d9598
authored
Jun 18, 2009
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed usage of 'relative_paths' keyword parameter on Windows
parent
2be90f32
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
11 deletions
+19
-11
CHANGES.txt
CHANGES.txt
+2
-0
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+3
-2
src/zc/buildout/easy_install.txt
src/zc/buildout/easy_install.txt
+7
-5
src/zc/buildout/testing.py
src/zc/buildout/testing.py
+6
-4
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+1
-0
No files found.
CHANGES.txt
View file @
522d9598
...
...
@@ -14,6 +14,8 @@ Change History
tear down as it might disturb other packages reusing buildout's
testing infrastructure.
- fixed usage of 'relative_paths' keyword parameter on Windows
1.2.1 (2009-03-18)
==================
...
...
src/zc/buildout/easy_install.py
View file @
522d9598
...
...
@@ -967,9 +967,10 @@ def scripts(reqs, working_set, executable, dest,
def
_relative_path_and_setup
(
sname
,
path
,
relative_paths
):
if
relative_paths
:
sname
=
os
.
path
.
abspath
(
sname
)
relative_paths
=
os
.
path
.
normcase
(
relative_paths
)
sname
=
os
.
path
.
normcase
(
os
.
path
.
abspath
(
sname
))
spath
=
',
\
n
'
.
join
(
[
_relativitize
(
path_item
,
sname
,
relative_paths
)
[
_relativitize
(
os
.
path
.
normcase
(
path_item
)
,
sname
,
relative_paths
)
for
path_item
in
path
]
)
rpsetup
=
relative_paths_setup
...
...
src/zc/buildout/easy_install.txt
View file @
522d9598
...
...
@@ -717,9 +717,10 @@ Including extra paths in scripts
We can pass a keyword argument, extra paths, to cause additional paths
to be included in the a generated script:
>>> foo = tmpdir('foo')
>>> scripts = zc.buildout.easy_install.scripts(
... ['demo'], ws, sys.executable, bin, dict(demo='run'),
... extra_paths=[
'/foo/bar'
])
... extra_paths=[
foo
])
>>> cat(bin, 'run') # doctest: +NORMALIZE_WHITESPACE
#!/usr/local/bin/python2.4
...
...
@@ -728,7 +729,7 @@ to be included in the a generated script:
sys.path[0:0] = [
'/sample-install/demo-0.3-py2.4.egg',
'/sample-install/demoneeded-1.1-py2.4.egg',
'/foo
/bar
',
'/foo',
]
<BLANKLINE>
import eggrecipedemo
...
...
@@ -795,6 +796,7 @@ control this using the relative_paths option to install. You need
to pass a common base directory of the scripts and eggs:
>>> bo = tmpdir('bo')
>>> ba = tmpdir('ba')
>>> mkdir(bo, 'eggs')
>>> mkdir(bo, 'bin')
>>> mkdir(bo, 'other')
...
...
@@ -805,7 +807,7 @@ to pass a common base directory of the scripts and eggs:
>>> scripts = zc.buildout.easy_install.scripts(
... ['demo'], ws, sys.executable, join(bo, 'bin'), dict(demo='run'),
... extra_paths=[
os.path.sep+'foo'
, join(bo, 'bar')],
... extra_paths=[
ba
, join(bo, 'bar')],
... interpreter='py',
... relative_paths=bo)
...
...
@@ -822,7 +824,7 @@ to pass a common base directory of the scripts and eggs:
sys.path[0:0] = [
join(base, 'eggs/demo-0.3-pyN.N.egg'),
join(base, 'eggs/demoneeded-1.1-pyN.N.egg'),
'/
foo
',
'/
ba
',
join(base, 'bar'),
]
<BLANKLINE>
...
...
@@ -855,7 +857,7 @@ We specified an interpreter and its paths are adjusted too:
sys.path[0:0] = [
join(base, 'eggs/demo-0.3-pyN.N.egg'),
join(base, 'eggs/demoneeded-1.1-pyN.N.egg'),
'/
foo
',
'/
ba
',
join(base, 'bar'),
]
<BLANKLINE>
...
...
src/zc/buildout/testing.py
View file @
522d9598
...
...
@@ -86,6 +86,8 @@ def write(dir, *args):
fsync
(
f
.
fileno
())
f
.
close
()
## FIXME - check for other platforms
MUST_CLOSE_FDS
=
not
sys
.
platform
.
startswith
(
'win'
)
def
system
(
command
,
input
=
''
):
p
=
subprocess
.
Popen
(
command
,
...
...
@@ -93,7 +95,7 @@ def system(command, input=''):
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
close_fds
=
not
is_win32
)
close_fds
=
MUST_CLOSE_FDS
)
i
,
o
,
e
=
(
p
.
stdin
,
p
.
stdout
,
p
.
stderr
)
if
input
:
i
.
write
(
input
)
...
...
@@ -146,7 +148,7 @@ def find_python(version):
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
,
close_fds
=
True
)
close_fds
=
MUST_CLOSE_FDS
)
i
,
o
=
(
p
.
stdin
,
p
.
stdout
)
i
.
close
()
e
=
o
.
read
().
strip
()
...
...
@@ -159,7 +161,7 @@ def find_python(version):
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
,
close_fds
=
True
)
close_fds
=
MUST_CLOSE_FDS
)
i
,
o
=
(
p
.
stdin
,
p
.
stdout
)
i
.
close
()
e
=
o
.
read
().
strip
()
...
...
@@ -171,7 +173,7 @@ def find_python(version):
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
,
close_fds
=
True
)
close_fds
=
MUST_CLOSE_FDS
)
i
,
o
=
(
p
.
stdin
,
p
.
stdout
)
i
.
close
()
e
=
o
.
read
().
strip
()
...
...
src/zc/buildout/tests.py
View file @
522d9598
...
...
@@ -2808,6 +2808,7 @@ def test_suite():
normalize_bang,
(re.compile('
extdemo
[.]
pyd
'), '
extdemo
.
so
'),
(re.compile('
[
-
d
]
setuptools
-
\
S
+
[.]
egg
'), '
setuptools
.
egg
'),
(re.compile(r'
\\
[
\\
]
?
'), '
/
'),
]),
),
doctest.DocTestSuite(
...
...
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