[Distutils] Distutils ignoring INSTALL_SCHEMES (or: How to put data files in PURELIB)
Phillip J. Eby
pje at telecommunity.com
Tue Oct 2 22:37:43 CEST 2007
At 01:53 PM 10/2/2007 -0400, Alexandre Gauthier wrote:
>Phillip J. Eby a écrit :
>>At 12:01 PM 10/2/2007 -0400, Alexandre Gauthier wrote:
>>>Hello there. I'm currently trying to package python bindings for a
>>>library. The bindings are currently compiled in an obscure way, so I end
>>>up with the following
>>>
>>>libmylib\__init__.py
>>>libmylib\mylib.pyd
>>>libmylib\dep.dll
>>>mylib.py
>>>
>>>Where mylib.py is the SWIG interface for mylib.pyd.
>>>
>>>Since I cannot have distutils compile the bindings at all, I'd like to
>>>just install the pyd and dll as "data files" along with the .py in
>>>"site-packages". That can be accomplished with the following:
>>>
>>>for scheme in INSTALL_SCHEMES.values():
>>> scheme['data'] = scheme['purelib']
>>
>>Don't do this. If you are using Python 2.4 or above, use this
>>option in setup():
>>
>>setup(
>> package_data = {'mylib': ['mylib.pyd', 'dep.dll']},
>> ...
>>)
>Thanks, but I tried this as well, and it doesn't seem to work...
>
>setup(
> .......
> py_modules = ['mylib'],
> packages = ['libmylib'],
> package_data = {'libmylib': ['_mylib.pyd', 'dep.dll']},
>)
>
>It only installs the package, the module but the two files I
>specified are nowhere to be found...
>Perhaps I am doing something wrong....?
Did you delete the build/ directory and re-build?
More information about the Distutils-SIG
mailing list