[Distutils] buildout directory computation change
kiorky
kiorky at cryptelium.net
Mon Jul 28 21:51:14 CEST 2008
Jim Fulton a écrit :
>
> On Jul 28, 2008, at 1:58 PM, Jim Fulton wrote:
>
>>
>> On Jul 28, 2008, at 1:14 PM, kiorky wrote:
>>
>>> Jim Fulton a écrit :
>>>> On Jul 28, 2008, at 11:28 AM, whit morriss wrote:
>>>>> it looks like something changes in how some vars (ie
>>>>> buildout:egg-directory) gets computed between 1.0.2 and 1.1.0
>>>>>
>>>>> OSError: [Errno 2] No such file or directory:
>>>>> '/Users/whit/dev/geo/alm3//Users/whit/dev/geo/alm3/develop-eggs'
>>>>>
>>>>> is the resulting error for:
>>>>>
>>>>> eggs-directory = ${buildout:directory}/develop-eggs
>>>>>
>>>>> instead of:
>>>>>
>>>>> '/Users/whit/dev/geo/alm3/develop-eggs'
>>>>>
>>>>> (which I believe works until at least 1.0.2)
>>>>>
>>>>> buildout seems to implicitly assume I want buildout:directory
>>>>> appended. is this a feature, bug, or something I can turn off?
>>>> The way buildout normalizes buildout paths did change in 1.1.0. I
>>>> haven't seen this error and can't see, in the code, while this error
>>>> would occur.
>>>> Can you provide a buildout I can use to reproduce this problem?
>>>> Jim
>>>> --
>>>> Jim Fulton
>>>> Zope Corporation
>>>> _______________________________________________
>>>> Distutils-SIG maillist - Distutils-SIG at python.org
>>>> http://mail.python.org/mailman/listinfo/distutils-sig
>>> I saw this problem which broke minitage too a week ago.
>>>
>>> Jim, you can see all the buildouts in there :
>>> http://trac.minitage.org/trac/browser
>>> like:http://trac.minitage.org/trac/browser/minitage/buildouts/dependencies/bzip2-1.0.4/buildout.cfg.
>>>
>>>
>>> They will all fail with zc.buildout >= 1.1
>>
>>
>> Not for me. :) I've tried on both Ubuntu and Mac OS X.
>
>
> But I've been able to create another buildout that seems to exhibit the
> same symptom.
>
> Jim
>
> --
> Jim Fulton
> Zope Corporation
>
>
You may have tested the fixed buildout ;) . see:
http://hg.minitage.org/hg/minitage/buildouts/dependencies/bzip2-1.0.4/file/2e3ea95738e5/buildout.cfg
By prefixing, yes i meaned to prepend the buildout path to the variables in buildout part
but i might not been enought clear.
The problem is not the join(), but with variables substition.
I may be wrong but it s how i understand things happen:
The sample buildout snippet:
[project]
foo = /abspath/a
[buildout]
eggs = ${project:foo}
Then we run buildout:
li.135
No substitution there, we use data.
>>> os.path.join(
'/abs/path/to/buildout/',
'${project:foo}')
'/abs/path/to/buildout/${project:foo}'
li.172
Substitution there, we use self['buildout']:
# '/abs/path/to/buildout/${project:foo}' -> '/abs/path/to/buildout//abspath/a'
>>> options['eggs'+'-directory']
'/abs/path/to/buildout//abspath/a'
>>> os.path.join(
'/abs/path/to/buildout/',
'/abs/path/to/buildout//abspath/a')
'/abs/path/to/buildout//abspath/a'
--
--
Cordialement,
KiOrKY
GPG Key FingerPrint: 0x1A1194B7681112AF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20080728/cd56a73b/attachment-0001.pgp>
More information about the Distutils-SIG
mailing list