-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsetup.py
More file actions
47 lines (41 loc) · 1.16 KB
/
setup.py
File metadata and controls
47 lines (41 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
"""
setup.py for LUTE
"""
from setuptools import Extension, find_packages, setup
from typing import List
import numpy as np
peakfinders_ext: Extension = Extension(
name="lute.tasks.algorithms._peakfinders_ext",
include_dirs=[np.get_include()],
libraries=["stdc++"],
sources=(
[
"extensions/algorithms/peakfinder8.cpp",
"extensions/algorithms/peakfinder8_v2.cpp",
"extensions/algorithms/peakfinders.cpp",
]
),
language="c++",
)
extensions: List[Extension] = [peakfinders_ext]
USE_MYPYC: bool
try:
from mypyc.build import mypycify
USE_MYPYC = True
except ModuleNotFoundError:
USE_MYPYC = False
if USE_MYPYC:
extensions.extend(mypycify(["lute/execution","lute/tasks"]))
version_fh = open("lute/__init__.py", "r")
version = version_fh.readlines()[-1].split("=")[1].strip().split('"')[1]
version_fh.close()
setup(
name="lute",
version=version,
url="https://slac-lcls.github.io/lute/dev/",
description="LCLS Unified Task Executor.",
packages=find_packages(where="."),
package_data={"config": ["*.yaml", "templates/*.*"]},
ext_modules=extensions,
platforms="any",
)