-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
79 lines (68 loc) · 2.41 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
#!/usr/bin/env python
import os
import re
from setuptools import setup
from setuptools.dist import Distribution
PACKAGE_NAME = "petrelic"
SETUP_REQUIRE = ["pytest-runner", "cffi>=1.0.0"]
TEST_REQUIRE = ["pytest"]
INSTALL_REQUIRE = ["cffi>=1.0.0", "msgpack>=1.0.3"]
DEV_REQUIRE = TEST_REQUIRE + ["sphinx", "sphinx_rtd_theme", "black"]
CFFI_MODULES = "petrelic/compile.py:_FFI"
class BinaryDistribution(Distribution):
def is_pure(self):
return False
# Import README as long description
HERE = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(HERE, "README.rst")) as f:
long_description = f.read()
# Obtain settings from __init__.py
with open(os.path.join(HERE, PACKAGE_NAME, "__init__.py")) as f:
matches = re.findall(r"(__.+__) = \"(.*)\"", f.read())
for var_name, var_value in matches:
globals()[var_name] = var_value
setup(
name=__title__,
version=__version__,
description=__description__,
long_description=long_description,
author=__author__,
author_email=__email__,
packages=['petrelic', 'petrelic.additive', 'petrelic.multiplicative', 'petrelic.native', 'petrelic.petlib'],
package_data={
'petrelic': ['libgmp.so', 'librelic.so'],
},
license=__license__,
url=__url__,
include_package_data=True,
distclass=BinaryDistribution,
install_requires=INSTALL_REQUIRE,
setup_requires=SETUP_REQUIRE,
tests_require=TEST_REQUIRE,
extras_require={"dev": DEV_REQUIRE, "test": TEST_REQUIRE},
cffi_modules=CFFI_MODULES,
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Security :: Cryptography",
"License :: OSI Approved :: MIT License"
],
python_requires='>=3.6',
data_files = [("", ["LICENSE",
"LICENSE.Apache-2.0",
"LICENSE.GMP",
"LICENSE.GPLv2",
"LICENSE.LGPL-2.1",
"LICENSE.LGPLv3",
"LICENSE.RELIC"])],
zip_safe=False
)