about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/catboost/nix-support.patch
blob: feaf97d57070b890d1a375edebaca8c9ebfc799f (plain) (blame)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
diff --git a/catboost/python-package/setup.py b/catboost/python-package/setup.py
index 17f1d8ff14..07da618cd1 100644
--- a/catboost/python-package/setup.py
+++ b/catboost/python-package/setup.py
@@ -80,7 +80,7 @@ class Helper(object):
         self.with_cuda = os.environ.get('CUDA_PATH') or os.environ.get('CUDA_ROOT') or None
         self.os_sdk = 'local'
         self.with_ymake = True
-        self.parallel = None
+        self.parallel = os.environ.get('NIX_BUILD_CORES') or None
 
     def finalize_options(self):
         if os.path.exists(str(self.with_cuda)):
@@ -222,11 +222,12 @@ class build_ext(_build_ext):
 
     def build_with_make(self, topsrc_dir, build_dir, catboost_ext, put_dir, verbose, dry_run):
         logging.info('Buildling {} with gnu make'.format(catboost_ext))
-        makefile = 'python{}.{}CLANG50-LINUX-X86_64.makefile'.format(python_version()[0], 'CUDA.' if self.with_cuda else '')
+        makefile = 'python{}.{}CLANG7-LINUX-X86_64.makefile'.format(python_version()[0], 'CUDA.' if self.with_cuda else '')
         make_cmd = [
             'make', '-f', '../../make/' + makefile,
-            'CC=clang-5.0',
-            'CXX=clang++-5.0',
+            'CC=clang',
+            'CXX=clang++',
+            'PYTHON=python2',
             'BUILD_ROOT=' + build_dir,
             'SOURCE_ROOT=' + topsrc_dir,
         ]
diff --git a/make/python2.CLANG7-LINUX-X86_64.makefile b/make/python2.CLANG7-LINUX-X86_64.makefile
index e54b7078e8..fb7b208af9 100644
--- a/make/python2.CLANG7-LINUX-X86_64.makefile
+++ b/make/python2.CLANG7-LINUX-X86_64.makefile
@@ -4,33 +4,6 @@ BUILD_ROOT = $(shell pwd)
 SOURCE_ROOT = $(shell pwd)
 PYTHON = $(shell which python)
 
-ifneq ($(MAKECMDGOALS),help)
-define _CC_TEST
-__clang_major__ __clang_minor__
-endef
-
-_CC_VERSION = $(shell echo '$(_CC_TEST)' | $(CC) -E -P -)
-$(info _CC_VERSION = '$(_CC_VERSION)')
-
-ifneq '$(_CC_VERSION)' '7 0'
-    $(error clang 7.0 is required)
-endif
-endif
-
-ifneq ($(MAKECMDGOALS),help)
-define _CXX_TEST
-__clang_major__ __clang_minor__
-endef
-
-_CXX_VERSION = $(shell echo '$(_CXX_TEST)' | $(CXX) -E -P -)
-$(info _CXX_VERSION = '$(_CXX_VERSION)')
-
-ifneq '$(_CXX_VERSION)' '7 0'
-    $(error clang 7.0 is required)
-endif
-endif
-
-
 all\
         ::\
         $(BUILD_ROOT)/catboost/python-package/catboost/_catboost.so\
diff --git a/make/python2.CUDA.CLANG7-LINUX-X86_64.makefile b/make/python2.CUDA.CLANG7-LINUX-X86_64.makefile
index 2a22a79b25..522fb54a7c 100644
--- a/make/python2.CUDA.CLANG7-LINUX-X86_64.makefile
+++ b/make/python2.CUDA.CLANG7-LINUX-X86_64.makefile
@@ -4,33 +4,6 @@ BUILD_ROOT = $(shell pwd)
 SOURCE_ROOT = $(shell pwd)
 PYTHON = $(shell which python)
 
