-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
51 lines (44 loc) · 1.16 KB
/
Copy pathsetup.py
File metadata and controls
51 lines (44 loc) · 1.16 KB
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
import sys
from pathlib import Path
import numpy as np
import pybind11
from Cython.Build import cythonize
from setuptools import Extension, setup
from setuptools import Extension as CythonExtension
from app.__version__ import __version_string__
ROOT_DIR = Path(__file__).parent.resolve() / "app"
cython_ext = cythonize(
[
CythonExtension("pynes.mapper", sources=[ROOT_DIR / "pynes" / "mapper.py"], include_dirs=[np.get_include()]),
]
)
extra_args = []
if sys.platform.startswith("win"):
extra_args.append("/std:c++17")
else:
extra_args.append("-std=c++17")
"""
clipboard_ext = [
Extension(
"app.util.Clipboard",
sources=[ROOT_DIR / "extension" / "cpp" / "Clipboard" / "Clipboard.cpp"],
include_dirs=[
pybind11.get_include(),
np.get_include(),
str(ROOT_DIR)
],
language="c++",
libraries=["User32"],
extra_compile_args=extra_args,
)
]
"""
setup(
name="PyNES",
version=__version_string__,
packages=["pynes"],
ext_modules=cython_ext, # + clipboard_ext,
include_package_data=True,
package_dir={"pynes": "app/pynes"},
zip_safe=False,
)