-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
81 lines (76 loc) · 2.19 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
from setuptools import setup, Extension, find_packages
from platform import system
from Cython.Build import cythonize
if system() == "Windows":
extra_compile_args = [
"/fp:fast",
# "/arch:AVX512",
"/favor:INTEL64",
"/O2", "/Ob2", "/GL",
]
extra_link_args = [
"/MACHINE:X64",
"/LTCG",
]
library_dir = "libtcy/msvc/Release"
else:
extra_compile_args = [
'-Ofast',
'-march=native',
'-ffast-math',
'-fforce-addr',
'-fprefetch-loop-arrays',
"-flto",
]
extra_link_args = []
library_dir = "libtcy/cmake-build-debug"
extensions = [
Extension(
name="pesim.*",
sources=["pesim/*.pyx"],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
),
]
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name="pesim",
packages=find_packages(),
version="0.9.5.0",
setup_requires=["Cython"],
author="Tefx",
author_email="zhaomeng.zhu@gmail.com",
url="https://github.com/Tefx/pesim",
project_urls={
'Documentation': "https://pesim.readthedocs.io",
"Source Code": "https://github.com/Tefx/pesim",
},
description="A Minimalist Discrete Event Simulation Library in Python",
long_description=long_description,
long_description_content_type="text/markdown",
classifiers=[
"Programming Language :: Python :: 3",
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",
],
ext_modules=cythonize(
extensions,
compiler_directives={
# "embedsignature": True,
"profile": False,
"linetrace": False,
"cdivision": True,
"boundscheck": False,
"wraparound": False,
"initializedcheck": False,
"language_level": 3,
},
annotate=True,
),
package_data={
"":["*.pxd"],
},
)