Kaydet (Commit) aa93151b authored tarafından Michael Stahl's avatar Michael Stahl

configure, pyuno: stop claiming our python 3.3.5 is 3.3.3

... and adapt makefiles to automatically rebuild everything that depends
on PYTHON_VERSION.

Change-Id: If468183e59463503051c2a1526a905dbee9bf4cb
Reviewed-on: https://gerrit.libreoffice.org/17818Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst f54f99fe
/* python stuff */
#ifndef CONFIG_PYTHON_H
#define CONFIG_PYTHON_H
#undef PYTHON_VERSION_STRING
#endif // CONFIG_PYTHON_H
...@@ -8106,7 +8106,8 @@ internal) ...@@ -8106,7 +8106,8 @@ internal)
SYSTEM_PYTHON= SYSTEM_PYTHON=
PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MAJOR=3
PYTHON_VERSION_MINOR=3 PYTHON_VERSION_MINOR=3
PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.3 PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.5
AC_DEFINE_UNQUOTED([PYTHON_VERSION_STRING], [L"${PYTHON_VERSION}"])
BUILD_TYPE="$BUILD_TYPE PYTHON" BUILD_TYPE="$BUILD_TYPE PYTHON"
# Embedded Python dies without Home set # Embedded Python dies without Home set
if test "$HOME" = ""; then if test "$HOME" = ""; then
...@@ -13168,6 +13169,7 @@ AC_CONFIG_HEADERS([config_host/config_vclplug.h]) ...@@ -13168,6 +13169,7 @@ AC_CONFIG_HEADERS([config_host/config_vclplug.h])
AC_CONFIG_HEADERS([config_host/config_version.h]) AC_CONFIG_HEADERS([config_host/config_version.h])
AC_CONFIG_HEADERS([config_host/config_oauth2.h]) AC_CONFIG_HEADERS([config_host/config_oauth2.h])
AC_CONFIG_HEADERS([config_host/config_poppler.h]) AC_CONFIG_HEADERS([config_host/config_poppler.h])
AC_CONFIG_HEADERS([config_host/config_python.h])
AC_OUTPUT AC_OUTPUT
if test "$CROSS_COMPILING" = TRUE; then if test "$CROSS_COMPILING" = TRUE; then
......
...@@ -27,7 +27,8 @@ $(call gb_CustomTarget_get_workdir,pyuno/python_shell)/python.sh : \ ...@@ -27,7 +27,8 @@ $(call gb_CustomTarget_get_workdir,pyuno/python_shell)/python.sh : \
cat $^ > $@ && chmod +x $@ cat $^ > $@ && chmod +x $@
$(call gb_CustomTarget_get_workdir,pyuno/python_shell)/os.sh : \ $(call gb_CustomTarget_get_workdir,pyuno/python_shell)/os.sh : \
$(SRCDIR)/pyuno/zipcore/$(if $(filter MACOSX,$(OS)),mac,nonmac).sh $(SRCDIR)/pyuno/zipcore/$(if $(filter MACOSX,$(OS)),mac,nonmac).sh \
$(BUILDDIR)/config_$(gb_Side)/config_python.h
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1)
sed -e "s/%%PYVERSION%%/$(pyuno_PYTHON_SHELL_VERSION)/g" \ sed -e "s/%%PYVERSION%%/$(pyuno_PYTHON_SHELL_VERSION)/g" \
$< > $@ $< > $@
......
...@@ -14,6 +14,7 @@ $(eval $(call gb_CustomTarget_register_targets,pyuno/pythonloader_ini, \ ...@@ -14,6 +14,7 @@ $(eval $(call gb_CustomTarget_register_targets,pyuno/pythonloader_ini, \
)) ))
$(call gb_CustomTarget_get_workdir,pyuno/pythonloader_ini)/$(call gb_Helper_get_rcfile,pythonloader.uno): \ $(call gb_CustomTarget_get_workdir,pyuno/pythonloader_ini)/$(call gb_Helper_get_rcfile,pythonloader.uno): \
$(BUILDDIR)/config_$(gb_Side)/config_python.h \
$(SRCDIR)/pyuno/CustomTarget_pyuno_pythonloader_ini.mk $(SRCDIR)/pyuno/CustomTarget_pyuno_pythonloader_ini.mk
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
( printf '[Bootstrap]\n' && \ ( printf '[Bootstrap]\n' && \
......
...@@ -9,10 +9,6 @@ ...@@ -9,10 +9,6 @@
$(eval $(call gb_Executable_Executable,python)) $(eval $(call gb_Executable_Executable,python))
$(eval $(call gb_Executable_add_defs,python,\
-DMY_PYVERSION=L\"$(PYTHON_VERSION)\" \
))
$(eval $(call gb_Executable_use_static_libraries,python,\ $(eval $(call gb_Executable_use_static_libraries,python,\
ooopathutils \ ooopathutils \
)) ))
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <config_python.h>
#include <cstddef> #include <cstddef>
#include <stdlib.h> #include <stdlib.h>
#include <wchar.h> #include <wchar.h>
...@@ -98,14 +100,14 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) { ...@@ -98,14 +100,14 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) {
wchar_t pythonpath2[MAX_PATH]; wchar_t pythonpath2[MAX_PATH];
wchar_t * pythonpath2End = tools::buildPath( wchar_t * pythonpath2End = tools::buildPath(
pythonpath2, path, pathEnd, pythonpath2, path, pathEnd,
MY_STRING(L"\\python-core-" MY_PYVERSION L"\\lib")); MY_STRING(L"\\python-core-" PYTHON_VERSION_STRING L"\\lib"));
if (pythonpath2End == NULL) { if (pythonpath2End == NULL) {
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
wchar_t pythonpath3[MAX_PATH]; wchar_t pythonpath3[MAX_PATH];
wchar_t * pythonpath3End = tools::buildPath( wchar_t * pythonpath3End = tools::buildPath(
pythonpath3, path, pathEnd, pythonpath3, path, pathEnd,
MY_STRING(L"\\python-core-" MY_PYVERSION L"\\lib\\site-packages")); MY_STRING(L"\\python-core-" PYTHON_VERSION_STRING L"\\lib\\site-packages"));
if (pythonpath3End == NULL) { if (pythonpath3End == NULL) {
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
...@@ -113,21 +115,21 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) { ...@@ -113,21 +115,21 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) {
wchar_t pythonpath4[MAX_PATH]; wchar_t pythonpath4[MAX_PATH];
wchar_t * pythonpath4End = tools::buildPath( wchar_t * pythonpath4End = tools::buildPath(
pythonpath4, path, pathEnd, pythonpath4, path, pathEnd,
MY_STRING(L"\\python-core-" MY_PYVERSION L"\\lib\\lib-dynload")); MY_STRING(L"\\python-core-" PYTHON_VERSION_STRING L"\\lib\\lib-dynload"));
if (pythonpath4End == NULL) { if (pythonpath4End == NULL) {
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
#endif #endif
wchar_t pythonhome[MAX_PATH]; wchar_t pythonhome[MAX_PATH];
wchar_t * pythonhomeEnd = tools::buildPath( wchar_t * pythonhomeEnd = tools::buildPath(
pythonhome, path, pathEnd, MY_STRING(L"\\python-core-" MY_PYVERSION)); pythonhome, path, pathEnd, MY_STRING(L"\\python-core-" PYTHON_VERSION_STRING));
if (pythonhomeEnd == NULL) { if (pythonhomeEnd == NULL) {
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
wchar_t pythonexe[MAX_PATH]; wchar_t pythonexe[MAX_PATH];
wchar_t * pythonexeEnd = tools::buildPath( wchar_t * pythonexeEnd = tools::buildPath(
pythonexe, path, pathEnd, pythonexe, path, pathEnd,
MY_STRING(L"\\python-core-" MY_PYVERSION L"\\bin\\python.exe")); MY_STRING(L"\\python-core-" PYTHON_VERSION_STRING L"\\bin\\python.exe"));
if (pythonexeEnd == NULL) { if (pythonexeEnd == NULL) {
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment