[Pythonmac-SIG] bdist_mpkg with C sources
Bob Ippolito
bob at redivi.com
Tue Apr 5 20:19:21 CEST 2005
On Apr 5, 2005, at 12:56 PM, Robert Kern wrote:
> Jonathan Peirce wrote:
>> I'm wanting to make a mac installer for a python library I maintain
>> that contains some C extensions and I'm not clear how to go about it
>> since setup for bdist_mpkg doesn't accept ext_module.
>> Does anyone have a simple-ish example of how to do this? Or will it
>> be that bdist_mpkg will one day just act like the regular distutils
>> bdist? Obviously ideally I would like not to have a separate setup.py
>> for each platform I support - would be much nicer to have a single
>> script like the one below (which does successfully build a mac binary
>> distribution using bdist, just not the double-clickable installer)
>
> I have built upwards of 40-ish packages with extension modules and
> packaged them with bdist_mpkg. I have found no such problem. Can you
> describe the actual problem that you are seeing in more detail?
bdist_mpkg *is* a regular bdist. It invokes the "install" command, and
then pax'es up all the junk and puts it in a package.
Try this:
package_data_path=os.path.join(sys.prefix,
'lib','site-packages','psychopy')
bdist_mpkg doesn't currently assume that the directories you give it
are sys.prefix relative (maybe it should). I've never seen a package
that makes that assumption (and apparently neither has Robert).
-bob
More information about the Pythonmac-SIG
mailing list