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
isaak yansane-sisk
slapos.buildout
Commits
9adb6d40
Commit
9adb6d40
authored
Oct 14, 2015
by
Reinout van Rees
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added with..open for 2 files that are read plus an extra check
parent
999057b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+9
-3
No files found.
src/zc/buildout/easy_install.py
View file @
9adb6d40
...
...
@@ -904,15 +904,21 @@ def _detect_distutils_scripts(directory):
marker
=
'EASY-INSTALL-DEV-SCRIPT'
scripts_found
=
[]
for
filename
in
dir_contents
:
dev_script_content
=
open
(
os
.
path
.
join
(
directory
,
filename
)).
read
()
filepath
=
os
.
path
.
join
(
directory
,
filename
)
if
not
os
.
path
.
isfile
(
filepath
):
continue
with
open
(
filepath
)
as
fp
:
dev_script_content
=
fp
.
read
()
if
marker
in
dev_script_content
:
# The distutils bin script points at the actual file we need.
for
line
in
dev_script_content
.
splitlines
():
match
=
DUNDER_FILE_PATTERN
.
search
(
line
)
if
match
:
# The ``__file__ =`` line in the generated script points
# at the actual distutils script we need.
actual_script_filename
=
match
.
group
(
'filename'
)
actual_script_content
=
open
(
actual_script_
filename
)
.
read
()
with
open
(
actual_script_filename
)
as
fp
:
actual_script_
content
=
fp
.
read
()
scripts_found
.
append
([
filename
,
actual_script_content
])
if
scripts_found
:
...
...
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