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
0ceb8360
Commit
0ceb8360
authored
5 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
Automatize the assignment of SUPPORTED_PY3 variable.
It closes issue #107.
parent
c5b1222e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
misc/binpkg_postinst_scripts/debrpm/postinst_py.sh
+1
-1
1 addition, 1 deletion
misc/binpkg_postinst_scripts/debrpm/postinst_py.sh
wrapper/python/CMakeLists.txt
+10
-0
10 additions, 0 deletions
wrapper/python/CMakeLists.txt
with
11 additions
and
1 deletion
misc/binpkg_postinst_scripts/debrpm/postinst_py.sh
+
1
−
1
View file @
0ceb8360
...
...
@@ -8,7 +8,7 @@ uid=$(id -u)
[[
-z
"
$FAUST_PY_WRAPPER_PATH
"
]]
&&
echo
"USAGE:
$0
<path>"
&&
exit
2
[[
!
-d
"
$FAUST_PY_WRAPPER_PATH
"
]]
&&
echo
"ERROR: directory
$FAUST_PY_WRAPPER_PATH
doesn't exist"
&&
exit
3
SUPPORTED_PY3
=
7
SUPPORTED_PY3
=
@PY3_MINOR_VER@
# needed because python3 has ABI changes between minor versions (the pyfaust shared lib. is compiled specifically for python major and minor version)
function
link_py_files
(){
PY_MAJOR_VER
=
$1
...
...
This diff is collapsed.
Click to expand it.
wrapper/python/CMakeLists.txt
+
10
−
0
View file @
0ceb8360
...
...
@@ -118,6 +118,8 @@ if(UNIX)
string
(
REGEX REPLACE
"Python ([0-9])
\\
.([0-9]).*$"
"
\\
1
\\
2"
PY_VER
${
PY_VER
}
)
if
(
PY_VER MATCHES 3
)
set
(
PY3_VER
${
PY_VER_WITH_POINTS
}
PARENT_SCOPE
)
string
(
REGEX REPLACE
".*([0-9])$"
"
\\
1"
PY3_MINOR_VER
${
PY_VER
}
)
set
(
PY3_MINOR_VER
${
PY3_MINOR_VER
}
PARENT_SCOPE
)
endif
()
add_custom_command
(
TARGET
${
FAUST_PYTHON_TARGET
}
COMMAND
${
PYTHON_EXE
}
...
...
@@ -139,6 +141,9 @@ elseif(WIN32)
COMMAND
${
PYTHON_EXE
}
ARGS
"
${
FAUST_PYTHON_BIN_DIR
}
/setup.py"
"build_ext"
"--inplace"
COMMENT
"Creating pyfaust
${
PY_VER
}
"
)
string
(
REGEX REPLACE
".*
\\
.([0-9])$"
"
\\
1"
PY3_MINOR_VER
${
PY3_VER
}
)
string
(
REGEX REPLACE
".*([0-9])$"
"
\\
1"
PY3_MINOR_VER
${
PY_VER
}
)
set
(
PY3_MINOR_VER
${
PY3_MINOR_VER
}
PARENT_SCOPE
)
endif
()
endforeach
()
else
()
# ${CMAKE_GENERATOR} MATCHES "MinGW Makefiles"
...
...
@@ -185,6 +190,8 @@ elseif(WIN32)
if
(
PY_VER MATCHES 3
)
set
(
PY_DYNLIB
"FaustCorePy.cp
${
PY_VER
}
-win_amd64.pyd"
)
set
(
PY3_VER
${
PY_VER_WITH_POINTS
}
)
string
(
REGEX REPLACE
".*([0-9])$"
"
\\
1"
PY3_MINOR_VER
${
PY_VER
}
)
set
(
PY3_MINOR_VER
${
PY3_MINOR_VER
}
PARENT_SCOPE
)
else
()
#py 2.7.x
set
(
PY_DYNLIB
"FaustCorePy.pyd"
)
endif
()
...
...
@@ -212,3 +219,6 @@ endif()
#install the python wrapper
install
(
DIRECTORY
${
FAUST_PYTHON_BIN_DIR
}
/ DESTINATION
${
CMAKE_INSTALL_PYTHON_PREFIX
}
FILE_PERMISSIONS
${
INSTALL_FILE_PERMISSION
}
DIRECTORY_PERMISSIONS
${
INSTALL_DIR_PERMISSION
}
FILES_MATCHING PATTERN
"pyfaust/*.py"
PATTERN
"*.so"
PATTERN
"*.pyd"
PATTERN
"build"
EXCLUDE PATTERN
"setup*"
EXCLUDE PATTERN
"CMakeFiles*"
EXCLUDE
)
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