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
Rafael Monnerat
slapos.buildout
Commits
b9138c32
Commit
b9138c32
authored
Jul 22, 2012
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests (except for 1 that should fail) passing on Python (Mac OS X) 2.4-2.7, 3.2
parent
7b6fa058
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
50 additions
and
20 deletions
+50
-20
bootstrap/bootstrap.py
bootstrap/bootstrap.py
+4
-1
buildout.cfg
buildout.cfg
+5
-0
dev.py
dev.py
+4
-1
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+8
-3
src/zc/buildout/download.py
src/zc/buildout/download.py
+13
-12
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+8
-0
src/zc/buildout/easy_install.txt
src/zc/buildout/easy_install.txt
+5
-1
src/zc/buildout/rmtree.py
src/zc/buildout/rmtree.py
+1
-1
src/zc/buildout/testing.py
src/zc/buildout/testing.py
+2
-1
No files found.
bootstrap/bootstrap.py
View file @
b9138c32
...
@@ -57,7 +57,10 @@ options, args = parser.parse_args()
...
@@ -57,7 +57,10 @@ options, args = parser.parse_args()
# handle -S
# handle -S
def
normpath
(
p
):
def
normpath
(
p
):
return
p
[:
-
1
]
if
p
.
endswith
(
os
.
path
.
sep
)
else
p
if
p
.
endswith
(
os
.
path
.
sep
):
return
p
[:
-
1
]
else
:
return
p
nosite
=
'site'
not
in
sys
.
modules
nosite
=
'site'
not
in
sys
.
modules
if
nosite
:
if
nosite
:
...
...
buildout.cfg
View file @
b9138c32
[buildout]
[buildout]
develop = zc.recipe.egg_ .
develop = zc.recipe.egg_ .
parts = test oltest py
parts = test oltest py
versions = versions
[versions]
zope.interface = 3.8.0
zope.exceptions = 3.7.1
[py]
[py]
recipe = zc.recipe.egg
recipe = zc.recipe.egg
...
...
dev.py
View file @
b9138c32
...
@@ -30,7 +30,10 @@ if os.path.isdir('build'):
...
@@ -30,7 +30,10 @@ if os.path.isdir('build'):
# handle -S
# handle -S
def
normpath
(
p
):
def
normpath
(
p
):
return
p
[:
-
1
]
if
p
.
endswith
(
os
.
path
.
sep
)
else
p
if
p
.
endswith
(
os
.
path
.
sep
):
return
p
[:
-
1
]
else
:
return
p
nosite
=
'site'
not
in
sys
.
modules
nosite
=
'site'
not
in
sys
.
modules
if
nosite
:
if
nosite
:
...
...
src/zc/buildout/buildout.py
View file @
b9138c32
...
@@ -19,7 +19,11 @@ import zc.buildout.easy_install
...
@@ -19,7 +19,11 @@ import zc.buildout.easy_install
no_site
=
zc
.
buildout
.
easy_install
.
no_site
no_site
=
zc
.
buildout
.
easy_install
.
no_site
from
zc.buildout.rmtree
import
rmtree
from
zc.buildout.rmtree
import
rmtree
from
hashlib
import
md5
try
:
from
hashlib
import
md5
except
ImportError
:
from
md5
import
md5
try
:
try
:
from
UserDict
import
DictMixin
from
UserDict
import
DictMixin
...
@@ -729,8 +733,9 @@ class Buildout(DictMixin):
...
@@ -729,8 +733,9 @@ class Buildout(DictMixin):
def
_read_installed_part_options
(
self
):
def
_read_installed_part_options
(
self
):
old
=
self
[
'buildout'
][
'installed'
]
old
=
self
[
'buildout'
][
'installed'
]
if
old
and
os
.
path
.
isfile
(
old
):
if
old
and
os
.
path
.
isfile
(
old
):
with
open
(
old
)
as
fp
:
fp
=
open
(
old
)
sections
=
zc
.
buildout
.
configparser
.
parse
(
fp
,
old
)
sections
=
zc
.
buildout
.
configparser
.
parse
(
fp
,
old
)
fp
.
close
()
result
=
{}
result
=
{}
for
section
,
options
in
sections
.
items
():
for
section
,
options
in
sections
.
items
():
for
option
,
value
in
options
.
items
():
for
option
,
value
in
options
.
items
():
...
...
src/zc/buildout/download.py
View file @
b9138c32
...
@@ -182,18 +182,19 @@ class Download(object):
...
@@ -182,18 +182,19 @@ class Download(object):
self
.
logger
.
info
(
'Downloading %s'
%
url
)
self
.
logger
.
info
(
'Downloading %s'
%
url
)
handle
,
tmp_path
=
tempfile
.
mkstemp
(
prefix
=
'buildout-'
)
handle
,
tmp_path
=
tempfile
.
mkstemp
(
prefix
=
'buildout-'
)
try
:
try
:
tmp_path
,
headers
=
urlretrieve
(
url
,
tmp_path
)
try
:
if
not
check_md5sum
(
tmp_path
,
md5sum
):
tmp_path
,
headers
=
urlretrieve
(
url
,
tmp_path
)
raise
ChecksumError
(
if
not
check_md5sum
(
tmp_path
,
md5sum
):
'MD5 checksum mismatch downloading %r'
%
url
)
raise
ChecksumError
(
except
IOError
:
'MD5 checksum mismatch downloading %r'
%
url
)
e
=
sys
.
exc_info
()[
1
]
except
IOError
:
os
.
remove
(
tmp_path
)
e
=
sys
.
exc_info
()[
1
]
raise
zc
.
buildout
.
UserError
(
"Error downloading extends for URL "
os
.
remove
(
tmp_path
)
"%s: %s"
%
(
url
,
e
))
raise
zc
.
buildout
.
UserError
(
"Error downloading extends for URL "
except
Exception
:
"%s: %s"
%
(
url
,
e
))
os
.
remove
(
tmp_path
)
except
Exception
:
raise
os
.
remove
(
tmp_path
)
raise
finally
:
finally
:
os
.
close
(
handle
)
os
.
close
(
handle
)
...
...
src/zc/buildout/easy_install.py
View file @
b9138c32
...
@@ -1195,8 +1195,16 @@ runsetup_template = """
...
@@ -1195,8 +1195,16 @@ runsetup_template = """
import sys
import sys
sys.path.insert(0, %(setupdir)r)
sys.path.insert(0, %(setupdir)r)
sys.path.insert(0, %(distribute)r)
sys.path.insert(0, %(distribute)r)
nosite = 'site' not in sys.modules
original_path = sys.path[:]
import os, setuptools
import os, setuptools
if nosite and ('site' in sys.modules):
sys.path[:] = original_path
del sys.modules['site']
__file__ = %(__file__)r
__file__ = %(__file__)r
os.chdir(%(setupdir)r)
os.chdir(%(setupdir)r)
...
...
src/zc/buildout/easy_install.txt
View file @
b9138c32
...
@@ -668,7 +668,11 @@ We have a link server that has a number of eggs:
...
@@ -668,7 +668,11 @@ We have a link server that has a number of eggs:
For Python 2.5 and higher, you can also use the -m option to run a
For Python 2.5 and higher, you can also use the -m option to run a
module:
module:
>>> print_(system(join(bin, 'py')+' -m pdb'), end='') # doctest: +ELLIPSIS
>>> if sys.version_info < (2, 5):
... print ('usage: pdb.py blah blah blah')
... else:
... print_(system(join(bin, 'py')+' -m pdb'), end='')
... # doctest: +ELLIPSIS
usage: pdb.py ...
usage: pdb.py ...
>>> print_(system(join(bin, 'py')+' -m pdb what'), end='')
>>> print_(system(join(bin, 'py')+' -m pdb what'), end='')
...
...
src/zc/buildout/rmtree.py
View file @
b9138c32
...
@@ -42,7 +42,7 @@ def rmtree (path):
...
@@ -42,7 +42,7 @@ def rmtree (path):
and make it unwriteable
and make it unwriteable
>>> os.chmod (foo,
0o400)
>>> os.chmod (foo,
256) # 0400
rmtree should be able to remove it:
rmtree should be able to remove it:
...
...
src/zc/buildout/testing.py
View file @
b9138c32
...
@@ -404,7 +404,8 @@ def wait(port, up):
...
@@ -404,7 +404,8 @@ def wait(port, up):
s
.
close
()
s
.
close
()
if
up
:
if
up
:
break
break
except
socket
.
error
as
e
:
except
socket
.
error
:
e
=
sys
.
exc_info
()[
1
]
if
e
[
0
]
not
in
(
errno
.
ECONNREFUSED
,
errno
.
ECONNRESET
):
if
e
[
0
]
not
in
(
errno
.
ECONNREFUSED
,
errno
.
ECONNRESET
):
raise
raise
s
.
close
()
s
.
close
()
...
...
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