-
Notifications
You must be signed in to change notification settings - Fork 14
/
setup.py
70 lines (59 loc) · 2.17 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
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: Apache-2.0
import setuptools
import platform
import os
from setuptools.extension import Extension
from Cython.Build import cythonize
with open("README.md", "r") as fh:
long_description = fh.read()
with open("requirements.txt") as fh:
required = fh.read().splitlines()
with open(os.path.join('sequential', '_version.py')) as fp:
exec(fp.read())
compile_extra_args = []
link_extra_args = []
# Set compiler arguments for different platforms
if platform.system() == "Windows":
# compile_extra_args = ["/std:c++latest", "/EHsc"]
compile_extra_args = []
link_extra_args = []
elif platform.system() == "Linux" or platform.system() == "Darwin":
compile_extra_args = ["-std=c++0x"]
# link_extra_args = ["-stdlib=libc++"]
link_extra_args = []
# Set compile files for cython
compile_files = [
"sequential/backend/seq_to_pat.pyx",
]
# Set compiler options
ext_options = {"compiler_directives": {"profile": True}, "annotate": True}
# Build extension modules
ext_modules = cythonize([Extension("sequential.backend.seq_to_pat", compile_files,
language="c++",
extra_compile_args=compile_extra_args,
extra_link_args=link_extra_args)
], language_level="3", **ext_options)
setuptools.setup(
name="seq2pat",
description="Seq2Pat: Sequence-to-Pattern Generation Library",
long_description=long_description,
long_description_content_type="text/markdown",
version=__version__,
author="FMR LLC",
url="https://github.com/fidelity/seq2pat",
install_requires=required,
setup_requires=required,
packages=setuptools.find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.8",
"Operating System :: OS Independent",
],
project_urls={
"Documentation": "https://fidelity.github.io/seq2pat/",
"Source": "https://github.com/fidelity/seq2pat"
},
include_package_data=True,
ext_modules=ext_modules
)