[Libreoffice-commits] core.git: python3/ExternalPackage_python3.mk pyuno/CustomTarget_zipcore.mk pyuno/Module_pyuno.mk RepositoryExternal.mk scp2/source solenv/gbuild

Michael Stahl mstahl at redhat.com
Mon Apr 22 04:33:45 PDT 2013


 RepositoryExternal.mk                   |   11 +--
 python3/ExternalPackage_python3.mk      |  104 ++++++++++++++++----------------
 pyuno/CustomTarget_zipcore.mk           |    2 
 pyuno/Module_pyuno.mk                   |   18 -----
 scp2/source/python/file_python.scp      |   45 ++-----------
 solenv/gbuild/platform/com_MSC_class.mk |    2 
 solenv/gbuild/platform/macosx.mk        |    2 
 solenv/gbuild/platform/solaris.mk       |    2 
 solenv/gbuild/platform/unxgcc.mk        |    2 
 9 files changed, 72 insertions(+), 116 deletions(-)

New commits:
commit b6bcbb675afedba0c47654dd78dc446dac0630d1
Author: Michael Stahl <mstahl at redhat.com>
Date:   Sun Apr 21 14:34:50 2013 +0200

    replace python-core zip built in pyuno with direct use of Package
    
    - python3: deliver files to INSTDIR, with same layout as instset
      and do not deliver .lib files
    - pyuno: remove obsolete python.bin targets
    - pyuno: remove usage of CustomTarget_zip for WNT and non-Mac UNX
      platforms (sadly it is apparently still needed for "system" python on
      MinGW)
    - scp2: use the python3 filelist
      There is still a problem here because the installer does not currently
      allow to preserve the executable bit on files in a filelist
    - RepositoryExternal: run python executable from INSTDIR
      and link against libraries in UnpackedTarball dir
    
    Change-Id: I931ca0a8be6ff40051b1ca50da1f0770e6057832
    Reviewed-on: https://gerrit.libreoffice.org/3525
    Tested-by: LibreOffice gerrit bot <gerrit at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index df44d2d..f3ee5dd 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -2300,15 +2300,16 @@ $(call gb_LinkTarget__use_python_headers,$(1))
 
 ifeq ($(OS),WNT)
 $(call gb_LinkTarget_add_libs,$(1),\
-	python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
+	$(call gb_UnpackedTarball_get_dir,python3)/$(if $(filter 90,$(VCVER)),PC/VS9.0,PCbuild)$(if $(filter X86_64,$(CPUNAME)),/amd64)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
 )
 else ifeq ($(OS),MACOSX)
 $(call gb_LinkTarget_add_libs,$(1),\
 	-F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
 )
 else
-$(call gb_LinkTarget_use_libraries,$(1),\
-	python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
+$(call gb_LinkTarget_add_libs,$(1),\
+	-L$(call gb_UnpackedTarball_get_dir,python3) \
+	-lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
 )
 endif
 
@@ -2888,8 +2889,8 @@ $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Zip_get_outdir_ta
 
 else
 
-$(call gb_ExternalExecutable_set_internal,python)
-$(call gb_ExternalExecutable_set_precommand,python,$(gb_PYTHON_PRECOMMAND))
+$(call gb_ExternalExecutable_set_internal,python,$(INSTDIR)/program/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
+$(call gb_ExternalExecutable_set_precommand,python,$(gb_Python_PRECOMMAND))
 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
 
 endif
diff --git a/python3/ExternalPackage_python3.mk b/python3/ExternalPackage_python3.mk
index 4f9c833..2ad0a7e 100644
--- a/python3/ExternalPackage_python3.mk
+++ b/python3/ExternalPackage_python3.mk
@@ -9,20 +9,20 @@
 
 $(eval $(call gb_ExternalPackage_ExternalPackage,python3,python3))
 
+$(eval $(call gb_ExternalPackage_set_outdir,python3,$(INSTDIR)))
+
 $(eval $(call gb_ExternalPackage_use_external_project,python3,python3))
 
 ifeq ($(OS)-$(COM),WNT-MSC)
 ifeq ($(CPUNAME),X86_64)
 python_arch_subdir=amd64/
 endif
-$(eval $(call gb_ExternalPackage_add_file,python3,bin/python.exe,LO_lib/$(python_arch_subdir)python$(if $(MSVC_USE_DEBUG_RUNTIME),_d).exe))
-$(eval $(call gb_ExternalPackage_add_file,python3,bin/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).dll,LO_lib/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).dll))
-$(eval $(call gb_ExternalPackage_add_file,python3,lib/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib,LO_lib/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib))
+$(eval $(call gb_ExternalPackage_add_file,python3,program/python-core-$(PYTHON_VERSION)/bin/python.exe,LO_lib/$(python_arch_subdir)python$(if $(MSVC_USE_DEBUG_RUNTIME),_d).exe))
+$(eval $(call gb_ExternalPackage_add_file,python3,program/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).dll,LO_lib/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).dll))
 ifeq ($(MSVC_USE_DEBUG_RUNTIME),)
