-
Notifications
You must be signed in to change notification settings - Fork 17
/
setup.py
41 lines (37 loc) · 1.25 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
import sys
import os
from os.path import join
from distutils.sysconfig import get_python_lib
from setuptools import find_packages
from skbuild import setup
from skbuild.constants import CMAKE_INSTALL_DIR
import re
# read the version number from the library
pattern = r"[0-9]\.[0-9]\.[0-9]"
version = None
with open("./bindings/rascal/__init__.py", "r") as fp:
for line in fp.readlines():
if "__version__" in line:
version = re.findall(pattern, line)[0]
if version is None:
raise ValueError("Version number not found.")
with open("./requirements_pip.txt", "r") as fp:
requirements = list(filter(lambda x: "#" not in x, (line.strip() for line in fp)))
setup(
name="rascal",
version=version,
description="""A versatile and scalable computation of representations of \
atomic structures for machine learning.""",
author="librascal developers",
license="LGPL-2.1-or-later",
cmake_args=[
"-DINSTALL_PATH:STRING=" + join(os.getcwd(), CMAKE_INSTALL_DIR()),
"-DBUILD_EXAMPLES:BOOL=OFF",
],
package_dir={"": "bindings"},
packages=find_packages(where="bindings"),
install_requires=requirements,
# include_package_data=True,
# package_data={"": ["lib/librascal.*"]},
zip_safe=False,
)