[Checkins] SVN: zc.sourcerelease/trunk/src/zc/sourcerelease/ Having
an absolute eggs-directory in buildout.cfg will now give an
Maurits van Rees
m.van.rees at zestsoftware.nl
Thu May 1 06:27:14 EDT 2008
Log message for revision 85975:
Having an absolute eggs-directory in buildout.cfg will now give an
error instead of running forever trying to find a relative path.
Changed:
U zc.sourcerelease/trunk/src/zc/sourcerelease/CHANGES.txt
U zc.sourcerelease/trunk/src/zc/sourcerelease/README.txt
U zc.sourcerelease/trunk/src/zc/sourcerelease/__init__.py
-=-
Modified: zc.sourcerelease/trunk/src/zc/sourcerelease/CHANGES.txt
===================================================================
--- zc.sourcerelease/trunk/src/zc/sourcerelease/CHANGES.txt 2008-05-01 10:27:13 UTC (rev 85974)
+++ zc.sourcerelease/trunk/src/zc/sourcerelease/CHANGES.txt 2008-05-01 10:27:13 UTC (rev 85975)
@@ -1,6 +1,15 @@
Release History
===============
+0.3 (unreleased)
+----------------
+
+Bugs Fixed
+++++++++++
+
+Having an absolute eggs-directory in buildout.cfg will now give an
+error instead of running forever trying to find a relative path.
+
0.2 (2007-10-25)
----------------
@@ -12,7 +21,7 @@
~/.buildout/default.cfg.
Bugs Fixed
-++++++++++++
+++++++++++
Non-standard eggs-directory settings weren't handled correctly.
Modified: zc.sourcerelease/trunk/src/zc/sourcerelease/README.txt
===================================================================
--- zc.sourcerelease/trunk/src/zc/sourcerelease/README.txt 2008-05-01 10:27:13 UTC (rev 85974)
+++ zc.sourcerelease/trunk/src/zc/sourcerelease/README.txt 2008-05-01 10:27:13 UTC (rev 85975)
@@ -244,7 +244,31 @@
>>> print system(join('svntest', 'svnsample', 'bin', 'sample')),
sample from svn called
+You can specify a different configuration file of course. Let's
+create one with an error as it contains an absolute path for the
+eggs-directory.
+ >>> write(sample, 'wrong.cfg',
+ ... '''
+ ... [buildout]
+ ... parts = sample
+ ... find-links = %(link_server)s
+ ... eggs-directory = /somewhere/shared-eggs
+ ...
+ ... [sample]
+ ... recipe = zc.recipe.egg
+ ... eggs = sample1
+ ... ''' % globals())
+
+We'll run the release script against this configuration file:
+
+ >>> print system(join('bin', 'buildout-source-release')
+ ... +' file://'+sample+' wrong.cfg'),
+ ... # doctest: +ELLIPSIS
+ Creating source release.
+ Invalid eggs directory (perhaps not a relative path) /somewhere/shared-eggs
+
+
.. [#zip_in_future] It is possible that an option will be added in the
future to generate zip files rather than tar archives.
Modified: zc.sourcerelease/trunk/src/zc/sourcerelease/__init__.py
===================================================================
--- zc.sourcerelease/trunk/src/zc/sourcerelease/__init__.py 2008-05-01 10:27:13 UTC (rev 85974)
+++ zc.sourcerelease/trunk/src/zc/sourcerelease/__init__.py 2008-05-01 10:27:13 UTC (rev 85975)
@@ -1,4 +1,4 @@
-##############################################################################
+#############################################################################
#
# Copyright (c) 2006 Zope Corporation and Contributors.
# All Rights Reserved.
@@ -40,7 +40,7 @@
break
to = d
- while path and path != to:
+ while path and path != to and path != '/':
path, base = os.path.split(path)
if base:
rel.insert(0, base)
@@ -85,7 +85,8 @@
eggs_directory = buildout['buildout']['eggs-directory']
reggs = _relative(eggs_directory, co1)
if reggs is None:
- print 'Invalid eggs directory', eggs_directory
+ print 'Invalid eggs directory (perhaps not a relative path)', \
+ eggs_directory
sys.exit(0)
buildout.bootstrap([])
More information about the Checkins
mailing list