Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BlenderPhi
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
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
raas
BlenderPhi
Commits
d113fd8a
Commit
d113fd8a
authored
13 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
WITH_PYTHON_INSTALL_NUMPY option for unix/cmake, just copies from site-packages.
parent
e08a46c0
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
CMakeLists.txt
+10
-1
10 additions, 1 deletion
CMakeLists.txt
source/creator/CMakeLists.txt
+21
-0
21 additions, 0 deletions
source/creator/CMakeLists.txt
with
31 additions
and
1 deletion
CMakeLists.txt
+
10
−
1
View file @
d113fd8a
...
@@ -228,6 +228,7 @@ if(UNIX AND NOT APPLE)
...
@@ -228,6 +228,7 @@ if(UNIX AND NOT APPLE)
option
(
WITH_INSTALL_PORTABLE
"Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX"
ON
)
option
(
WITH_INSTALL_PORTABLE
"Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX"
ON
)
endif
()
endif
()
option
(
WITH_PYTHON_INSTALL
"Copy system python into the blender install folder"
ON
)
option
(
WITH_PYTHON_INSTALL
"Copy system python into the blender install folder"
ON
)
option
(
WITH_PYTHON_INSTALL_NUMPY
"Copy system numpy into the blender install folder"
ON
)
option
(
WITH_MINGW64
"Use the 64-bit version of MinGW"
OFF
)
option
(
WITH_MINGW64
"Use the 64-bit version of MinGW"
OFF
)
mark_as_advanced
(
WITH_MINGW64
)
mark_as_advanced
(
WITH_MINGW64
)
...
@@ -1612,6 +1613,13 @@ if(WITH_PYTHON)
...
@@ -1612,6 +1613,13 @@ if(WITH_PYTHON)
"to a valid python include path. Containing "
"to a valid python include path. Containing "
"Python.h for python version
\"
${
PYTHON_VERSION
}
\"
"
)
"Python.h for python version
\"
${
PYTHON_VERSION
}
\"
"
)
endif
()
endif
()
if
(
WITH_PYTHON_INSTALL_NUMPY
)
if
(
NOT EXISTS
"
${
PYTHON_LIBPATH
}
/python
${
PYTHON_VERSION
}
/site-packages/numpy"
)
message
(
WARNING
"Numpy path '
${
PYTHON_LIBPATH
}
/python
${
PYTHON_VERSION
}
/site-packages/numpy' is missing, "
"WITH_PYTHON_INSTALL_NUMPY option will be ignored when installing python"
)
endif
()
endif
()
endif
()
endif
()
...
@@ -1668,7 +1676,7 @@ if(FIRST_RUN)
...
@@ -1668,7 +1676,7 @@ if(FIRST_RUN)
_setting
)
_setting
)
set
(
_msg
" *
${
_setting
}
"
)
set
(
_msg
" *
${
_setting
}
"
)
string
(
LENGTH
"
${
_msg
}
"
_len
)
string
(
LENGTH
"
${
_msg
}
"
_len
)
while
(
"2
8
"
GREATER
"
${
_len
}
"
)
while
(
"
3
2"
GREATER
"
${
_len
}
"
)
set
(
_msg
"
${
_msg
}
"
)
set
(
_msg
"
${
_msg
}
"
)
math
(
EXPR _len
"
${
_len
}
+ 1"
)
math
(
EXPR _len
"
${
_len
}
+ 1"
)
endwhile
()
endwhile
()
...
@@ -1728,6 +1736,7 @@ if(FIRST_RUN)
...
@@ -1728,6 +1736,7 @@ if(FIRST_RUN)
info_cfg_text
(
"Python:"
)
info_cfg_text
(
"Python:"
)
info_cfg_option
(
WITH_PYTHON_INSTALL
)
info_cfg_option
(
WITH_PYTHON_INSTALL
)
info_cfg_option
(
WITH_PYTHON_INSTALL_NUMPY
)
info_cfg_option
(
WITH_PYTHON_MODULE
)
info_cfg_option
(
WITH_PYTHON_MODULE
)
info_cfg_option
(
WITH_PYTHON_SAFETY
)
info_cfg_option
(
WITH_PYTHON_SAFETY
)
...
...
This diff is collapsed.
Click to expand it.
source/creator/CMakeLists.txt
+
21
−
0
View file @
d113fd8a
...
@@ -438,7 +438,28 @@ if(UNIX AND NOT APPLE)
...
@@ -438,7 +438,28 @@ if(UNIX AND NOT APPLE)
# # doesnt work, todo
# # doesnt work, todo
# install(CODE "execute_process(COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')")
# install(CODE "execute_process(COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')")
if
(
WITH_PYTHON_INSTALL_NUMPY
)
install
(
DIRECTORY
${
PYTHON_LIBPATH
}
/python
${
PYTHON_VERSION
}
/site-packages/numpy
DESTINATION
${
TARGETDIR_VER
}
/python/
${
_target_LIB
}
/python
${
PYTHON_VERSION
}
/site-packages
PATTERN
".svn"
EXCLUDE
PATTERN
"__pycache__"
EXCLUDE
# * any cache *
PATTERN
"*.pyc"
EXCLUDE
# * any cache *
PATTERN
"*.pyo"
EXCLUDE
# * any cache *
PATTERN
"distutils"
EXCLUDE
# ./distutils
PATTERN
"oldnumeric"
EXCLUDE
# ./oldnumeric
PATTERN
"doc"
EXCLUDE
# ./doc
PATTERN
"tests"
EXCLUDE
# ./tests
PATTERN
"f2py"
EXCLUDE
# ./f2py - fortran/python interface code, not fun for blender devs.
PATTERN
"include"
EXCLUDE
# include dirs all over, we wont use NumPy/CAPI
PATTERN
"*.h"
EXCLUDE
# some includes are not in include dirs
PATTERN
"*.a"
EXCLUDE
# ./core/lib/libnpymath.a - for linking, we dont need.
)
endif
()
unset
(
_target_LIB
)
unset
(
_target_LIB
)
endif
()
endif
()
endif
()
endif
()
elseif
(
WIN32
)
elseif
(
WIN32
)
...
...
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