-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
69 lines (59 loc) · 1.82 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
# SPDX-FileCopyrightText: 2022 Manuel Weiss <[email protected]>
#
# SPDX-License-Identifier: MIT
# https://stackoverflow.com/a/60740179
# (note that even with pyproject.toml this is still useful to make `python setup.py sdist` work out-of-the-box)
from setuptools import dist
dist.Distribution().fetch_build_eggs(["Cython", "numpy"])
import site
import sys
import numpy as np
from Cython.Build import cythonize
from setuptools import Extension, find_packages, setup
# workaround for develop mode (pip install -e) with PEP517/pyproject.toml cf. https://github.com/pypa/pip/issues/7953
site.ENABLE_USER_SITE = "--user" in sys.argv[1:]
ext_modules = cythonize(
Extension(
"pneu_arm.pneu_arm",
sources=[
"pneu_arm/pneu_arm.pyx",
],
extra_compile_args=["-O3", "-pipe", "-v"],
language="c++",
)
)
for m in ext_modules:
m.include_dirs.insert(0, np.get_include())
setup(
name="pneu_arm",
version="0.0.1",
description="Python package for the PneuArm",
author="Manuel Weiss",
author_email="[email protected]",
license="MIT",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
],
packages=find_packages(exclude=["contrib", "docs", "tests"]),
package_data={
"pneu_arm": [
"cpp/*.cpp",
"cpp/*.hpp",
"cpp/CMakeLists.txt",
]
},
zip_safe=False,
install_requires=["numpy >= 1.23.2", "cython", "setuptools>=65.0.2"],
python_requires=">=3.7",
extras_require={
# pip3 install --user -e ".[dev]"
"dev": [],
},
ext_modules=ext_modules,
include_dirs=[
np.get_include(),
],
)