-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.py
More file actions
44 lines (38 loc) · 1.49 KB
/
setup.py
File metadata and controls
44 lines (38 loc) · 1.49 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
import ast
from pybind11.setup_helpers import Pybind11Extension
from setuptools import setup
ext_modules = [
Pybind11Extension(
"random_events_lib", # Python module name
["src/random-events-lib/export/bindings.cpp",
"src/random-events-lib/random_events_lib/src/sigma_algebra.cpp",
"src/random-events-lib/random_events_lib/src/set.cpp",
"src/random-events-lib/random_events_lib/src/product_algebra.cpp"], # C++ binding source
include_dirs=["src/random-events-lib/random_events_lib/include"], # Include directory for C++ headers
extra_compile_args=["-std=c++17", "-fPIC"],
),
]
def get_version():
with open("src/random_events/__init__.py") as f:
for line in f:
if line.startswith("__version__"):
return ast.parse(line).body[0].value.s
setup(
name="random_events",
version=get_version(),
author="Tom Schierenbeck",
author_email="tom_sch@uni-bremen.de",
description="Random random events for probabilistic reasoning",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
url="https://github.com/tomsch420/random-events",
packages=["random_events"],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires=">=3.8",
install_requires=open("requirements.txt").read().splitlines(),
ext_modules=ext_modules,
)