forked from pyomeca/ezc3d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
29 lines (27 loc) · 921 Bytes
/
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
from skbuild import setup
import re
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
with open(f"{dir_path}/CMakeLists.txt") as file:
for line in file:
match = re.search(re.compile("project\\(ezc3d VERSION (\\d*\\.\\d*\\.\\d*)\\)"), line)
if match is not None:
version = match[1]
break
else:
raise RuntimeError("Version not found")
setup(
# NOTE: Could still add stuff like homepage or author mail, but since this isn't used to redistribute, not important
name="ezc3d",
version=version,
description=" Easy to use C3D reader/writer for C++, Python and Matlab",
author="Michaud, Benjamin and Begon, Mickaël",
license="MIT",
packages=['ezc3d'],
cmake_args=[
'-DBUILD_EXAMPLE:BOOL=OFF',
'-DBINDER_PYTHON3:BOOL=ON',
'-DCMAKE_INSTALL_BINDIR=ezc3d',
'-DCMAKE_INSTALL_LIBDIR=ezc3d'
],
)