-ifneq ($(MAKECMDGOALS),help)
-define _CC_TEST
-__clang_major__ __clang_minor__
-endef
-
-_CC_VERSION = $(shell echo '$(_CC_TEST)' | $(CC) -E -P -)
-$(info _CC_VERSION = '$(_CC_VERSION)')
-
-ifneq '$(_CC_VERSION)' '7 0'
-    $(error clang 7.0 is required)
-endif
-endif
-
-ifneq ($(MAKECMDGOALS),help)
-define _CXX_TEST
-__clang_major__ __clang_minor__
-endef
-
-_CXX_VERSION = $(shell echo '$(_CXX_TEST)' | $(CXX) -E -P -)
-$(info _CXX_VERSION = '$(_CXX_VERSION)')
-
-ifneq '$(_CXX_VERSION)' '7 0'
-    $(error clang 7.0 is required)
-endif
-endif
-
-
 all\
         ::\
         $(BUILD_ROOT)/catboost/python-package/catboost/_catboost.so\
diff --git a/make/python3.CLANG7-LINUX-X86_64.makefile b/make/python3.CLANG7-LINUX-X86_64.makefile
index fee6750bcb..dc55908371 100644
--- a/make/python3.CLANG7-LINUX-X86_64.makefile
+++ b/make/python3.CLANG7-LINUX-X86_64.makefile
@@ -4,33 +4,6 @@ BUILD_ROOT = $(shell pwd)
 SOURCE_ROOT = $(shell pwd)
 PYTHON = $(shell which python)
 
-ifneq ($(MAKECMDGOALS),help)
-define _CC_TEST
-__clang_major__ __clang_minor__
-endef
-
-_CC_VERSION = $(shell echo '$(_CC_TEST)' | $(CC) -E -P -)
-$(info _CC_VERSION = '$(_CC_VERSION)')
-
-ifneq '$(_CC_VERSION)' '7 0'
-    $(error clang 7.0 is required)
-endif
-endif
-
-ifneq ($(MAKECMDGOALS),help)
-define _CXX_TEST
-__clang_major__ __clang_minor__
-endef
-
-_CXX_VERSION = $(shell echo '$(_CXX_TEST)' | $(CXX) -E -P -)
-$(info _CXX_VERSION = '$(_CXX_VERSION)')
-
-ifneq '$(_CXX_VERSION)' '7 0'
-    $(error clang 7.0 is required)
-endif
-endif
-
-
 all\
         ::\
         $(BUILD_ROOT)/catboost/python-package/catboost/_catboost.so\
diff --git a/make/python3.CUDA.CLANG7-LINUX-X86_64.makefile b/make/python3.CUDA.CLANG7-LINUX-X86_64.makefile
index 5146830476..ff8535b03e 100644
--- a/make/python3.CUDA.CLANG7-LINUX-X86_64.makefile
+++ b/make/python3.CUDA.CLANG7-LINUX-X86_64.makefile
@@ -4,33 +4,6 @@ BUILD_ROOT = $(shell pwd)
 SOURCE_ROOT = $(shell pwd)
 PYTHON = $(shell which python)
 
-ifneq ($(MAKECMDGOALS),help)
-define _CC_TEST
-__clang_major__ __clang_minor__
-endef
-
-_CC_VERSION = $(shell echo '$(_CC_TEST)' | $(CC) -E -P -)
-$(info _CC_VERSION = '$(_CC_VERSION)')
-
-ifneq '$(_CC_VERSION)' '7 0'
-    $(error clang 7.0 is required)
-endif
-endif
-
-ifneq ($(MAKECMDGOALS),help)
-define _CXX_TEST
-__clang_major__ __clang_minor__
-endef
-
-_CXX_VERSION = $(shell echo '$(_CXX_TEST)' | $(CXX) -E -P -)
-$(info _CXX_VERSION = '$(_CXX_VERSION)')
-
-ifneq '$(_CXX_VERSION)' '7 0'
-    $(error clang 7.0 is required)
-endif
-endif
-
-
 all\
         ::\
         $(BUILD_ROOT)/catboost/python-package/catboost/_catboost.so\