-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
74 lines (64 loc) · 1.75 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
import os
import sys
import platform
from setuptools import find_packages, setup, Extension
from Cython.Build import cythonize
dir_name = os.path.dirname(os.path.realpath(__file__))
if not platform.system() == 'Windows':
os.environ["CC"] = "clang"
os.environ["CXX"] = "clang++"
# Require pytest-runner only when running tests
pytest_runner = (['pytest-runner>=2.0,<3dev']
if any(arg in sys.argv for arg in ('pytest', 'test'))
else [])
setup_requires = pytest_runner
data_files = [
# ('lib',['src/mixin/mixin.so']),
]
data = []
if platform.system() == 'Windows':
data.append("mixin.dll")
version = platform.python_version_tuple()
version = '%s.%s' % (version[0], version[1])
ext_modules = [
Extension(
'pymixin._mixin',
sources=[
'src/_mixin.pyx',
],
include_dirs=[
'src/mixin',
],
language='c++',
extra_compile_args=['-std=c++17'],
library_dirs=[os.path.join(dir_name, 'src/mixin')],
libraries = ['mixin']
)
]
setup(
name="mixin-python",
version="0.2.10",
description="Mixin Binding Project",
author='learnforpractice',
url="https://github.com/learnforpractice/mixin-python",
license="GPL-3.0",
packages=['pymixin'],
package_dir={'pymixin': 'pysrc'},
package_data={'pymixin': data},
data_files = data_files,
scripts=[],
ext_modules=cythonize(
ext_modules,
compiler_directives={'language_level': 3, },
),
install_requires=[
"PyJWT>=2.4.0",
"websockets>=9.1",
"cryptography>=3.4.7",
"dataclasses-json",
"httpx"
],
tests_require=['pytest'],
setup_requires=setup_requires,
include_package_data=True
)