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
Boxiang Sun
slapos.buildout
Commits
125784d9
Commit
125784d9
authored
Aug 28, 2009
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixed:
Scripts run using generated interpreters didn't have __file__ set correctly.
parent
21b6e7a7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
CHANGES.txt
CHANGES.txt
+2
-0
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+2
-3
src/zc/buildout/easy_install.txt
src/zc/buildout/easy_install.txt
+13
-2
No files found.
CHANGES.txt
View file @
125784d9
...
...
@@ -20,6 +20,8 @@ Bugs fixed:
- Scripts generated with relative-paths eanbled couldn't be
symbolocally linked to other locations and still work.
- Scripts run using generated interpreters didn't have __file__ set correctly.
1.4.0 (2009-08-26)
==================
...
...
src/zc/buildout/easy_install.py
View file @
125784d9
...
...
@@ -16,8 +16,6 @@
This module provides a high-level Python API for installing packages.
It doesn't install scripts. It uses setuptools and requires it to be
installed.
$Id$
"""
import
distutils.errors
...
...
@@ -1140,7 +1138,8 @@ if len(sys.argv) > 1:
if _args:
sys.argv[:] = _args
execfile(sys.argv[0])
__file__ = _args[0]
execfile(__file__)
if _interactive:
import code
...
...
src/zc/buildout/easy_install.txt
View file @
125784d9
...
...
@@ -683,7 +683,8 @@ the path set:
<BLANKLINE>
if _args:
sys.argv[:] = _args
execfile(sys.argv[0])
__file__ = _args[0]
execfile(__file__)
<BLANKLINE>
if _interactive:
import code
...
...
@@ -691,6 +692,15 @@ the path set:
If invoked with a script name and arguments, it will run that script, instead.
>>> write('ascript', '''
... "demo doc"
... print sys.argv
... print (__name__, __file__, __doc__)
... ''')
>>> print system(join(bin, 'py')+' ascript a b c'),
['ascript', 'a', 'b', 'c']
('__main__', 'ascript', 'demo doc')
An additional argument can be passed to define which scripts to install
and to provide script names. The argument is a dictionary mapping
original script names to new script names.
...
...
@@ -874,7 +884,8 @@ We specified an interpreter and its paths are adjusted too:
<BLANKLINE>
if _args:
sys.argv[:] = _args
execfile(sys.argv[0])
__file__ = _args[0]
execfile(__file__)
<BLANKLINE>
if _interactive:
import code
...
...
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