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)
Thanks for any help,
Jon
---------
#!/usr/bin/env pythonw
from distutils.core import setup, Extension
import os
from sys import platform
local_path = 'psychopy'
if platform=='darwin':
package_data_path='/Library/Python/2.3/psychopy'
else:
package_data_path=os.path.join('psychopy')
import psychopy
#define the C extensions and platform-specific imports
cExtensions = []
if platform=='win32':
cExtensions.append(Extension('psychopy.ext._win32',
sources = [os.path.join(local_path,'_win32.c')],
library_dirs=[os.path.join(local_path,'ext')]))
elif platform=='darwin':
import py2app, bdist_mpkg
cExtensions.append(Extension('psychopy.ext._darwin',
sources = [os.path.join(local_path,'_darwin.m')],
extra_link_args=['OpenGL']))
#run the setup script
setup(name="PsychoPy",
version = psychopy.__version__,
description = "Psychophysics toolkit for Python",
author= psychopy.__author__,
author_email= psychopy.__author_email__,
url="http://www.psychopy.org/",
packages=['monitors'],
ext_modules = cExtensions,
data_files= [(package_data_path, [
os.path.join(local_path,'LICENSE.txt'),
os.path.join(local_path,'CHANGELOG.txt'),
os.path.join(local_path,'README.txt')]),
(os.path.join(package_data_path,'demos'), [
os.path.join(local_path,'face.jpg')])
]
)
This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig