forked from epfl-radio-astro/bipp
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
66 lines (60 loc) · 2.13 KB
/
setup.py
File metadata and controls
66 lines (60 loc) · 2.13 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from skbuild import setup
import os
import pathlib
from setuptools import find_packages
import shlex
current_dir = pathlib.Path(__file__).parent.resolve()
with open(str(current_dir) + "/VERSION") as f:
version = f.readline().strip()
bipp_package_name = str(os.getenv("BIPP_PACKAGE_NAME", "bipp"))
bipp_package_desc = str(os.getenv("BIPP_PACKAGE_DESC", "Bluebild imaging algorithm for radio astronomy"))
bipp_gpu = str(os.getenv("BIPP_GPU", "OFF"))
bipp_umpire = str(os.getenv("BIPP_UMPIRE", "OFF"))
bipp_omp = str(os.getenv("BIPP_OMP", "ON"))
bipp_vc = str(os.getenv("BIPP_VC", "OFF"))
bipp_mpi = str(os.getenv("BIPP_MPI", "OFF"))
bipp_magma = str(os.getenv("BIPP_MAGMA", "OFF"))
bipp_cmake_args = str(os.getenv("BIPP_CMAKE_ARGS", ""))
bipp_cmake_args_list = shlex.split(bipp_cmake_args) if bipp_cmake_args else []
setup(
name=bipp_package_name,
version=version,
description=bipp_package_desc,
long_description=bipp_package_desc,
long_description_content_type='text/markdown',
packages=find_packages(where="python"),
package_dir={"": "python"},
cmake_install_dir="python", # must match package dir name. Otherwise, installed libraries are seen as independent data
package_data={"bipp": ["data/instrument/*.csv"], "bipp.imot_tools": ["data/math/special/*.csv", "data/io/colormap/*.csv", "data/io/colormap/imot_tools.mplstyle"]},
include_package_data=True,
python_requires=">=3.6",
license_files = ('LICENSE',),
license="GPLv3",
cmake_args=[
"-DBIPP_GPU=" + bipp_gpu,
"-DBIPP_UMPIRE=" + bipp_umpire,
"-DBIPP_OMP=" + bipp_omp,
"-DBIPP_MPI=" + bipp_mpi,
"-DBIPP_VC=" + bipp_vc,
"-DBIPP_MAGMA=" + bipp_magma,
"-DBIPP_BUNDLED_LIBS=ON",
"-DBUILD_SHARED_LIBS=ON",
"-DBIPP_INSTALL_LIB=OFF",
"-DBIPP_INSTALL_PYTHON=ON",
"-DBIPP_INSTALL_PYTHON_SUFFIX=",
]
+ bipp_cmake_args_list,
install_requires=[
"numpy",
"astropy",
"matplotlib",
"tqdm",
"pyproj",
"scipy",
"pandas",
"healpy",
"scipy",
"scikit-learn",
"python-casacore",
]
)