forked from apendleton/python-lz4-cffi
-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
55 lines (46 loc) · 1.53 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
from setuptools import setup
from setuptools.command.install import install
from distutils.command.build import build
VERSION = (1, 0, 5)
VERSION_STR = '.'.join([str(x) for x in VERSION])
def get_ext_modules():
import lz4
return [lz4.ffi.verifier.get_extension()]
class CFFIBuild(build):
def finalize_options(self):
self.distribution.ext_modules = get_ext_modules()
build.finalize_options(self)
class CFFIInstall(install):
def finalize_options(self):
self.distribution.ext_modules = get_ext_modules()
install.finalize_options(self)
setup(
name='lz4-cffi',
version=VERSION_STR,
description='A port of the lz4tools package from to CFFI.',
long_description=open('README', 'r').read(),
author='Greg Bowyer',
author_email='[email protected]',
url='http://github.com/GregBowyer/lz4-cffi/',
packages=['lz4'],
tests_require=['nose>=1.0'],
test_suite='nose.collector',
install_requires=['cffi>=0.8'],
cmdclass={
'build': CFFIBuild,
'install': CFFIInstall,
},
setup_requires=['cffi>=0.8'],
include_package_data=False,
zip_safe=False,
package_data={'lz4': ['*.py', '*.c', '*.h']},
keywords=['lz4', 'pypy'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: BSD License',
'Intended Audience :: Developers',
'Programming Language :: C',
'Programming Language :: Python',
'Programming Language :: Python :: Implementation :: PyPy',
],
)