[C++-sig] Pyste default module names erroneously include path
paul.bridger
paul.bridger at paradise.net.nz
Sun May 30 02:42:23 CEST 2004
Not that you couldn't have done this yourself, but...
The problem is easily fixed in pyste.py, line 162:
if not module:
module = os.path.splitext(files[0])[0]
>>> files = ['monkey/moo.pyste']
>>> os.path.splitext(files[0])[0]
'monkey/moo'
>>> os.path.splitext(os.path.basename(files[0]))[0]
'moo'
Nicodemus wrote:
> Hi Paul,
>
> paul.bridger wrote:
>
>> When I run pyste from a parent directory to the target pyste file, and
>> don't specify the module name (eg. >pyste.py foo/bar.pyste), pyste
>> calculates the module name incorrectly as foo/bar.
>>
>> /* bar.cpp */
>> BOOST_PYTHON_MODULE(foo/bar)
>>
>> I'm not sure if it matters, but this is done from a python build script:
>> os.system('pyste.py --cache-dir=cache --pyste-ns=__hidden %s' %
>> (filename,))
>>
>
> I guess Pyste could be fixed to produce something more appropriate, but
> I think demanding the users to specify the module name is not that bad
> too. 8)
>
> Regards,
> Nicodemus.
>
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
>
>
More information about the Cplusplus-sig
mailing list