Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 7d36c31c authored by hhakim's avatar hhakim
Browse files

Avoid building the the python wrapper shared lib again if it already exists...

Avoid building the the python wrapper shared lib again if it already exists (it must be asked explicitely)

It completes a414c959.
parent c241f731
Branches
Tags
No related merge requests found
......@@ -2,6 +2,7 @@
# @PYFAUST_LICENSE_HEADER@
from setuptools import setup, Extension
import sysconfig
#from distutils.core import setup, Extension
from Cython.Build import cythonize
import numpy
......@@ -40,6 +41,11 @@ elif platform == 'darwin':
elif platform == 'win32':
lib_ext = 'dll'
lib_path = "_FaustCorePy"+sysconfig.get_config_vars()['EXT_SUFFIX']
from os.path import exists, dirname, join
if sys.argv[1] == "build_ext" and exists(join(dirname(sys.argv[0]),lib_path)):
print("The shared library", lib_path, "already exists, please delete it to build again.")
exit(0)
PyFaust = Extension('_FaustCorePy',
sources = @PY_EXT_SOURCES@,
......@@ -79,3 +85,5 @@ setup(
'pyfaust': [ 'data/*.mat', 'license*.txt', 'lib/*.'+lib_ext]
}
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment