-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.py
69 lines (58 loc) · 1.86 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
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import os
import sys
from setuptools import setup, Extension
extra_compile_args = []
extra_link_args = []
undef_macros = []
if sys.platform != "win32":
extra_compile_args.extend(("-std=c11", "-Wall", "-Werror", "-O3"))
if os.environ.get("COVERAGE"):
extra_compile_args.extend(("-g", "-O0", "-fprofile-arcs", "-ftest-coverage"))
extra_link_args.append("-fprofile-arcs")
undef_macros.append("NDEBUG")
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="cbitstruct",
version="1.1.1",
author="Quentin CHATEAU",
author_email="[email protected]",
license="MPL-2.0",
url="https://github.com/qchateau/cbitstruct",
description="Faster C implementation of bitstruct",
long_description=long_description,
long_description_content_type="text/markdown",
python_requires=">=3.6",
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: C",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Operating System :: OS Independent",
],
keywords=[
"bit",
"pack",
"unpack",
"struct",
"bitfield",
"bit parsing",
"bit unpack",
"bit pack",
"C",
],
extras_require={"test": ["bitstruct"]},
ext_modules=[
Extension(
"cbitstruct._cbitstruct",
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
sources=["cbitstruct/_cbitstruct.c"],
include_dirs=["cbitstruct/"],
undef_macros=undef_macros,
)
],
packages=["cbitstruct", "cbitstruct.tests"],
)