forked from tomerfiliba-org/reedsolomon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
57 lines (48 loc) · 1.7 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
#!/usr/bin/env python
# See:
# https://docs.python.org/2/distutils/setupscript.html
# http://docs.cython.org/src/reference/compilation.html
# https://docs.python.org/2/extending/building.html
# http://docs.cython.org/src/userguide/source_files_and_compilation.html
try:
from setuptools import setup
from setuptools import Extension
except ImportError:
from distutils.core import setup
from distutils.extension import Extension
import os
try:
from Cython.Build import cythonize
USE_CYTHON = True
except ImportError:
USE_CYTHON = False
ext = '.pyx' if USE_CYTHON else '.c'
extensions = [
Extension('creedsolo', [os.path.join('creedsolo'+ext)]),
]
if USE_CYTHON: extensions = cythonize(extensions)
setup(name = "reedsolo",
version = "0.5",
description = "Pure-Python Reed Solomon encoder/decoder",
author = "Tomer Filiba",
author_email = "[email protected]",
license = "Public Domain",
url = "https://github.com/tomerfiliba/reedsolomon",
py_modules = ["reedsolo"],
platforms = ["POSIX", "Windows"],
long_description = open("README.rst", "r").read(),
classifiers = [
"Development Status :: 3 - Alpha",
"License :: Public Domain",
"Programming Language :: Python :: 2.5",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.0",
"Programming Language :: Python :: 3.1",
"Programming Language :: Python :: 3.2",
"Topic :: Communications",
"Topic :: Scientific/Engineering :: Mathematics",
],
ext_modules = extensions,
)