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
Łukasz Nowak
slapos.buildout
Commits
2ceb0f98
Commit
2ceb0f98
authored
Jul 01, 2015
by
Reinout van Rees
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better, simpler fix than #250
parent
e46a3692
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 @
2ceb0f98
...
...
@@ -50,13 +50,6 @@ if PY3:
else
:
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
):
return
sep
,
end
,
file
...
...
@@ -1632,23 +1625,20 @@ def _open(base, filename, seen, dl_options, override, downloaded):
ignore_directories
=
'.svn'
,
'CVS'
,
'__pycache__'
_dir_hashes
=
{}
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
)
if
dir_hash
is
not
None
:
return
dir_hash
hash
=
md5
()
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
)
filenames
[:]
=
sorted
(
f
for
f
in
filenames
if
(
not
(
f
.
endswith
(
'pyc'
)
or
f
.
endswith
(
'pyo'
))
and
os
.
path
.
exists
(
os
.
path
.
join
(
dirpath
,
f
)))
)
hash
.
update
(
' '
.
join
(
dirnames
).
encode
(
'utf-8'
))
hash
.
update
(
' '
.
join
(
filenames
).
encode
(
'utf-8'
))
for_hash
=
' '
.
join
(
dirnames
+
filenames
)
if
isinstance
(
for_hash
,
text_type
):
for_hash
=
for_hash
.
encode
()
hash
.
update
(
for_hash
)
for
name
in
filenames
:
path
=
os
.
path
.
join
(
dirpath
,
name
)
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