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
Jérome Perrin
slapos.buildout
Commits
dc84fc82
Commit
dc84fc82
authored
Sep 04, 2009
by
Reinout van Rees
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Got correct script to be written
parent
34eeaf23
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+9
-2
src/zc/buildout/easy_install.txt
src/zc/buildout/easy_install.txt
+9
-1
No files found.
src/zc/buildout/easy_install.py
View file @
dc84fc82
...
...
@@ -966,7 +966,6 @@ def scripts(reqs, working_set, executable, dest,
initialization
,
rpsetup
)
)
# TODO: integrate distutils_scripts
for
name
,
full_script_path
in
distutils_scripts
:
if
scripts
is
not
None
:
sname
=
scripts
.
get
(
name
)
...
...
@@ -990,6 +989,7 @@ def scripts(reqs, working_set, executable, dest,
return
generated
def
_relative_path_and_setup
(
sname
,
path
,
relative_paths
):
if
relative_paths
:
relative_paths
=
os
.
path
.
normcase
(
relative_paths
)
...
...
@@ -1019,6 +1019,7 @@ def _relative_depth(common, path):
path
=
dirname
return
n
def
_relative_path
(
common
,
path
):
r
=
[]
while
1
:
...
...
@@ -1032,6 +1033,7 @@ def _relative_path(common, path):
r
.
reverse
()
return
os
.
path
.
join
(
*
r
)
def
_relativitize
(
path
,
script
,
relative_paths
):
if
path
==
script
:
raise
AssertionError
(
"path == script"
)
...
...
@@ -1068,7 +1070,12 @@ def _script(module_name, attrs, path, dest, executable, arguments,
def
_distutils_script
(
path
,
dest
,
original_file
,
executable
,
initialization
,
rsetup
):
original_content
=
"TODO, strip first line from original_file"
lines
=
open
(
original_file
).
readlines
()
if
not
(
'#!'
in
lines
[
0
])
and
(
'python'
in
lines
[
0
]):
# The script doesn't follow distutil's rules. Ignore it.
return
[]
original_content
=
''
.
join
(
lines
[
1
:])
# TODO: does this work OK with non-ascii characters?
contents
=
distutils_script_template
%
dict
(
python
=
_safe_arg
(
executable
),
path
=
path
,
...
...
src/zc/buildout/easy_install.txt
View file @
dc84fc82
...
...
@@ -935,7 +935,15 @@ python interpreter. Buildout does the same, but additionally also adds the
sys.path like for the console_scripts:
>>> cat(distbin, 'distutilsscript')
TODO
#!/usr/local/bin/python2.4
<BLANKLINE>
import sys
sys.path[0:0] = [
'/distutilsscriptdir/other-1.0-pyN.N.egg',
]
<BLANKLINE>
<BLANKLINE>
print "distutils!"
Handling custom build options for extensions provided in source distributions
...
...
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