Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 299bda95 authored by hhakim's avatar hhakim
Browse files

Refactor pip requirements list into cmake script and add auto-install commands...

Refactor pip requirements list into cmake script and add auto-install commands in Windows NSIS installer.
parent a6bbb72f
Branches
Tags
No related merge requests found
......@@ -131,9 +131,9 @@ Section "" ; no component so name not needed
; CreateShortCut pyfaust @PROJECT_BINARY_DIR@\wrapper\python\pyfaust ; tested and it can't be like a linux symlink
SetOutPath $2
File @PROJECT_BINARY_DIR@\wrapper\python\*pyd
File @PROJECT_BINARY_DIR@\wrapper\python\*pxd
;File @PROJECT_BINARY_DIR@\wrapper\python\*pxd
;add data path in __init__.py (both into site-packages and $INSTDIR)
; add data path in __init__.py (both into site-packages and $INSTDIR)
FileOpen $1 "$INSTDIR\pyfaust\__init__.py" a
; go at the end of file (but with append mode is that necessary ?)
FileSeek $1 0 END
......@@ -147,6 +147,10 @@ Section "" ; no component so name not needed
FileWrite $1 "$\r$\n_NSI_INSTALL_PATH='$INSTDIR'"
FileClose $1
Exec "python -m pip install $\"@PYFAUST_PYTHON_REQUIREMENTS@$\""
IfErrors 0 +2
MessageBox MB_OK "Error: failed partly or totally to install the pyfaust python packages through pip, please install them manually to get a workable pyfaust, list of packages: @PYFAUST_PYTHON_REQUIREMENTS@." IDOK data_dl
; =================================================
data_dl:
......
......@@ -9,6 +9,11 @@ set(PY_EXT_SOURCES "['${FAUST_PYTHON_BIN_DIR}/_FaustCorePy.pyx']")
set(FAUST_PYTHON_LIBS "'faust'")
set(PYFAUST_PYTHON_REQUIREMENTS "pygsp scipy numpy>=1.20 matplotlib>=2.0.0 pathlib") #ENOTE: order matters in setup.py, the last package is installed first
string(REGEX REPLACE " " "', '" PYFAUST_PYTHON_REQUIREMENTS_AS_PYLIST ${PYFAUST_PYTHON_REQUIREMENTS})
set(PYFAUST_PYTHON_REQUIREMENTS_AS_PYLIST "'${PYFAUST_PYTHON_REQUIREMENTS_AS_PYLIST}'")
if(${USE_MATIO_STATIC_LIBS})
if(NOT WIN32)
set(PYTHON_EXT_EXTRA_OBJECTS "[ '${MATIO_STATIC_LIB_PATH}', '${HDF5_STATIC_LIB_PATH}', '${Z_STATIC_LIB_PATH}']") # the order matters for compilation
......
......@@ -50,8 +50,7 @@ setup(
classifiers = [ 'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3',
'@GPU_CUDA_VERSION_PYPI_CLASSIFIER@'],
install_requires = [ 'pygsp', 'scipy', 'numpy>=1.20', 'matplotlib>=2.0.0',
'pathlib'], #ENOTE: order matters (last pkg installed first)
install_requires = [@PYFAUST_PYTHON_REQUIREMENTS_AS_PYLIST@],
license = "3-clause BSD 2.0",
package_data = {
'pyfaust': [ 'data/*.mat', 'license*.txt', '@GPU_MOD_LIB_PATH@']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment