2019-03-09 07:53:05 +00:00
|
|
|
from setuptools import setup, Extension
|
|
|
|
|
|
|
|
setup_args = dict(
|
|
|
|
name='tbxi',
|
2019-06-10 03:52:12 +00:00
|
|
|
version='0.4',
|
2019-03-09 07:53:05 +00:00
|
|
|
author='Elliot Nunn',
|
|
|
|
author_email='elliotnunn@fastmail.com',
|
2019-05-26 03:10:03 +00:00
|
|
|
description='Tools to compile and inspect Macintosh ROM images',
|
2019-03-09 07:53:05 +00:00
|
|
|
url='https://github.com/elliotnunn/tbxi',
|
|
|
|
classifiers=[
|
2019-05-05 13:33:24 +00:00
|
|
|
'Programming Language :: Python :: 3 :: Only',
|
2019-03-09 07:53:05 +00:00
|
|
|
'Programming Language :: C',
|
|
|
|
'Operating System :: OS Independent',
|
2019-05-05 13:33:24 +00:00
|
|
|
'Intended Audience :: Developers',
|
|
|
|
'Topic :: Software Development :: Build Tools',
|
|
|
|
'License :: OSI Approved :: MIT License',
|
2019-03-09 07:53:05 +00:00
|
|
|
],
|
2019-05-24 15:08:21 +00:00
|
|
|
zip_safe=True,
|
2019-03-09 07:53:05 +00:00
|
|
|
packages=['tbxi'],
|
2019-05-24 15:08:21 +00:00
|
|
|
entry_points=dict(console_scripts=['tbxi = tbxi.__main__:main']),
|
2019-03-09 07:53:05 +00:00
|
|
|
ext_modules=[Extension('tbxi.fast_lzss', ['speedups/fast_lzss.c'])],
|
|
|
|
)
|
|
|
|
|
|
|
|
# http://charlesleifer.com/blog/misadventures-in-python-packaging-optional-c-extensions/
|
|
|
|
|
|
|
|
# Yes, it might be a bit extreme to catch SystemExit to find a compiler error...
|
|
|
|
|
|
|
|
try:
|
|
|
|
setup(**setup_args)
|
|
|
|
except (SystemExit, Exception):
|
|
|
|
setup_args.pop('ext_modules')
|
|
|
|
setup(**setup_args)
|