forked from equinor/ert
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
59 lines (50 loc) · 1.77 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import os
import sys
from setuptools import find_packages
from skbuild import setup
# Corporate networks tend to be behind a proxy server with their own non-public
# SSL certificates. Conan keeps its own certificates,
# whose path we can override
if "CONAN_CACERT_PATH" not in os.environ:
# Look for a RHEL-compatible system-wide file
for file_ in ("/etc/pki/tls/cert.pem",):
if not os.path.isfile(file_):
continue
os.environ["CONAN_CACERT_PATH"] = file_
break
def package_files(directory):
paths = []
for path, _, filenames in os.walk(directory):
for filename in filenames:
paths.append(os.path.join("..", "..", path, filename))
return paths
args = dict(
packages=find_packages(where="src"),
package_dir={"": "src"},
package_data={
"ert": package_files("src/ert/gui/resources/")
+ package_files("src/ert/shared/share/")
+ ["logging/logger.conf", "logging/storage_log.conf"]
+ [
"job_queue/qstat_proxy.sh",
],
},
cmake_args=[
"-DBUILD_TESTS=OFF",
# we can safely pass OSX_DEPLOYMENT_TARGET as it's ignored on
# everything not OS X. We depend on C++17, which makes our minimum
# supported OS X release 10.15
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15",
],
cmake_source_dir="src/clib/",
)
setup(**args)
# workaround for https://github.com/scikit-build/scikit-build/issues/546 :
# This increases time taken to run `pip install -e .` somewhat until we
# have only one top level package at which point we can use the workaround
# in the issue
if sys.argv[1] == "develop":
from setuptools import setup as setuptools_setup
del args["cmake_args"]
del args["cmake_source_dir"]
setuptools_setup(**args)