Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9af7ad25 authored by hhakim's avatar hhakim
Browse files

Merge windows and unixes extension compilation code in setup.py.in (issue #91).

Unrelated changes: enabling again the gitlab ci test jobs.
parent 978827a7
Branches
Tags 2.10.0
No related merge requests found
Pipeline #833776 skipped
...@@ -12,7 +12,7 @@ stages: ...@@ -12,7 +12,7 @@ stages:
- test - test
- pkg_rev - pkg_rev
.ctest: ctest:
<<: *ctest_script <<: *ctest_script
variables: {SLOW_TESTS: "OFF", BUILD_MULTITHREAD: "ON"} # the CDashConfScript is able to retrieve OpenMP_gomp_LIBRARY and OpenMP_INC_DIR from environment (it's necessary on macOS, so the runner's env. must be configured) variables: {SLOW_TESTS: "OFF", BUILD_MULTITHREAD: "ON"} # the CDashConfScript is able to retrieve OpenMP_gomp_LIBRARY and OpenMP_INC_DIR from environment (it's necessary on macOS, so the runner's env. must be configured)
except: except:
...@@ -22,7 +22,7 @@ stages: ...@@ -22,7 +22,7 @@ stages:
tags: tags:
- linux - linux
.ctest_python: ctest_python:
<<: *ctest_script <<: *ctest_script
variables: {BUILD_WRAPPER_PYTHON: "ON", SLOW_TESTS: "OFF", DONT_PYPLOT_FAUST_TIME: "ON", NOCPPTESTS: "ON", NOPY2: "ON", BUILD_MULTITHREAD: "ON"} #, GIT_STRATEGY: none} variables: {BUILD_WRAPPER_PYTHON: "ON", SLOW_TESTS: "OFF", DONT_PYPLOT_FAUST_TIME: "ON", NOCPPTESTS: "ON", NOPY2: "ON", BUILD_MULTITHREAD: "ON"} #, GIT_STRATEGY: none}
except: except:
...@@ -33,7 +33,7 @@ stages: ...@@ -33,7 +33,7 @@ stages:
tags: tags:
- linux - linux
.ctest_matlab: ctest_matlab:
<<: *ctest_script <<: *ctest_script
variables: {BUILD_WRAPPER_MATLAB: "ON", SLOW_TESTS: "OFF", NOCPPTESTS: "ON", BUILD_MULTITHREAD: "OFF"} # MT OFF because of macOS complicated way to enable OpenMP (but packages are OMP enabled) variables: {BUILD_WRAPPER_MATLAB: "ON", SLOW_TESTS: "OFF", NOCPPTESTS: "ON", BUILD_MULTITHREAD: "OFF"} # MT OFF because of macOS complicated way to enable OpenMP (but packages are OMP enabled)
except: except:
......
...@@ -6,6 +6,8 @@ from setuptools import setup, Extension ...@@ -6,6 +6,8 @@ from setuptools import setup, Extension
from Cython.Build import cythonize from Cython.Build import cythonize
import numpy import numpy
import sys import sys
from os import sep
from glob import glob
version = '@CPACK_PACKAGE_VERSION@' version = '@CPACK_PACKAGE_VERSION@'
...@@ -14,34 +16,17 @@ if(version == ''): ...@@ -14,34 +16,17 @@ if(version == ''):
# (not for packaging with a proper version) # (not for packaging with a proper version)
# it avoids error PEP440 # it avoids error PEP440
if sys.platform == 'win32':
from os import sep
from glob import glob
PyFaust = Extension('_FaustCorePy',
sources = @PY_EXT_SOURCES@,
language = 'c++',
include_dirs=[@FAUST_PYTHON_INCLUDE_DIR@, numpy.get_include()],
library_dirs=[@FAUST_PYTHON_LIB_DIR@],
libraries=[ @FAUST_PYTHON_LIBS@],
extra_compile_args = [ @FAUST_SETUP_PY_CFLAGS@ ],
extra_link_args = [ @FAUST_SETUP_PY_LFLAGS@ ],
extra_objects = @PYTHON_EXT_EXTRA_OBJECTS@
)
else: # linux and mac
PyFaust = Extension('_FaustCorePy',
sources = @PY_EXT_SOURCES@,
language = 'c++',
include_dirs=[@FAUST_PYTHON_INCLUDE_DIR@, numpy.get_include()],
library_dirs=[@FAUST_PYTHON_LIB_DIR@],
libraries=[@FAUST_PYTHON_LIBS@],
extra_compile_args = [ @FAUST_SETUP_PY_CFLAGS@ ],
extra_link_args = [ @FAUST_SETUP_PY_LFLAGS@ ],
extra_objects = @PYTHON_EXT_EXTRA_OBJECTS@
)
PyFaust = Extension('_FaustCorePy',
sources = @PY_EXT_SOURCES@,
language = 'c++',
include_dirs=[@FAUST_PYTHON_INCLUDE_DIR@, numpy.get_include()],
library_dirs=[@FAUST_PYTHON_LIB_DIR@],
libraries=[ @FAUST_PYTHON_LIBS@],
extra_compile_args = [ @FAUST_SETUP_PY_CFLAGS@ ],
extra_link_args = [ @FAUST_SETUP_PY_LFLAGS@ ],
extra_objects = @PYTHON_EXT_EXTRA_OBJECTS@
)
setup( setup(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment