tbxi/setup.py

41 lines
1.4 KiB
Python
Raw Permalink Normal View History

2019-03-09 07:53:05 +00:00
from setuptools import setup, Extension
2019-06-11 08:39:49 +00:00
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
2019-03-09 07:53:05 +00:00
setup_args = dict(
name='tbxi',
2019-06-11 08:39:49 +00:00
long_description=long_description,
long_description_content_type='text/markdown',
2019-10-10 02:42:59 +00:00
version='0.12',
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-08-02 06:32:00 +00:00
install_requires=['macresources'],
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)