Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
faust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
faust group
faust
Commits
8de46a58
Commit
8de46a58
authored
8 years ago
by
Nicolas Bellot
Committed by
hhakim
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
wrapper python : find cython module
parent
7bdbae3c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMake/findPython.cmake
+47
-1
47 additions, 1 deletion
CMake/findPython.cmake
wrapper/python/setup.py.in
+2
-0
2 additions, 0 deletions
wrapper/python/setup.py.in
with
49 additions
and
1 deletion
CMake/findPython.cmake
+
47
−
1
View file @
8de46a58
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
# This module defines:
# This module defines:
# PYTHON_EXE: Python executable
# PYTHON_EXE: Python executable
# CYTHON_EXE: Cython executable
message
(
STATUS
"------------------------------------------------"
)
message
(
STATUS
"------------------------------------------------"
)
...
@@ -76,8 +77,53 @@ else(UNIX)
...
@@ -76,8 +77,53 @@ else(UNIX)
message
(
FATAL_ERROR
"Python wrapper Unsupported OS (only compatible with Unix System (Linux or Mac Os X)"
)
message
(
FATAL_ERROR
"Python wrapper Unsupported OS (only compatible with Unix System (Linux or Mac Os X)"
)
endif
()
endif
()
message
(
STATUS
"PYTHON_EXE has been found :
${
PYTHON_EXE
}
"
)
message
(
STATUS
"PYTHON_EXE has been found :
${
PYTHON_EXE
}
"
)
message
(
STATUS
"------------------------------------------------"
)
message
(
STATUS
"------------------------------------------------"
)
##################################################################
##################################################################
message
(
STATUS
"------------------------------------------------"
)
message
(
STATUS
"------------ Looking for Cython PATH -----------"
)
message
(
STATUS
"------------------------------------------------"
)
if
(
UNIX
)
message
(
STATUS
"INFO- If you want to choose an other version of Python,"
)
message
(
STATUS
"INFO- please add an environment variable CYTHON_PATH. "
)
message
(
STATUS
"INFO- Example : CYTHON_PATH=/usr/bin/cython"
)
if
(
$ENV{CYTHON_PATH}} MATCHES cython
)
set
(
CYTHON_TMP $ENV{PYTHON_PATH}
)
message
(
STATUS
"PYTHON_EXE=$ENV{PYTHON_PATH} defined from environment variable"
)
elseif
(
${
CYTHON_PATH
}
MATCHES cython
)
set
(
CYTHON_TMP
${
PYTHON_PATH
}
)
message
(
STATUS
"PYTHON_EXE=
${
PYTHON_EXE
}
defined from local input variable"
)
else
()
# PYTHON_EXE_DIR
#message(STATUS "PYTHON_DIR_TMP 1 = ${PYTHON_DIR_TMP}")
exec_program
(
"which cython | xargs echo"
OUTPUT_VARIABLE CYTHON_TMP
)
#message(STATUS "PYTHON_DIR_TMP 2 = ${PYTHON_DIR_TMP}")
if
(
${
CYTHON_TMP
}
MATCHES
"which: no cython in"
)
message
(
FATAL_ERROR
"cython is not present in your PATH ; Please insert in the PATH environment."
)
endif
()
endif
()
string
(
REGEX REPLACE
"([a-zA-Z0-9_/:.]+)/cython"
"
\\
1"
CYTHON_BIN_DIR
"
${
CYTHON_TMP
}
"
)
else
(
UNIX
)
message
(
FATAL_ERROR
"Cython wrapper Unsupported OS (only compatible with Unix System (Linux or Mac Os X)"
)
endif
()
message
(
STATUS
"CYTHON_BIN_DIR has been found :
${
CYTHON_BIN_DIR
}
"
)
message
(
STATUS
"------------------------------------------------"
)
This diff is collapsed.
Click to expand it.
wrapper/python/setup.py.in
+
2
−
0
View file @
8de46a58
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
# useful link : https://docs.python.org/2/distutils/configfile.html
# useful link : https://docs.python.org/2/distutils/configfile.html
from
distutils.core
import
setup
,
Extension
from
distutils.core
import
setup
,
Extension
import
sys
sys
.
path
.
append
(
'
@CYTHON_BIN_DIR@
'
)
from
Cython.Build
import
cythonize
from
Cython.Build
import
cythonize
PyFaust
=
Extension
(
PyFaust
=
Extension
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment