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
a8cbb422
Commit
a8cbb422
authored
Mar 12, 2011
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport of c120884 from trunk
parent
e335fcc7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
CHANGES.txt
CHANGES.txt
+2
-0
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+6
-1
No files found.
CHANGES.txt
View file @
a8cbb422
...
...
@@ -4,6 +4,8 @@ Change History
1.4.5 (unreleased)
==================
- Introduce a cache for the expensive `buildout._dir_hash` function.
- Remove duplicate path from script's sys.path setup.
Bugs fixed:
...
...
src/zc/buildout/buildout.py
View file @
a8cbb422
...
...
@@ -1371,7 +1371,11 @@ def _open(base, filename, seen, dl_options, override):
ignore_directories
=
'.svn'
,
'CVS'
_dir_hashes
=
{}
def
_dir_hash
(
dir
):
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
[:]
=
[
n
for
n
in
dirnames
if
n
not
in
ignore_directories
]
...
...
@@ -1383,7 +1387,8 @@ def _dir_hash(dir):
hash
.
update
(
' '
.
join
(
filenames
))
for
name
in
filenames
:
hash
.
update
(
open
(
os
.
path
.
join
(
dirpath
,
name
)).
read
())
return
hash
.
digest
().
encode
(
'base64'
).
strip
()
_dir_hashes
[
dir
]
=
dir_hash
=
hash
.
digest
().
encode
(
'base64'
).
strip
()
return
dir_hash
def
_dists_sig
(
dists
):
result
=
[]
...
...
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