-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
54 lines (48 loc) · 1.58 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
from setuptools import setup, Extension
import numpy
cython_exists = False
try:
from Cython.Distutils import build_ext
cython_exists = True
except ImportError:
from distutils.command.build_ext import build_ext
if cython_exists:
ext_modules=[
Extension("lz20c", ["lzhw/lz20c.pyx"]),
Extension("lzw_c", ["lzhw/lzw_c.pyx"]),
Extension("lz77c", ["lzhw/lz77c.pyx"],
include_dirs=[numpy.get_include()])
]
else:
ext_modules = [
Extension("lz20c", ["lzhw/lz20c.c"]),
Extension("lzw_c", ["lzhw/lzw_c.c"]),
Extension("lz77c", ["lzhw/lz77c.c"],
include_dirs=[numpy.get_include()])
]
with open("README.md", "r", encoding="utf8") as rm:
readme = rm.read()
with open("requirements.txt") as rq:
requirements = rq.read().split('\n')
setup(
name="lzhw",
version="1.1.17",
description="Compression suite for data frames and tabular data files, csv, excel etc.",
packages=["lzhw"],
install_requires=requirements,
long_description=readme,
include_package_data=True,
long_description_content_type="text/markdown",
url="https://github.com/MNoorFawi/lzhw",
author="Muhammad N. Fawi",
author_email="[email protected]",
cmdclass = {"build_ext": build_ext},
license="MIT",
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
ext_modules = ext_modules
)