forked from Iotic-Labs/py-lz4framed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
91 lines (84 loc) · 3.01 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Copyright (c) 2016 Iotic Labs Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://github.com/Iotic-Labs/py-lz4framed/blob/master/LICENSE
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# pylint: disable=import-error,wrong-import-order
from __future__ import print_function
# Allow for environments without setuptools
try:
from setuptools import setup, Extension
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, Extension
# For converting markdown README.md
try:
from pypandoc import convert
except ImportError:
READ_MD = lambda f: open(f, 'r').read()
print('Warning: pypandoc module not found, will not convert Markdown to RST')
else:
READ_MD = lambda f: convert(f, 'rst')
VERSION = '0.9.11'
setup(
name='py-lz4framed_ph4',
version=VERSION,
description='LZ4Frame library for Python (via C bindings)',
long_description=READ_MD('README.md'),
author='Iotic Labs Ltd',
author_email='[email protected]',
maintainer='Dusan Klinec (ph4r05)',
maintainer_email='[email protected]',
url='https://github.com/ph4r05/py-lz4framed',
license='Apache License 2.0',
packages=['lz4framed'],
zip_safe=False,
ext_modules=[
Extension('_lz4framed', [
# lz4 library
'lz4/lz4.c',
'lz4/lz4hc.c',
'lz4/lz4frame.c',
'lz4/xxhash.c',
'lz4framed/py-lz4framed.c',
], extra_compile_args=[
'-Ilz4',
'-std=c99',
'-DXXH_NAMESPACE=PLZ4F_',
'-DVERSION=%s' % VERSION,
# For testing only - some of these are GCC-specific
# '-Wall',
# '-Wextra',
# '-Wundef',
# '-Wshadow',
# '-Wcast-align',
# '-Wcast-qual',
# '-Wstrict-prototypes',
# '-pedantic'
])],
keywords=['lz4framed', 'lz4frame', 'lz4'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: Apache Software License',
'Intended Audience :: Developers',
'Programming Language :: C',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)