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
3f34d4b0
Commit
3f34d4b0
authored
Jul 01, 2015
by
Reinout van Rees
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #252 from buildout/reinout-simpler-250-fix
Better, simpler fix than #250
parents
30365f43
2ceb0f98
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
14 deletions
+4
-14
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+4
-14
No files found.
src/zc/buildout/buildout.py
View file @
3f34d4b0
...
@@ -50,13 +50,6 @@ if PY3:
...
@@ -50,13 +50,6 @@ if PY3:
else
:
else
:
text_type
=
unicode
text_type
=
unicode
def
fs_to_text
(
fs_name
):
"""Return filesystem name always as unicode(2)/str(3)."""
if
not
isinstance
(
fs_name
,
text_type
):
fs_name
=
fs_name
.
decode
(
sys
.
getfilesystemencoding
(),
'surrogateescape'
)
return
fs_name
def
_print_options
(
sep
=
' '
,
end
=
'
\
n
'
,
file
=
None
):
def
_print_options
(
sep
=
' '
,
end
=
'
\
n
'
,
file
=
None
):
return
sep
,
end
,
file
return
sep
,
end
,
file
...
@@ -1638,23 +1631,20 @@ def _open(base, filename, seen, dl_options, override, downloaded):
...
@@ -1638,23 +1631,20 @@ def _open(base, filename, seen, dl_options, override, downloaded):
ignore_directories
=
'.svn'
,
'CVS'
,
'__pycache__'
ignore_directories
=
'.svn'
,
'CVS'
,
'__pycache__'
_dir_hashes
=
{}
_dir_hashes
=
{}
def
_dir_hash
(
dir
):
def
_dir_hash
(
dir
):
dir
=
fs_to_text
(
dir
)
# ^^^ fs_to_text ensures unicode, needed for os.walk() on python2 to work
# well with non-ascii filenames.
dir_hash
=
_dir_hashes
.
get
(
dir
,
None
)
dir_hash
=
_dir_hashes
.
get
(
dir
,
None
)
if
dir_hash
is
not
None
:
if
dir_hash
is
not
None
:
return
dir_hash
return
dir_hash
hash
=
md5
()
hash
=
md5
()
for
(
dirpath
,
dirnames
,
filenames
)
in
os
.
walk
(
dir
):
for
(
dirpath
,
dirnames
,
filenames
)
in
os
.
walk
(
dir
):
dirnames
[:]
=
[
fs_to_text
(
dirname
)
for
dirname
in
dirnames
]
filenames
[:]
=
[
fs_to_text
(
filename
)
for
filename
in
filenames
]
dirnames
[:]
=
sorted
(
n
for
n
in
dirnames
if
n
not
in
ignore_directories
)
dirnames
[:]
=
sorted
(
n
for
n
in
dirnames
if
n
not
in
ignore_directories
)
filenames
[:]
=
sorted
(
f
for
f
in
filenames
filenames
[:]
=
sorted
(
f
for
f
in
filenames
if
(
not
(
f
.
endswith
(
'pyc'
)
or
f
.
endswith
(
'pyo'
))
if
(
not
(
f
.
endswith
(
'pyc'
)
or
f
.
endswith
(
'pyo'
))
and
os
.
path
.
exists
(
os
.
path
.
join
(
dirpath
,
f
)))
and
os
.
path
.
exists
(
os
.
path
.
join
(
dirpath
,
f
)))
)
)
hash
.
update
(
' '
.
join
(
dirnames
).
encode
(
'utf-8'
))
for_hash
=
' '
.
join
(
dirnames
+
filenames
)
hash
.
update
(
' '
.
join
(
filenames
).
encode
(
'utf-8'
))
if
isinstance
(
for_hash
,
text_type
):
for_hash
=
for_hash
.
encode
()
hash
.
update
(
for_hash
)
for
name
in
filenames
:
for
name
in
filenames
:
path
=
os
.
path
.
join
(
dirpath
,
name
)
path
=
os
.
path
.
join
(
dirpath
,
name
)
if
name
==
'entry_points.txt'
:
if
name
==
'entry_points.txt'
:
...
...
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