-$(eval $(call gb_ExternalPackage_add_file,python3,bin/python$(PYTHON_VERSION_MAJOR).dll,LO_lib/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR).dll))
-$(eval $(call gb_ExternalPackage_add_file,python3,lib/python$(PYTHON_VERSION_MAJOR).lib,LO_lib/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR).lib))
+$(eval $(call gb_ExternalPackage_add_file,python3,program/python$(PYTHON_VERSION_MAJOR).dll,LO_lib/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR).dll))
 endif
-$(eval $(call gb_ExternalPackage_add_files,python3,lib/python,\
+$(eval $(call gb_ExternalPackage_add_files,python3,program/python-core-$(PYTHON_VERSION)/lib/lib-dynload,\
 	LO_lib/$(python_arch_subdir)_ctypes$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
 	LO_lib/$(python_arch_subdir)_ctypes_test$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
 	LO_lib/$(python_arch_subdir)_decimal$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
@@ -40,13 +40,13 @@ $(eval $(call gb_ExternalPackage_add_files,python3,lib/python,\
 ))
 else ifeq ($(OS),WNT) # MinGW
 # TODO how are C modules called on this platform?
-$(eval $(call gb_ExternalPackage_add_file,python3,bin/python.exe,python.exe))
-$(eval $(call gb_ExternalPackage_add_file,python3,bin/python$(PYTHON_VERSION_MAJOR).dll,python$(PYTHON_VERSION_MAJOR).dll))
+$(eval $(call gb_ExternalPackage_add_file,python3,program/python-core-$(PYTHON_VERSION)/bin/python.exe,python.exe))
+$(eval $(call gb_ExternalPackage_add_file,python3,program/python$(PYTHON_VERSION_MAJOR).dll,python$(PYTHON_VERSION_MAJOR).dll))
 else
-$(eval $(call gb_ExternalPackage_add_file,python3,bin/python,python))
-$(eval $(call gb_ExternalPackage_add_file,python3,lib/libpython$(PYTHON_VERSION_MAJOR).so,libpython$(PYTHON_VERSION_MAJOR).so))
-$(eval $(call gb_ExternalPackage_add_file,python3,lib/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so))
-$(eval $(call gb_ExternalPackage_add_file,python3,lib/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so-gdb.py,Tools/gdb/libpython.py))
+$(eval $(call gb_ExternalPackage_add_file,python3,program/python.bin,python))
+$(eval $(call gb_ExternalPackage_add_file,python3,program/libpython$(PYTHON_VERSION_MAJOR).so,libpython$(PYTHON_VERSION_MAJOR).so))
+$(eval $(call gb_ExternalPackage_add_file,python3,program/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so))
+$(eval $(call gb_ExternalPackage_add_file,python3,program/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so-gdb.py,Tools/gdb/libpython.py))
 # versioned lib/libpython3.3m.so.1.0 appears to be unnecessary?
 
 # Unfortunately the python build system does not allow to explicitly enable or
@@ -56,7 +56,7 @@ $(eval $(call gb_ExternalPackage_add_file,python3,lib/libpython$(PYTHON_VERSION_
 # Obviously this list should not contain stuff with external dependencies
 # that may not be available on baseline systems.
 ifneq ($(OS),AIX)
-$(eval $(call gb_ExternalPackage_add_files,python3,lib/python/lib-dynload,\
+$(eval $(call gb_ExternalPackage_add_files,python3,program/python-core-$(PYTHON_VERSION)/lib/lib-dynload,\
 	LO_lib/array.cpython-$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)m.so \
 	LO_lib/atexit.cpython-$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)m.so \
 	LO_lib/audioop.cpython-$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)m.so \
@@ -123,7 +123,7 @@ endif
 # test - probably unnecessary? was explicitly removed #i116738#
 # venv - why would we need virtual environments
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/plat-linux,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/plat-linux,\
 	Lib/plat-linux/regen \
 	Lib/plat-linux/CDROM.py \
 	Lib/plat-linux/DLFCN.py \
@@ -131,12 +131,12 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/plat-linu
 	Lib/plat-linux/TYPES.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/plat-darwin,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/plat-darwin,\
 	Lib/plat-darwin/IN.py \
 	Lib/plat-darwin/regen \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/plat-sunos5,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/plat-sunos5,\
 	Lib/plat-sunos5/regen \
 	Lib/plat-sunos5/CDIO.py \
 	Lib/plat-sunos5/DLFCN.py \
@@ -145,19 +145,19 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/plat-suno
 	Lib/plat-sunos5/TYPES.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/plat-aix4,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/plat-aix4,\
 	Lib/plat-aix4/regen \
 	Lib/plat-aix4/IN.py \
 ))
 
 # that one is generated...
 ifneq ($(OS)-$(COM),WNT-MSC)
-$(eval $(call gb_ExternalPackage_add_files,python3,lib/python,\
+$(eval $(call gb_ExternalPackage_add_files,python3,program/python-core-$(PYTHON_VERSION)/lib,\
 	Lib/_sysconfigdata.py \
 ))
 endif
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib,\
 	LICENSE \
 	Lib/__future__.py \
 	Lib/__phello__.foo.py \
@@ -316,31 +316,31 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python,\
 	Lib/zipfile.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/collections,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/collections,\
 	Lib/collections/__init__.py \
 	Lib/collections/__main__.py \
 	Lib/collections/abc.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/concurrent,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/concurrent,\
 	Lib/concurrent/__init__.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/concurrent/futures,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/concurrent/futures,\
 	Lib/concurrent/futures/__init__.py \
 	Lib/concurrent/futures/_base.py \
 	Lib/concurrent/futures/process.py \
 	Lib/concurrent/futures/thread.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/ctypes,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/ctypes,\
 	Lib/ctypes/__init__.py \
 	Lib/ctypes/_endian.py \
 	Lib/ctypes/util.py \
 	Lib/ctypes/wintypes.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/ctypes/macholib,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/ctypes/macholib,\
 	Lib/ctypes/macholib/README.ctypes \
 	Lib/ctypes/macholib/fetch_macholib \
 	Lib/ctypes/macholib/fetch_macholib.bat \
@@ -350,7 +350,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/ctypes/ma
 	Lib/ctypes/macholib/framework.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/distutils,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/distutils,\
 	Lib/distutils/README \
 	Lib/distutils/__init__.py \
 	Lib/distutils/archive_util.py \
@@ -382,7 +382,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/distutils
 	Lib/distutils/version.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/distutils/command,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/distutils/command,\
 	Lib/distutils/command/__init__.py \
 	Lib/distutils/command/bdist_dumb.py \
 	Lib/distutils/command/bdist_msi.py \
@@ -415,7 +415,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/distutils
 	Lib/distutils/command/wininst-9.0.exe \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/email,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/email,\
 	Lib/email/__init__.py \
 	Lib/email/_encoded_words.py \
 	Lib/email/_header_value_parser.py \
@@ -438,7 +438,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/email,\
 	Lib/email/utils.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/email/mime,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/email/mime,\
 	Lib/email/mime/__init__.py \
 	Lib/email/mime/application.py \
 	Lib/email/mime/audio.py \
@@ -450,7 +450,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/email/mim
 	Lib/email/mime/text.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/encodings,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/encodings,\
 	Lib/encodings/__init__.py \
 	Lib/encodings/aliases.py \
 	Lib/encodings/ascii.py \
@@ -573,13 +573,13 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/encodings
 	Lib/encodings/zlib_codec.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/html,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/html,\
 	Lib/html/__init__.py \
 	Lib/html/entities.py \
 	Lib/html/parser.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/http,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/http,\
 	Lib/http/__init__.py \
 	Lib/http/client.py \
 	Lib/http/cookiejar.py \
@@ -587,7 +587,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/http,\
 	Lib/http/server.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/importlib,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/importlib,\
 	Lib/importlib/__init__.py \
 	Lib/importlib/_bootstrap.py \
 	Lib/importlib/abc.py \
@@ -595,7 +595,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/importlib
 	Lib/importlib/util.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/json,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/json,\
 	Lib/json/__init__.py \
 	Lib/json/decoder.py \
 	Lib/json/encoder.py \
@@ -603,7 +603,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/json,\
 	Lib/json/tool.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/lib2to3,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/lib2to3,\
 	Lib/lib2to3/Grammar.txt \
 	Lib/lib2to3/PatternGrammar.txt \
 	Lib/lib2to3/__init__.py \
@@ -619,7 +619,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/lib2to3,\
 	Lib/lib2to3/refactor.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/lib2to3/fixes,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/lib2to3/fixes,\
 	Lib/lib2to3/fixes/__init__.py \
 	Lib/lib2to3/fixes/fix_apply.py \
 	Lib/lib2to3/fixes/fix_basestring.py \
@@ -674,7 +674,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/lib2to3/f
 	Lib/lib2to3/fixes/fix_zip.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/pgen2,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/pgen2,\
 	Lib/lib2to3/pgen2/__init__.py \
 	Lib/lib2to3/pgen2/conv.py \
 	Lib/lib2to3/pgen2/driver.py \
@@ -686,13 +686,13 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/pgen2,\
 	Lib/lib2to3/pgen2/token.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/logging,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/logging,\
 	Lib/logging/__init__.py \
 	Lib/logging/config.py \
 	Lib/logging/handlers.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/multiprocessing,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/multiprocessing,\
 	Lib/multiprocessing/__init__.py \
 	Lib/multiprocessing/connection.py \
 	Lib/multiprocessing/forking.py \
@@ -707,18 +707,18 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/multiproc
 	Lib/multiprocessing/util.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/multiprocessing/dummy,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/multiprocessing/dummy,\
 	Lib/multiprocessing/dummy/__init__.py \
 	Lib/multiprocessing/dummy/connection.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/pydoc_data,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/pydoc_data,\
 	Lib/pydoc_data/__init__.py \
 	Lib/pydoc_data/_pydoc.css \
 	Lib/pydoc_data/topics.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/unittest,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/unittest,\
 	Lib/unittest/__init__.py \
 	Lib/unittest/__main__.py \
 	Lib/unittest/case.py \
@@ -732,7 +732,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/unittest,
 	Lib/unittest/util.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/unittest/test,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/unittest/test,\
 	Lib/unittest/test/__init__.py \
 	Lib/unittest/test/dummy.py \
 	Lib/unittest/test/support.py \
@@ -751,7 +751,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/unittest/
 	Lib/unittest/test/_test_warnings.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/unittest/test/testmock,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/unittest/test/testmock,\
 	Lib/unittest/test/testmock/__init__.py \
 	Lib/unittest/test/testmock/support.py \
 	Lib/unittest/test/testmock/testcallable.py \
@@ -763,7 +763,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/unittest/
 	Lib/unittest/test/testmock/testwith.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/urllib,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/urllib,\
 	Lib/urllib/__init__.py \
 	Lib/urllib/error.py \
 	Lib/urllib/parse.py \
@@ -772,7 +772,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/urllib,\
 	Lib/urllib/robotparser.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/wsgiref,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/wsgiref,\
 	Lib/wsgiref/__init__.py \
 	Lib/wsgiref/handlers.py \
 	Lib/wsgiref/headers.py \
@@ -781,11 +781,11 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/wsgiref,\
 	Lib/wsgiref/validate.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/xml,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/xml,\
 	Lib/xml/__init__.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/xml/dom,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/xml/dom,\
 	Lib/xml/dom/__init__.py \
 	Lib/xml/dom/NodeFilter.py \
 	Lib/xml/dom/domreg.py \
@@ -796,7 +796,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/xml/dom,\
 	Lib/xml/dom/xmlbuilder.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/xml/etree,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/xml/etree,\
 	Lib/xml/etree/__init__.py \
 	Lib/xml/etree/ElementInclude.py \
 	Lib/xml/etree/ElementPath.py \
@@ -804,12 +804,12 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/xml/etree
 	Lib/xml/etree/cElementTree.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/xml/parsers,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/xml/parsers,\
 	Lib/xml/parsers/__init__.py \
 	Lib/xml/parsers/expat.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/xml/sax,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/xml/sax,\
 	Lib/xml/sax/__init__.py \
 	Lib/xml/sax/_exceptions.py \
 	Lib/xml/sax/expatreader.py \
@@ -818,13 +818,13 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/xml/sax,\
 	Lib/xml/sax/xmlreader.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/xmlrpc,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/xmlrpc,\
 	Lib/xmlrpc/__init__.py \
 	Lib/xmlrpc/client.py \
 	Lib/xmlrpc/server.py \
 ))
 
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,lib/python/site-packages,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,program/python-core-$(PYTHON_VERSION)/lib/site-packages,\
 	Lib/site-packages/README \
 ))
 
diff --git a/pyuno/CustomTarget_zipcore.mk b/pyuno/CustomTarget_zipcore.mk
index 35be5d9..06d98fe 100644
--- a/pyuno/CustomTarget_zipcore.mk
+++ b/pyuno/CustomTarget_zipcore.mk
@@ -33,7 +33,7 @@ ifeq ($(OS)$(COM),WNTGCC)
 pyuno_PYTHON_LIB_DIR=$(MINGW_SYSROOT)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)
 endif
 else
-pyuno_PYTHON_LIB_DIR=$(OUTDIR)/lib/python
+$(error SHOULD NOT GET HERE)
 endif
 
 pyuno_PYTHON_ARCHIVE_NAME:=python-core-$(PYTHON_VERSION).zip
diff --git a/pyuno/Module_pyuno.mk b/pyuno/Module_pyuno.mk
index a4f7663..1749e67 100644
--- a/pyuno/Module_pyuno.mk
+++ b/pyuno/Module_pyuno.mk
@@ -62,26 +62,12 @@ $(eval $(call gb_Module_add_targets,pyuno,\
     CustomTarget_python_shell \
     Package_python_shell \
 ))
-ifneq ($(OS),MACOSX)
-$(eval $(call gb_Module_add_targets,pyuno,\
-    CustomTarget_python_bin \
-    Package_python_bin \
-))
-endif
-endif
-
-# python-zipcore-$(PYVESION) not on MACOSX
-# (OOoPython.framework.zip is already delivered for MACOSX in python module)
-ifneq ($(OS),MACOSX)
-$(eval $(call gb_Module_add_targets,pyuno,\
-    CustomTarget_zipcore \
-    Package_zipcore \
-))
 endif
 
 else # SYSTEM_PYTHON
 
-# previous two targets has to be executed also with system-python on mingw
+# these two targets have to be executed only with system-python on mingw
+# FIXME remove this
 ifeq ($(OS)$(COM),WNTGCC)
 $(eval $(call gb_Module_add_targets,pyuno,\
     CustomTarget_zipcore \
diff --git a/scp2/source/python/file_python.scp b/scp2/source/python/file_python.scp
index 5dba2c7..c065ea4 100644
--- a/scp2/source/python/file_python.scp
+++ b/scp2/source/python/file_python.scp
@@ -102,15 +102,16 @@ End
 #endif
 
 File gid_File_Py_Python_Core
-    TXT_FILE_BODY;
+//FIXME  the binaries and libs in the package need x bit but USE_INTERNAL_RIGHTS does not work so set BIN_FILE_BODY here as a temporary hack which makes everything executable
+    BIN_FILE_BODY;
   #ifdef MACOSX
     Dir = gid_Brand_Dir_Program;
     Name = "LibreOfficePython.framework.zip";
     Styles = (ARCHIVE,USE_INTERNAL_RIGHTS);
   #else
-    Dir = gid_Dir_Py_PythonCore_Lib;
-    Name = STRING(CONCAT3(python-core-,PYVERSION,.zip));
-    Styles = (ARCHIVE);
+    Dir = FILELIST_DIR;
+    Name = "python3.filelist";
+    Styles = (FILELIST,USE_INTERNAL_RIGHTS);
   #endif
 End
 
@@ -121,20 +122,7 @@ Directory gid_Dir_Py_PythonCore_Bin
 End
 #endif
 
-#ifndef MACOSX
-File gid_File_Py_Python_Bin
-    BIN_FILE_BODY;
-#ifdef UNX
-    Dir = gid_Brand_Dir_Program;
-    Name = "python.bin";
-#else
-    Dir = gid_Dir_Py_PythonCore_Bin;
-    Name = EXENAME(python);
-#endif
-    Styles = (PACKED);
-End
-#endif
-#endif
+#endif // SYSTEM_PYTHON
 
 //Scripting Framework Python example scripts
 
@@ -155,26 +143,7 @@ File gid_File_Share_Registry_Pyuno_Xcd
 End
 
 #ifndef SYSTEM_PYTHON
-#ifndef MACOSX
-File gid_File_Lib_Python_So
-    LIB_FILE_BODY;
-    Dir = gid_Brand_Dir_Program;
-    Name = STRING(PY_FULL_DLL_NAME);
-    Styles = (PACKED);
-End
-#ifndef MSVC_PKG_DEBUG_RUNTIME
-File gid_File_Lib_Python3_So
-    LIB_FILE_BODY;
-    Dir = gid_Brand_Dir_Program;
-#ifdef UNX
-    Name = STRING(CONCAT3(libpython,PYMAJOR,UNXSUFFIX));
-#else // WNT
-    Name = STRING(CONCAT3(python,PYMAJOR,.dll));
-#endif //UNX
-    Styles = (PACKED);
-End
-#endif
-#else //MACOSX
+#ifdef MACOSX
 //directory entries solely to be able to create the symlinks
 Directory gid_Dir_PythonFramework
     ParentID = gid_Brand_Dir_Program;
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 6457e9c..2d8c95f 100755
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -623,7 +623,7 @@ gb_UIMenubarTarget_UIMenubarTarget_platform :=
 gb_Pyuno_PROGRAMDIRNAME := program
 
 # Python
-gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME="$(OUTDIR_FOR_BUILD)/lib/python" PYTHONPATH="$(OUTDIR_FOR_BUILD)/lib/python;$(OUTDIR_FOR_BUILD)/lib/python/lib-dynload"
+gb_Python_PRECOMMAND := PATH="$(shell cygpath -w $(INSTDIR)/program);$(shell cygpath -w $(OUTDIR)/bin)" PYTHONHOME="$(INSTDIR)/program/python-core-$(PYTHON_VERSION)" PYTHONPATH="$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib;$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib/lib-dynload:$(INSTDIR)/program"
 gb_Python_INSTALLED_EXECUTABLE := $(DEVINSTALLDIR)/opt/program/python.exe
 
 # vim: set noet sw=4:
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index c7c093d..eb77418 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -402,7 +402,7 @@ $(call gb_UIMenubarTarget_get_target,$(1)) :| $(call gb_ExternalExecutable_get_d
 endef
 
 # Python
-gb_PYTHON_PRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib
+gb_Python_PRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib
 gb_Python_INSTALLED_EXECUTABLE := $(DEVINSTALLDIR)/opt/LibreOffice.app/Contents/MacOS/LibreOfficePython.framework/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/Resources/Python.app/Contents/MacOS/LibreOfficePython
 # this is passed to gdb as executable when running tests
 gb_Python_INSTALLED_EXECUTABLE_GDB := $(gb_Python_INSTALLED_EXECUTABLE)
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 8ec01c5..c297334 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -434,7 +434,7 @@ gb_UIMenubarTarget_UIMenubarTarget_platform :=
 gb_Pyuno_PROGRAMDIRNAME := program
 
 # Python
-gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME=$(OUTDIR)/lib/python PYTHONPATH=$(OUTDIR)/lib/python:$(OUTDIR)/lib/python/lib-dynload
+gb_Python_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME="$(INSTDIR)/program/python-core-$(PYTHON_VERSION)" PYTHONPATH="$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib:$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib/lib-dynload"
 gb_Python_INSTALLED_EXECUTABLE := /bin/sh $(DEVINSTALLDIR)/opt/program/python
 # this is passed to gdb as executable when running tests
 gb_Python_INSTALLED_EXECUTABLE_GDB := $(DEVINSTALLDIR)/opt/program/python.bin
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 4a593be..fc53365 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -433,7 +433,7 @@ gb_UIMenubarTarget_UIMenubarTarget_platform :=
 gb_Pyuno_PROGRAMDIRNAME := program
 
 # Python
-gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME=$(OUTDIR)/lib/python PYTHONPATH=$(OUTDIR)/lib/python:$(OUTDIR)/lib/python/lib-dynload
+gb_Python_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME="$(INSTDIR)/program/python-core-$(PYTHON_VERSION)" PYTHONPATH="$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib:$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib/lib-dynload"
 gb_Python_INSTALLED_EXECUTABLE := /bin/sh $(DEVINSTALLDIR)/opt/program/python
 # this is passed to gdb as executable when running tests
 gb_Python_INSTALLED_EXECUTABLE_GDB := $(DEVINSTALLDIR)/opt/program/python.bin


More information about the Libreoffice-commits mailing list