-
Notifications
You must be signed in to change notification settings - Fork 13
/
setup.py
75 lines (61 loc) · 2.42 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
from os import path
from codecs import open
from setuptools import setup, Extension
try:
from Cython.Build import cythonize
except ImportError:
USE_CYTHON = False
else:
USE_CYTHON = True
# Compiled file extension to use. If we're not using Cython,
# just use the plain C file.
EXT = '.pyx' if USE_CYTHON else '.c'
heatshrink_module = Extension('heatshrink.core',
include_dirs=['.', './heatshrink/_heatshrink'],
extra_compile_args=['-std=c99'],
sources=['heatshrink/core' + EXT,
'heatshrink/_heatshrink/heatshrink_encoder.c',
'heatshrink/_heatshrink/heatshrink_decoder.c'])
if USE_CYTHON:
extensions = cythonize([heatshrink_module])
else:
extensions = [heatshrink_module]
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(name='Heatshrink',
version='0.3.2',
# Author details
author='Antonis Kalou @ JOHAN Sports',
author_email='antonis@johan-sports.com',
# Project details
description='Python bindings to the heatshrink library',
long_description=long_description,
url='https://github.com/johan-sports/pyheatshrink',
license='ISC',
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: System :: Archiving :: Compression',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: ISC License (ISCL)',
# Supported python versions
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
keywords='compression binding heatshrink LZSS',
test_suite='tests',
packages=['heatshrink'],
ext_modules=extensions)