From 9d921baa17c3ee8d3c7be0cab5980d0f66319891 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 27 Nov 2012 15:32:36 +0100 Subject: clean up PYTHON related version etc. variables: - configure defines PYTHON_VERSION, PYTHON_VERSION_MAJOR, PYTHON_VERSION_MINOR - remove pyversion.Makefile Change-Id: I19ac8df18a520ad56bf63ea038dc0769b8249d0b --- python3/CustomTarget_PythonFramework.mk | 28 ++++++++++++++-------------- python3/Module_python3.mk | 1 - python3/Package_python3_mk.mk | 15 --------------- python3/UnpackedTarball_python3.mk | 6 +----- python3/pyversion.Makefile | 22 ---------------------- 5 files changed, 15 insertions(+), 57 deletions(-) delete mode 100644 python3/Package_python3_mk.mk delete mode 100644 python3/pyversion.Makefile (limited to 'python3') diff --git a/python3/CustomTarget_PythonFramework.mk b/python3/CustomTarget_PythonFramework.mk index bfeaa154688d..8b0a065da4fd 100644 --- a/python3/CustomTarget_PythonFramework.mk +++ b/python3/CustomTarget_PythonFramework.mk @@ -35,13 +35,13 @@ python3_fw_prefix=$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@______ $(call gb_CustomTarget_get_target,python3/fixscripts): $(call gb_ExternalProject_get_target,python3) $(call gb_Output_announce,python3 - remove reference to installroot from scripts,build,CUS,5) $(COMMAND_ECHO)for file in \ - $(python3_fw_prefix)/Versions/$(python3_PYMAJOR).$(python3_PYMINOR)/bin/2to3 \ - $(python3_fw_prefix)/Versions/$(python3_PYMAJOR).$(python3_PYMINOR)/bin/2to3-$(python3_PYMAJOR).$(python3_PYMINOR) \ - $(python3_fw_prefix)/Versions/$(python3_PYMAJOR).$(python3_PYMINOR)/bin/idle$(python3_PYMAJOR).$(python3_PYMINOR) \ - $(python3_fw_prefix)/Versions/$(python3_PYMAJOR).$(python3_PYMINOR)/bin/pydoc$(python3_PYMAJOR).$(python3_PYMINOR) \ - $(python3_fw_prefix)/Versions/$(python3_PYMAJOR).$(python3_PYMINOR)/bin/python$(python3_PYMAJOR).$(python3_PYMINOR)-config \ - $(python3_fw_prefix)/Versions/$(python3_PYMAJOR).$(python3_PYMINOR)/bin/python$(python3_PYMAJOR).$(python3_PYMINOR)m-config \ - $(python3_fw_prefix)/Versions/$(python3_PYMAJOR).$(python3_PYMINOR)/bin/pyvenv-$(python3_PYMAJOR).$(python3_PYMINOR) ; do \ + $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/2to3 \ + $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/2to3-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \ + $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/idle$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \ + $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pydoc$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \ + $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)-config \ + $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m-config \ + $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pyvenv-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) ; do \ { rm "$$file" && awk '\ BEGIN {print "#!/bin/bash\n\ origpath=$$(pwd)\n\ @@ -56,20 +56,20 @@ cd \"$$origpath\"\n\ $(call gb_CustomTarget_get_target,python3/fixinstallnames): $(call gb_ExternalProject_get_target,python3) $(call gb_Output_announce,python3 - fix installname,build,CUS,5) install_name_tool -change \ - $(python3_fw_prefix)/Versions/$(python3_PYMAJOR).$(python3_PYMINOR)/LibreOfficePython \ + $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \ @executable_path/../../../../LibreOfficePython \ - $(python3_fw_prefix)/Versions/$(python3_PYMAJOR).$(python3_PYMINOR)/Resources/Python.app/Contents/MacOS/LibreOfficePython + $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/Resources/Python.app/Contents/MacOS/LibreOfficePython touch $@ # also delete binaries that are symlinked in scp2 $(call gb_CustomTarget_get_target,python3/executables): $(call gb_ExternalProject_get_target,python3) $(call gb_Output_announce,python3 - fix installnames in executables,build,CUS,5) - cd $(python3_fw_prefix)/Versions/$(python3_PYMAJOR).$(python3_PYMINOR)/bin ; \ - for file in python$(python3_PYMAJOR).$(python3_PYMINOR) \ - python$(python3_PYMAJOR).$(python3_PYMINOR)m \ - pythonw$(python3_PYMAJOR).$(python3_PYMINOR) ; do \ + cd $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin ; \ + for file in python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \ + python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \ + pythonw$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) ; do \ install_name_tool -change \ - $(python3_fw_prefix)/Versions/$(python3_PYMAJOR).$(python3_PYMINOR)/LibreOfficePython \ + $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \ @executable_path/../LibreOfficePython $$file ; done touch $@ diff --git a/python3/Module_python3.mk b/python3/Module_python3.mk index e9da887f6b7a..5ab63ba7d706 100644 --- a/python3/Module_python3.mk +++ b/python3/Module_python3.mk @@ -15,7 +15,6 @@ ifeq ($(SYSTEM_PYTHON),NO) $(eval $(call gb_Module_add_targets,python3,\ UnpackedTarball_python3 \ ExternalProject_python3 \ - Package_python3_mk \ $(if $(filter MACOSX,$(OS)),Zip_PythonFramework CustomTarget_PythonFramework,ExternalPackage_python3) \ )) diff --git a/python3/Package_python3_mk.mk b/python3/Package_python3_mk.mk deleted file mode 100644 index adb30bf553cb..000000000000 --- a/python3/Package_python3_mk.mk +++ /dev/null @@ -1,15 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# - -$(eval $(call gb_Package_Package,python3_mk,$(SRCDIR)/python3)) - -#FIXME why deliver that? -$(eval $(call gb_Package_add_file,python3_mk,inc/pyversion.Makefile,pyversion.Makefile)) - -# vim: set noet sw=4 ts=4: diff --git a/python3/UnpackedTarball_python3.mk b/python3/UnpackedTarball_python3.mk index d235e0accce8..d43ad8475400 100644 --- a/python3/UnpackedTarball_python3.mk +++ b/python3/UnpackedTarball_python3.mk @@ -9,11 +9,7 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,python3)) -#FIXME configure -PYTHON3_TARBALL := b3b2524f72409d919a4137826a870a8f-Python-3.3.0.tar.bz2 -python3_PYMAJOR=3 -python3_PYMINOR=3 -$(eval $(call gb_UnpackedTarball_set_tarball,python3,$(PYTHON3_TARBALL))) +$(eval $(call gb_UnpackedTarball_set_tarball,python3,$(PYTHON_TARBALL))) $(eval $(call gb_UnpackedTarball_fix_end_of_line,python3,\ PCbuild/pcbuild.sln \ diff --git a/python3/pyversion.Makefile b/python3/pyversion.Makefile deleted file mode 100644 index edcffd1da582..000000000000 --- a/python3/pyversion.Makefile +++ /dev/null @@ -1,22 +0,0 @@ -#FIXME move that to configure - -# when you want to change the python version, you must update the d.lst -# in the python project accordingly !!! -PYMAJOR:=3 -PYMINOR:=3 -PYMICRO:=0 -PYVERSION:=$(PYMAJOR).$(PYMINOR).$(PYMICRO) - -ifeq ($(GUI),UNX) -ifeq ($(OS),MACOSX) -PY_FULL_DLL_NAME:=libpython$(PYMAJOR).$(PYMINOR).a -else -PY_FULL_DLL_NAME:=libpython$(PYMAJOR).$(PYMINOR)m.so -endif -else -ifeq ($(COM),GCC) -PY_FULL_DLL_NAME:=libpython$(PYMAJOR).$(PYMINOR).dll -else -PY_FULL_DLL_NAME:=python$(PYMAJOR)$(PYMINOR).dll -endif -endif -- cgit