@@ -120,8 +120,6 @@ def getBdistFriendlyString(s):
120120import Cython .Compiler .Options
121121Cython .Compiler .Options .annotate = True
122122cmdclass .update ({'build_ext' : build_ext })
123- fileext = '.pyx'
124-
125123
126124extra_compile_args = ['-w' , '-std=c++11' ]
127125ext_modules = []
@@ -136,10 +134,11 @@ def getBdistFriendlyString(s):
136134 extra_compile_args += ['/EHsc' ]
137135
138136ext_modules += [Extension ('cylp.cy.CyClpPrimalColumnPivotBase' ,
139- sources = [join (cppFilesDir ,
140- 'IClpPrimalColumnPivotBase.cpp' ),
141- join (cythonFilesDir , 'CyClpPrimalColumnPivotBase' +
142- fileext )],
137+ sources = [
138+ join (cppFilesDir , 'IClpPrimalColumnPivotBase.cpp' ),
139+ join (cythonFilesDir , 'CyClpPrimalColumnPivotBase.pyx' ),
140+ join (cythonFilesDir , 'CyClpPrimalColumnPivotBase.pxd' ),
141+ ],
143142 language = 'c++' ,
144143 include_dirs = incDirs ,
145144 library_dirs = libDirs ,
@@ -148,10 +147,11 @@ def getBdistFriendlyString(s):
148147 extra_link_args = extra_link_args ), ]
149148
150149ext_modules += [Extension ('cylp.cy.CyClpDualRowPivotBase' ,
151- sources = [join (cppFilesDir ,
152- 'IClpDualRowPivotBase.cpp' ),
153- join (cythonFilesDir , 'CyClpDualRowPivotBase' +
154- fileext )],
150+ sources = [
151+ join (cppFilesDir , 'IClpDualRowPivotBase.cpp' ),
152+ join (cythonFilesDir , 'CyClpDualRowPivotBase.pyx' ),
153+ join (cythonFilesDir , 'CyClpDualRowPivotBase.pxd' ),
154+ ],
155155 language = 'c++' ,
156156 include_dirs = incDirs ,
157157 library_dirs = libDirs ,
@@ -160,10 +160,11 @@ def getBdistFriendlyString(s):
160160 extra_link_args = extra_link_args ), ]
161161
162162ext_modules += [Extension ('cylp.cy.CyCglCutGeneratorBase' ,
163- sources = [join (cppFilesDir ,
164- 'ICglCutGeneratorBase.cpp' ),
165- join (cythonFilesDir , 'CyCglCutGeneratorBase' +
166- fileext )],
163+ sources = [
164+ join (cppFilesDir , 'ICglCutGeneratorBase.cpp' ),
165+ join (cythonFilesDir , 'CyCglCutGeneratorBase.pyx' ),
166+ join (cythonFilesDir , 'CyCglCutGeneratorBase.pxd' ),
167+ ],
167168 language = 'c++' ,
168169 include_dirs = incDirs ,
169170 library_dirs = libDirs ,
@@ -172,8 +173,11 @@ def getBdistFriendlyString(s):
172173 extra_link_args = extra_link_args ), ]
173174
174175ext_modules += [Extension ('cylp.cy.CyOsiCuts' ,
175- sources = [join (cppFilesDir , 'IOsiCuts.cpp' ),
176- join (cythonFilesDir , 'CyOsiCuts' + fileext )],
176+ sources = [
177+ join (cppFilesDir , 'IOsiCuts.cpp' ),
178+ join (cythonFilesDir , 'CyOsiCuts.pyx' ),
179+ join (cythonFilesDir , 'CyOsiCuts.pxd' ),
180+ ],
177181 language = 'c++' ,
178182 include_dirs = incDirs ,
179183 library_dirs = libDirs ,
@@ -182,8 +186,10 @@ def getBdistFriendlyString(s):
182186 extra_link_args = extra_link_args ), ]
183187
184188ext_modules += [Extension ('cylp.cy.CyOsiSolverInterface' ,
185- sources = [join (cythonFilesDir , 'CyOsiSolverInterface' +
186- fileext )],
189+ sources = [
190+ join (cythonFilesDir , 'CyOsiSolverInterface.pyx' ),
191+ join (cythonFilesDir , 'CyOsiSolverInterface.pxd' ),
192+ ],
187193 language = 'c++' ,
188194 include_dirs = incDirs ,
189195 library_dirs = libDirs ,
@@ -192,8 +198,10 @@ def getBdistFriendlyString(s):
192198 extra_link_args = extra_link_args ), ]
193199
194200ext_modules += [Extension ('cylp.cy.CyCglTreeInfo' ,
195- sources = [join (cythonFilesDir , 'CyCglTreeInfo' +
196- fileext )],
201+ sources = [
202+ join (cythonFilesDir , 'CyCglTreeInfo.pyx' ),
203+ join (cythonFilesDir , 'CyCglTreeInfo.pxd' ),
204+ ],
197205 language = 'c++' ,
198206 include_dirs = incDirs ,
199207 library_dirs = libDirs ,
@@ -202,9 +210,11 @@ def getBdistFriendlyString(s):
202210 extra_link_args = extra_link_args ), ]
203211
204212ext_modules += [Extension ('cylp.cy.CyCoinIndexedVector' ,
205- sources = [join (cppFilesDir , 'ICoinIndexedVector.cpp' ),
206- join (cythonFilesDir ,
207- 'CyCoinIndexedVector' + fileext )],
213+ sources = [
214+ join (cppFilesDir , 'ICoinIndexedVector.cpp' ),
215+ join (cythonFilesDir , 'CyCoinIndexedVector.pyx' ),
216+ join (cythonFilesDir , 'CyCoinIndexedVector.pxd' ),
217+ ],
208218 language = 'c++' ,
209219 include_dirs = incDirs ,
210220 library_dirs = libDirs ,
@@ -213,9 +223,11 @@ def getBdistFriendlyString(s):
213223 extra_link_args = extra_link_args ), ]
214224
215225ext_modules += [Extension ('cylp.cy.CyCoinPackedMatrix' ,
216- sources = [join (cppFilesDir , 'ICoinPackedMatrix.cpp' ),
217- join (cythonFilesDir ,
218- 'CyCoinPackedMatrix' + fileext )],
226+ sources = [
227+ join (cppFilesDir , 'ICoinPackedMatrix.cpp' ),
228+ join (cythonFilesDir , 'CyCoinPackedMatrix.pyx' ),
229+ join (cythonFilesDir , 'CyCoinPackedMatrix.pxd' ),
230+ ],
219231 language = 'c++' ,
220232 include_dirs = incDirs ,
221233 library_dirs = libDirs ,
@@ -224,8 +236,10 @@ def getBdistFriendlyString(s):
224236 extra_link_args = extra_link_args ), ]
225237
226238ext_modules += [Extension ('cylp.cy.CyCoinModel' ,
227- sources = [join (cythonFilesDir ,
228- 'CyCoinModel' + fileext )],
239+ sources = [
240+ join (cythonFilesDir , 'CyCoinModel.pyx' ),
241+ join (cythonFilesDir , 'CyCoinModel.pxd' ),
242+ ],
229243 language = 'c++' ,
230244 include_dirs = incDirs ,
231245 library_dirs = libDirs ,
@@ -234,8 +248,11 @@ def getBdistFriendlyString(s):
234248 extra_link_args = extra_link_args ), ]
235249
236250ext_modules += [Extension ('cylp.cy.CyCoinMpsIO' ,
237- sources = [join (cppFilesDir , 'ICoinMpsIO.cpp' ),
238- join (cythonFilesDir , 'CyCoinMpsIO' + fileext )],
251+ sources = [
252+ join (cppFilesDir , 'ICoinMpsIO.cpp' ),
253+ join (cythonFilesDir , 'CyCoinMpsIO.pyx' ),
254+ join (cythonFilesDir , 'CyCoinMpsIO.pxd' ),
255+ ],
239256 language = 'c++' ,
240257 include_dirs = incDirs ,
241258 library_dirs = libDirs ,
@@ -244,8 +261,10 @@ def getBdistFriendlyString(s):
244261 extra_link_args = extra_link_args ), ]
245262
246263ext_modules += [Extension ('cylp.cy.CyCgl' ,
247- sources = [join (cythonFilesDir ,
248- 'CyCgl' + fileext )],
264+ sources = [
265+ join (cythonFilesDir , 'CyCgl.pyx' ),
266+ join (cythonFilesDir , 'CyCgl.pxd' ),
267+ ],
249268 language = 'c++' ,
250269 include_dirs = incDirs ,
251270 library_dirs = libDirs ,
@@ -254,8 +273,11 @@ def getBdistFriendlyString(s):
254273 extra_link_args = extra_link_args ), ]
255274
256275ext_modules += [Extension ('cylp.cy.CyCbcNode' ,
257- sources = [join (cppFilesDir , 'ICbcNode.cpp' ),
258- join (cythonFilesDir , 'CyCbcNode' + fileext )],
276+ sources = [
277+ join (cppFilesDir , 'ICbcNode.cpp' ),
278+ join (cythonFilesDir , 'CyCbcNode.pyx' ),
279+ join (cythonFilesDir , 'CyCbcNode.pxd' ),
280+ ],
259281 language = 'c++' ,
260282 include_dirs = incDirs ,
261283 library_dirs = libDirs ,
@@ -264,11 +286,13 @@ def getBdistFriendlyString(s):
264286 extra_link_args = extra_link_args ), ]
265287
266288ext_modules += [Extension ('cylp.cy.CyCbcModel' ,
267- sources = [join (cppFilesDir , 'ICbcModel.cpp' ),
268- join (cppFilesDir , 'CbcCompareUser.cpp' ),
269- join (cppFilesDir , 'ICbcNode.cpp' ),
270- join (cythonFilesDir ,
271- 'CyCbcModel' + fileext )],
289+ sources = [
290+ join (cppFilesDir , 'ICbcModel.cpp' ),
291+ join (cppFilesDir , 'CbcCompareUser.cpp' ),
292+ join (cppFilesDir , 'ICbcNode.cpp' ),
293+ join (cythonFilesDir , 'CyCbcModel.pyx' ),
294+ join (cythonFilesDir , 'CyCbcModel.pxd' ),
295+ ],
272296 language = 'c++' ,
273297 include_dirs = incDirs ,
274298 library_dirs = libDirs ,
@@ -277,17 +301,19 @@ def getBdistFriendlyString(s):
277301 extra_link_args = extra_link_args ), ]
278302
279303ext_modules += [Extension ('cylp.cy.CyClpSimplex' ,
280- sources = [join (cppFilesDir ,
281- 'IClpPrimalColumnPivotBase.cpp' ),
282- join (cppFilesDir , 'IClpDualRowPivotBase.cpp' ),
283- join (cppFilesDir , 'IClpSimplex.cpp' ),
284- #join(cppFilesDir, 'ICbc.cpp'),
285- join (cppFilesDir , 'ICbcModel.cpp' ),
286- join (cppFilesDir , 'CbcCompareUser.cpp' ),
287- join (cppFilesDir , 'IClpSimplexPrimal_Wolfe.cpp' ),
288- join (cppFilesDir , 'IClpSimplexPrimal.cpp' ),
289- join (cppFilesDir , 'IClpPackedMatrix.cpp' ),
290- join (cythonFilesDir , 'CyClpSimplex' + fileext )],
304+ sources = [
305+ join (cppFilesDir , 'IClpPrimalColumnPivotBase.cpp' ),
306+ join (cppFilesDir , 'IClpDualRowPivotBase.cpp' ),
307+ join (cppFilesDir , 'IClpSimplex.cpp' ),
308+ #join(cppFilesDir, 'ICbc.cpp'),
309+ join (cppFilesDir , 'ICbcModel.cpp' ),
310+ join (cppFilesDir , 'CbcCompareUser.cpp' ),
311+ join (cppFilesDir , 'IClpSimplexPrimal_Wolfe.cpp' ),
312+ join (cppFilesDir , 'IClpSimplexPrimal.cpp' ),
313+ join (cppFilesDir , 'IClpPackedMatrix.cpp' ),
314+ join (cythonFilesDir , 'CyClpSimplex.pyx' ),
315+ join (cythonFilesDir , 'CyClpSimplex.pxd' ),
316+ ],
291317 language = 'c++' ,
292318 include_dirs = incDirs ,
293319 library_dirs = libDirs ,
@@ -297,9 +323,11 @@ def getBdistFriendlyString(s):
297323 #pyrex_gdb=True), ]
298324
299325ext_modules += [Extension ('cylp.cy.CyPEPivot' ,
300- sources = [join (cppFilesDir ,
301- 'IClpPrimalColumnPivotBase.cpp' ),
302- join (cythonFilesDir , 'CyPEPivot' + fileext )],
326+ sources = [
327+ join (cppFilesDir , 'IClpPrimalColumnPivotBase.cpp' ),
328+ join (cythonFilesDir , 'CyPEPivot.pyx' ),
329+ join (cythonFilesDir , 'CyPEPivot.pxd' ),
330+ ],
303331 language = 'c++' ,
304332 include_dirs = incDirs ,
305333 library_dirs = libDirs ,
@@ -308,9 +336,11 @@ def getBdistFriendlyString(s):
308336 extra_link_args = extra_link_args ), ]
309337
310338ext_modules += [Extension ('cylp.cy.CyWolfePivot' ,
311- sources = [join (cppFilesDir ,
312- 'IClpPrimalColumnPivotBase.cpp' ),
313- join (cythonFilesDir , 'CyWolfePivot' + fileext )],
339+ sources = [
340+ join (cppFilesDir , 'IClpPrimalColumnPivotBase.cpp' ),
341+ join (cythonFilesDir , 'CyWolfePivot.pyx' ),
342+ join (cythonFilesDir , 'CyWolfePivot.pxd' ),
343+ ],
314344 language = 'c++' ,
315345 include_dirs = incDirs ,
316346 library_dirs = libDirs ,
@@ -319,10 +349,11 @@ def getBdistFriendlyString(s):
319349 extra_link_args = extra_link_args ), ]
320350
321351ext_modules += [Extension ('cylp.cy.CyDantzigPivot' ,
322- sources = [join (cppFilesDir ,
323- 'IClpPrimalColumnPivotBase.cpp' ),
324- join (cythonFilesDir , 'CyDantzigPivot' +
325- fileext )],
352+ sources = [
353+ join (cppFilesDir , 'IClpPrimalColumnPivotBase.cpp' ),
354+ join (cythonFilesDir , 'CyDantzigPivot.pyx' ),
355+ join (cythonFilesDir , 'CyDantzigPivot.pxd' ),
356+ ],
326357 language = 'c++' ,
327358 include_dirs = incDirs ,
328359 library_dirs = libDirs ,
@@ -331,7 +362,10 @@ def getBdistFriendlyString(s):
331362 extra_link_args = extra_link_args ), ]
332363
333364ext_modules += [Extension ('cylp.cy.CyTest' ,
334- sources = [join (cythonFilesDir , 'CyTest' + fileext )],
365+ sources = [
366+ join (cythonFilesDir , 'CyTest.pyx' ),
367+ join (cythonFilesDir , 'CyTest.pxd' ),
368+ ],
335369 language = 'c++' ,
336370 include_dirs = incDirs ,
337371 library_dirs = libDirs ,
@@ -340,10 +374,11 @@ def getBdistFriendlyString(s):
340374 extra_link_args = extra_link_args ), ]
341375
342376ext_modules += [Extension ('cylp.cy.CyPivotPythonBase' ,
343- sources = [join (cppFilesDir ,
344- 'IClpPrimalColumnPivotBase.cpp' ),
345- join (cythonFilesDir , 'CyPivotPythonBase' +
346- fileext )],
377+ sources = [
378+ join (cppFilesDir , 'IClpPrimalColumnPivotBase.cpp' ),
379+ join (cythonFilesDir , 'CyPivotPythonBase.pyx' ),
380+ join (cythonFilesDir , 'CyPivotPythonBase.pxd' ),
381+ ],
347382 language = 'c++' ,
348383 include_dirs = incDirs ,
349384 library_dirs = libDirs ,
@@ -352,10 +387,11 @@ def getBdistFriendlyString(s):
352387 extra_link_args = extra_link_args ), ]
353388
354389ext_modules += [Extension ('cylp.cy.CyDualPivotPythonBase' ,
355- sources = [join (cppFilesDir ,
356- 'IClpDualRowPivotBase.cpp' ),
357- join (cythonFilesDir , 'CyDualPivotPythonBase' +
358- fileext )],
390+ sources = [
391+ join (cppFilesDir , 'IClpDualRowPivotBase.cpp' ),
392+ join (cythonFilesDir , 'CyDualPivotPythonBase.pyx' ),
393+ join (cythonFilesDir , 'CyDualPivotPythonBase.pxd' ),
394+ ],
359395 language = 'c++' ,
360396 include_dirs = incDirs ,
361397 library_dirs = libDirs ,
@@ -364,12 +400,12 @@ def getBdistFriendlyString(s):
364400 extra_link_args = extra_link_args ), ]
365401
366402ext_modules += [Extension ('cylp.cy.CyCutGeneratorPythonBase' ,
367- sources = [join ( cppFilesDir ,
368- 'ICglCutGeneratorBase.cpp' ),
369- join (cppFilesDir ,
370- 'IOsiCuts.cpp ' ),
371- join (cythonFilesDir , 'CyCutGeneratorPythonBase' +
372- fileext ) ],
403+ sources = [
404+ join ( cppFilesDir , 'ICglCutGeneratorBase.cpp' ),
405+ join (cppFilesDir , 'IOsiCuts.cpp' ) ,
406+ join ( cythonFilesDir , 'CyCutGeneratorPythonBase.pyx ' ),
407+ join (cythonFilesDir , 'CyCutGeneratorPythonBase.pxd' ),
408+ ],
373409 language = 'c++' ,
374410 include_dirs = incDirs ,
375411 library_dirs = libDirs ,
0 commit comments