From e16ac6937245977b7900c48a408be2c589f6a0a6 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Sun, 27 May 2012 22:50:41 +0200 Subject: gbuild migration: pyuno module Change-Id: I7f923a5622214f7540a789bcdd93bf6fd1d166db --- Makefile.top | 2 +- Module_tail_build.mk | 1 + Repository.mk | 4 ++ RepositoryExternal.mk | 51 ++++++++++++++++++ RepositoryFixes.mk | 12 +++++ postprocess/packcomponents/makefile.mk | 2 +- pyuno/CustomTarget_python_bin.mk | 40 ++++++++++++++ pyuno/CustomTarget_python_shell.mk | 50 ++++++++++++++++++ pyuno/CustomTarget_python_wrapper.mk | 36 +++++++++++++ pyuno/CustomTarget_pyversion.mk | 39 ++++++++++++++ pyuno/CustomTarget_zipcore.mk | 47 +++++++++++++++++ pyuno/Executable_python_wrapper.mk | 41 +++++++++++++++ pyuno/Library_pythonloader.mk | 56 ++++++++++++++++++++ pyuno/Library_pyuno.mk | 66 ++++++++++++++++++++++++ pyuno/Library_pyuno_wrapper.mk | 65 +++++++++++++++++++++++ pyuno/Makefile | 7 +++ pyuno/Module_pyuno.mk | 86 +++++++++++++++++++++++++++++++ pyuno/Package_python_bin.mk | 31 +++++++++++ pyuno/Package_python_scripts.mk | 39 ++++++++++++++ pyuno/Package_python_shell.mk | 31 +++++++++++ pyuno/Package_pyunorc.mk | 31 +++++++++++ pyuno/Package_zipcore.mk | 35 +++++++++++++ pyuno/inc/pyuno/pyuno.hxx | 15 +++--- pyuno/prj/build.lst | 6 +-- pyuno/prj/dmake | 0 pyuno/source/module/pyuno_dlopenwrapper.c | 4 +- pyuno/source/module/pyuno_module.cxx | 2 +- scp2/source/ooo/common_brand.scp | 11 ---- scp2/source/python/file_python.scp | 36 +++++++++++-- scp2/source/python/module_python.scp | 18 ++++++- tools/StaticLibrary_ooopathutils.mk | 18 ------- 31 files changed, 832 insertions(+), 50 deletions(-) create mode 100644 pyuno/CustomTarget_python_bin.mk create mode 100644 pyuno/CustomTarget_python_shell.mk create mode 100755 pyuno/CustomTarget_python_wrapper.mk create mode 100644 pyuno/CustomTarget_pyversion.mk create mode 100644 pyuno/CustomTarget_zipcore.mk create mode 100644 pyuno/Executable_python_wrapper.mk create mode 100644 pyuno/Library_pythonloader.mk create mode 100644 pyuno/Library_pyuno.mk create mode 100644 pyuno/Library_pyuno_wrapper.mk create mode 100644 pyuno/Makefile create mode 100755 pyuno/Module_pyuno.mk create mode 100644 pyuno/Package_python_bin.mk create mode 100644 pyuno/Package_python_scripts.mk create mode 100644 pyuno/Package_python_shell.mk create mode 100644 pyuno/Package_pyunorc.mk create mode 100644 pyuno/Package_zipcore.mk delete mode 100644 pyuno/prj/dmake diff --git a/Makefile.top b/Makefile.top index 0d002dd49625..2b04790a95b1 100644 --- a/Makefile.top +++ b/Makefile.top @@ -91,6 +91,7 @@ package\ packimages\ padmin\ psprint_config\ +pyuno\ qadevOOo\ regexp\ registry\ @@ -228,7 +229,6 @@ pango\ postgresql\ postprocess\ python\ -pyuno\ readlicense_oo\ redland\ rhino\ diff --git a/Module_tail_build.mk b/Module_tail_build.mk index 334bce88b2d4..f6b9a9db8284 100644 --- a/Module_tail_build.mk +++ b/Module_tail_build.mk @@ -78,6 +78,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\ package \ padmin \ psprint_config \ + pyuno \ $(if $(filter QADEVOOO,$(BUILD_TYPE)),\ qadevOOo \ ) \ diff --git a/Repository.mk b/Repository.mk index 2ac927d3dbdf..2c465c2ac461 100644 --- a/Repository.mk +++ b/Repository.mk @@ -105,6 +105,7 @@ $(eval $(call gb_Helper_register_executables,OOO,\ langsupport \ odbcconfig \ officeloader \ + python_wrapper \ quickstart \ sbase \ scalc \ @@ -447,6 +448,8 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \ mozbootstrap \ officebean \ package2 \ + pyuno \ + pyuno_wrapper \ recentfile \ scriptframe \ sdbc2 \ @@ -554,6 +557,7 @@ $(eval $(call gb_Helper_register_libraries,UNOLIBS_OOO, \ nullcanvas \ OGLTrans \ passwordcontainer \ + pythonloader \ postgresql-sdbc \ postgresql-sdbc-impl \ simplecanvas \ diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 226ee034f42d..1ce7c59ae606 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -1616,6 +1616,57 @@ endef endif # ENABLE_GCONF +# PYTHON +ifeq ($(SYSTEM_PYTHON),YES) + +define gb_LinkTarget__use_python +$(call gb_LinkTarget_add_defs,$(1),\ + $(filter-out -I%,$(PYTHON_CFLAGS)) \ +) + +$(call gb_LinkTarget_set_include,$(1),\ + $(filter -I%,$(PYTHON_CFLAGS)) \ + $$(INCLUDE) \ +) + +$(call gb_LinkTarget_add_libs,$(1),\ + $(PYTHON_LIBS) \ +) + +endef + +else # !SYSTEM_PYTHON + +define gb_LinkTarget__use_python + +ifeq ($(OS),WNT) +$(call gb_LinkTarget_add_libs,$(1),\ + python26.lib \ +) +else ifeq ($(OS),MACOSX) +$(call gb_LinkTarget_add_libs,$(1),\ + -F $(OUTDIR)/lib -framework OOoPython \ +) +else +$(call gb_LinkTarget_use_libraries,$(1),\ + python2.6 \ +) +endif + +$(call gb_LinkTarget_set_include,$(1),\ + -I$(OUTDIR)/inc/python \ + $$(INCLUDE) \ +) + +endef + +$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\ + python2.6 \ +)) + +endif # SYSTEM_PYTHON + + # MacOSX-only frameworks ############################################ # (in alphabetical order) diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk index dfdba60de5e8..45833b96639f 100644 --- a/RepositoryFixes.mk +++ b/RepositoryFixes.mk @@ -42,6 +42,15 @@ gb_Library_FILENAMES := $(patsubst reg:libuno_reg%,reg:libreg%,$(gb_Library_FILE gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salhelper%,$(gb_Library_FILENAMES)) gb_Library_FILENAMES := $(patsubst store:libuno_store%,store:libstore%,$(gb_Library_FILENAMES)) gb_Library_FILENAMES := $(patsubst ucbhelper:libucbhelper%,ucbhelper:libucbhelper4%,$(gb_Library_FILENAMES)) + +ifeq ($(OS),MACOSX) +# libpyuno_wrapper.so => pyuno.dyn +gb_Library_FILENAMES := $(patsubst pyuno_wrapper:libpyuno_wrapper.so,pyuno_wrapper:pyuno.dyn,$(gb_Library_FILENAMES)) +else +# libpyuno_wrapper.so => pyuno.so +gb_Library_FILENAMES := $(patsubst pyuno_wrapper:libpyuno_wrapper.so,pyuno_wrapper:pyuno.so,$(gb_Library_FILENAMES)) +endif + ifneq ($(OS),ANDROID) gb_Library_FILENAMES := $(patsubst unobootstrapprotector:libuno%,unobootstrapprotector:uno%,$(gb_Library_FILENAMES)) gb_Library_FILENAMES := $(patsubst unoexceptionprotector:libuno%,unoexceptionprotector:uno%,$(gb_Library_FILENAMES)) @@ -58,6 +67,9 @@ gb_Library_DLLFILENAMES := $(patsubst ucbhelper:ucbhelper%,ucbhelper:ucbhelper4% gb_Library_DLLFILENAMES := $(patsubst unsafe_uno:unsafe_uno%,unsafe_uno:unsafe_uno_uno%,$(gb_Library_DLLFILENAMES)) gb_Library_DLLFILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_DLLFILENAMES)) +# libpyuno_wrapper.dll => pyuno.pyd +gb_Library_DLLFILENAMES := $(patsubst pyuno:pyuno.dll,pyuno:pyuno.pyd,$(gb_Library_DLLFILENAMES)) + gb_Library_FILENAMES := $(patsubst sb:isb%,sb:basic%,$(gb_Library_FILENAMES)) gb_Library_FILENAMES := $(patsubst sfx:isfx%,sfx:sfx%,$(gb_Library_FILENAMES)) gb_Library_FILENAMES := $(patsubst svt:isvt%,svt:svtool%,$(gb_Library_FILENAMES)) diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk index 5ff27d5189ae..463fd4b4305d 100644 --- a/postprocess/packcomponents/makefile.mk +++ b/postprocess/packcomponents/makefile.mk @@ -203,7 +203,7 @@ my_components += \ .IF "$(DISABLE_PYTHON)" != "TRUE" my_components += \ - pythonloader \ + component/pyuno/source/loader/pythonloader \ .ENDIF diff --git a/pyuno/CustomTarget_python_bin.mk b/pyuno/CustomTarget_python_bin.mk new file mode 100644 index 000000000000..044bb68a8bcb --- /dev/null +++ b/pyuno/CustomTarget_python_bin.mk @@ -0,0 +1,40 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 David Ostrovsky (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_CustomTarget_CustomTarget,pyuno/python_bin)) + +# do we need it here: $(gb_Executable_EXT)? +$(call gb_CustomTarget_get_target,pyuno/python_bin) : \ + $(call gb_CustomTarget_get_workdir,pyuno/python_bin)/python.bin + +$(call gb_CustomTarget_get_workdir,pyuno/python_bin)/python.bin : $(OUTDIR)/bin/python | \ + $(call gb_CustomTarget_get_workdir,pyuno/python_bin)/.dir + $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),COP,1) + cp $< $@.tmp + strip $@.tmp + mv $@.tmp $@ + +# vim: set noet sw=4 ts=4: diff --git a/pyuno/CustomTarget_python_shell.mk b/pyuno/CustomTarget_python_shell.mk new file mode 100644 index 000000000000..cf64f533ba7b --- /dev/null +++ b/pyuno/CustomTarget_python_shell.mk @@ -0,0 +1,50 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 David Ostrovsky (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_CustomTarget_CustomTarget,pyuno/python_shell)) + +$(call gb_CustomTarget_get_target,pyuno/python_shell) : \ + $(call gb_CustomTarget_get_workdir,pyuno/python_shell)/python.sh + +include $(OUTDIR)/inc/pyversion.Makefile + +ifeq ($(OS),MACOSX) +pyuno_PYTHON_SHELL_VERSION:=$(PYMAJOR).$(PYMINOR) +pyuno_PYTHON_SHELL_STRIPRULE:=-e '/^NONMACSECTION/,/^MACSECTION/d' +else +pyuno_PYTHON_SHELL_VERSION:=$(PYVERSION) +pyuno_PYTHON_SHELL_STRIPRULE:=-e '/^NONMACSECTION/d' -e '/^MACSECTION/,$$d' +endif + +$(call gb_CustomTarget_get_workdir,pyuno/python_shell)/python.sh : $(SRCDIR)/pyuno/zipcore/python.sh | \ + $(call gb_CustomTarget_get_workdir,pyuno/python_shell)/.dir + $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1) + sed -e "s/%%PYVERSION%%/$(pyuno_PYTHON_SHELL_VERSION)/g" -e \ + "s/%%OOO_LIBRARY_PATH_VAR%%/$(gb_Helper_LIBRARY_PATH_VAR)/g" \ + $(pyuno_PYTHON_SHELL_STRIPRULE) < $? > $@ + chmod +x $@ + +# vim: set noet sw=4 ts=4: diff --git a/pyuno/CustomTarget_python_wrapper.mk b/pyuno/CustomTarget_python_wrapper.mk new file mode 100755 index 000000000000..9f459a1c551d --- /dev/null +++ b/pyuno/CustomTarget_python_wrapper.mk @@ -0,0 +1,36 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 David Ostrovsky (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_CustomTarget_CustomTarget,pyuno/python_wrapper)) + +python_wrapper_TARGET := $(OUTDIR)/bin/pyuno/python.exe + +$(call gb_CustomTarget_get_target,pyuno/python_wrapper) : $(python_wrapper_TARGET) + +$(python_wrapper_TARGET) : $(call gb_Executable_get_target,python_wrapper) + cp $< $@ + +# vim: set noet sw=4 ts=4: diff --git a/pyuno/CustomTarget_pyversion.mk b/pyuno/CustomTarget_pyversion.mk new file mode 100644 index 000000000000..8766e7e348b9 --- /dev/null +++ b/pyuno/CustomTarget_pyversion.mk @@ -0,0 +1,39 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 David Ostrovsky (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_CustomTarget_CustomTarget,pyuno/pyversion)) + +$(call gb_CustomTarget_get_target,pyuno/pyversion) : \ + $(call gb_CustomTarget_get_workdir,pyuno/pyversion)/pyversion.hxx + +include $(OUTDIR)/inc/pyversion.Makefile + +$(call gb_CustomTarget_get_workdir,pyuno/pyversion)/pyversion.hxx : $(SRCDIR)/pyuno/zipcore/pyversion.inc | \ + $(call gb_CustomTarget_get_workdir,pyuno/pyversion)/.dir + $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1) + sed -e "s/@/$(PYVERSION)/g" < $? > $@ + +# vim: set noet sw=4 ts=4: diff --git a/pyuno/CustomTarget_zipcore.mk b/pyuno/CustomTarget_zipcore.mk new file mode 100644 index 000000000000..ba220845b6f5 --- /dev/null +++ b/pyuno/CustomTarget_zipcore.mk @@ -0,0 +1,47 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 David Ostrovsky (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_CustomTarget_CustomTarget,pyuno/zipcore)) + +include $(OUTDIR)/inc/pyversion.Makefile +pyuno_PYTHON_ARCHIVE_NAME:=python-core-$(PYVERSION).zip +FIND=find +GREP=grep + +$(call gb_CustomTarget_get_target,pyuno/zipcore) : \ + $(call gb_CustomTarget_get_workdir,pyuno/zipcore)/$(pyuno_PYTHON_ARCHIVE_NAME) + +# capture the files to have them in prerequisite list +pyuno_zipcore_FINDLIBFILES:=\ + $(shell $(FIND) $(OUTDIR)/lib/python -type f| $(GREP) -v "\.pyc" | $(GREP) -v "\.py~" | $(GREP) -v .orig | $(GREP) -v _failed) + +# create zip archive +$(call gb_CustomTarget_get_workdir,pyuno/zipcore)/$(pyuno_PYTHON_ARCHIVE_NAME) : $(pyuno_zipcore_FINDLIBFILES) | \ + $(call gb_CustomTarget_get_workdir,pyuno/zipcore)/.dir + $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ZIP,1) + cd $(OUTDIR)/lib/python && zip $@ $(shell cd $(OUTDIR)/lib/python && $(FIND) . -type f | $(GREP) -v "\.pyc" | $(GREP) -v "\.py~" | $(GREP) -v .orig | $(GREP) -v _failed) + +# vim: set noet sw=4 ts=4: diff --git a/pyuno/Executable_python_wrapper.mk b/pyuno/Executable_python_wrapper.mk new file mode 100644 index 000000000000..709db4d349aa --- /dev/null +++ b/pyuno/Executable_python_wrapper.mk @@ -0,0 +1,41 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 David Ostrovsky (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Executable_Executable,python_wrapper)) + +$(eval $(call gb_Executable_use_static_libraries,python_wrapper,\ + ooopathutils \ +)) + +$(eval $(call gb_Executable_use_custom_headers,python_wrapper,\ + pyuno/pyversion \ +)) + +$(eval $(call gb_Executable_add_noexception_objects,python_wrapper,\ + pyuno/zipcore/python \ +)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/pyuno/Library_pythonloader.mk b/pyuno/Library_pythonloader.mk new file mode 100644 index 000000000000..d57168d1badb --- /dev/null +++ b/pyuno/Library_pythonloader.mk @@ -0,0 +1,56 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 David Ostrovsky (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Library_Library,pythonloader)) + +$(eval $(call gb_Library_set_componentfile,pythonloader,pyuno/source/loader/pythonloader)) + +$(eval $(call gb_Library_set_include,pythonloader,\ + -I$(SRCDIR)/pyuno/source/loader \ + -I$(SRCDIR)/pyuno/inc \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_Library_use_api,pythonloader,\ + udkapi \ +)) + +$(eval $(call gb_Library_use_libraries,pythonloader,\ + cppu \ + cppuhelper \ + pyuno \ + sal \ +)) + +$(eval $(call gb_Library_use_externals,pythonloader,\ + python \ +)) + +$(eval $(call gb_Library_add_exception_objects,pythonloader,\ + pyuno/source/loader/pyuno_loader \ +)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/pyuno/Library_pyuno.mk b/pyuno/Library_pyuno.mk new file mode 100644 index 000000000000..8ecda3dbc64a --- /dev/null +++ b/pyuno/Library_pyuno.mk @@ -0,0 +1,66 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 David Ostrovsky (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Library_Library,pyuno)) + +$(eval $(call gb_Library_set_include,pyuno,\ + -I$(SRCDIR)/pyuno/source/loader \ + -I$(SRCDIR)/pyuno/inc \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_Library_add_defs,pyuno,\ + -DLO_DLLIMPLEMENTATION_PYUNO \ +)) + +$(eval $(call gb_Library_use_api,pyuno,\ + udkapi \ +)) + +$(eval $(call gb_Library_use_libraries,pyuno,\ + cppu \ + cppuhelper \ + sal \ + salhelper \ +)) + +$(eval $(call gb_Library_use_externals,pyuno,\ + python \ +)) + +$(eval $(call gb_Library_add_exception_objects,pyuno,\ + pyuno/source/module/pyuno_runtime \ + pyuno/source/module/pyuno \ + pyuno/source/module/pyuno_callable \ + pyuno/source/module/pyuno_module \ + pyuno/source/module/pyuno_type \ + pyuno/source/module/pyuno_util \ + pyuno/source/module/pyuno_except \ + pyuno/source/module/pyuno_adapter \ + pyuno/source/module/pyuno_gc \ +)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/pyuno/Library_pyuno_wrapper.mk b/pyuno/Library_pyuno_wrapper.mk new file mode 100644 index 000000000000..eba06d6d164d --- /dev/null +++ b/pyuno/Library_pyuno_wrapper.mk @@ -0,0 +1,65 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 David Ostrovsky (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Library_Library,pyuno_wrapper)) + +$(eval $(call gb_Library_set_include,pyuno_wrapper,\ + -I$(SRCDIR)/pyuno/source/module \ + -I$(SRCDIR)/pyuno/inc \ + $$(INCLUDE) \ +)) + +# not using here external +# because we do not want to link here +# against python! +# we need only -Idirective +ifeq ($(SYSTEM_PYTHON),YES) +$(eval $(call gb_Library_set_include,pyuno_wrapper,\ + $(PYTHON_CFLAGS) \ + $$(INCLUDE) \ +)) +else +$(eval $(call gb_Library_set_include,pyuno_wrapper,\ + -I$(OUTDIR)/inc/python \ + $$(INCLUDE) \ +)) +endif + +ifneq ($(GUI)$(COM),WNTMSC) +ifneq ($(OS),MACOSX) + +$(eval $(call gb_Library_add_libs,pyuno_wrapper,\ + -ldl \ +)) + +endif +endif + +$(eval $(call gb_Library_add_cobjects,pyuno_wrapper,\ + pyuno/source/module/pyuno_dlopenwrapper \ +)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/pyuno/Makefile b/pyuno/Makefile new file mode 100644 index 000000000000..ccb1c85a04da --- /dev/null +++ b/pyuno/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/pyuno/Module_pyuno.mk b/pyuno/Module_pyuno.mk new file mode 100755 index 000000000000..0f15ac5be631 --- /dev/null +++ b/pyuno/Module_pyuno.mk @@ -0,0 +1,86 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 David Ostrovsky (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Module_Module,pyuno)) + +ifneq ($(DISABLE_PYTHON),TRUE) + +$(eval $(call gb_Module_add_targets,pyuno,\ + Library_pyuno \ + Library_pythonloader \ + Package_pyunorc \ + Package_python_scripts \ +)) + +ifneq ($(OS),WNT) +$(eval $(call gb_Module_add_targets,pyuno,\ + Library_pyuno_wrapper \ +)) +endif + +# zipcore: python.exe on Windows +# zipcore: pyversion.hxx on Windows +ifeq ($(OS),WNT) +$(eval $(call gb_Module_add_targets,pyuno,\ + CustomTarget_pyversion \ + Executable_python_wrapper \ + CustomTarget_python_wrapper \ +)) +endif + + +# zipcore: python.sh on Unix +ifneq ($(SYSTEM_PYTHON),YES) +ifeq ($(GUI),UNX) +$(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 +endif + +# python-zipcore-$(PYVESION) not on MACOSX +# (OOoPython.framework.zip is already delivered for MACOSX in python module) +ifneq ($(SYSTEM_PYTHON),YES) +ifneq ($(OS),MACOSX) +$(eval $(call gb_Module_add_targets,pyuno,\ + CustomTarget_zipcore \ + Package_zipcore \ +)) +endif +endif + +endif # DISABLE_PYTHON + + + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/pyuno/Package_python_bin.mk b/pyuno/Package_python_bin.mk new file mode 100644 index 000000000000..a0a5a0845cf3 --- /dev/null +++ b/pyuno/Package_python_bin.mk @@ -0,0 +1,31 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 David Ostrovsky (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Package_Package,python_bin,$(call gb_CustomTarget_get_workdir,pyuno/python_bin))) + +$(eval $(call gb_Package_add_file,python_bin,bin/python.bin,python.bin)) + +# vim: set noet sw=4 ts=4: diff --git a/pyuno/Package_python_scripts.mk b/pyuno/Package_python_scripts.mk new file mode 100644 index 000000000000..3672f6106f5e --- /dev/null +++ b/pyuno/Package_python_scripts.mk @@ -0,0 +1,39 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 David Ostrovsky (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Package_Package,pyuno_python,$(SRCDIR)/pyuno/source)) + +ifeq ($(GUI),WNT) +pyuno_PYTHON_SCRIPT_DIR=bin +else +pyuno_PYTHON_SCRIPT_DIR=lib +endif + +$(eval $(call gb_Package_add_file,pyuno_python,$(pyuno_PYTHON_SCRIPT_DIR)/pyuno/unohelper.py,module/unohelper.py)) +$(eval $(call gb_Package_add_file,pyuno_python,$(pyuno_PYTHON_SCRIPT_DIR)/pyuno/uno.py,module/uno.py)) +$(eval $(call gb_Package_add_file,pyuno_python,$(pyuno_PYTHON_SCRIPT_DIR)/pyuno/pythonloader.py,loader/pythonloader.py)) + +# vim: set noet sw=4 ts=4: diff --git a/pyuno/Package_python_shell.mk b/pyuno/Package_python_shell.mk new file mode 100644 index 000000000000..bb2d6fa541f7 --- /dev/null +++ b/pyuno/Package_python_shell.mk @@ -0,0 +1,31 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 David Ostrovsky (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Package_Package,python_shell,$(call gb_CustomTarget_get_workdir,pyuno/python_shell))) + +$(eval $(call gb_Package_add_file,python_shell,bin/pyuno/python,python.sh)) + +# vim: set noet sw=4 ts=4: diff --git a/pyuno/Package_pyunorc.mk b/pyuno/Package_pyunorc.mk new file mode 100644 index 000000000000..1f9a4b5cc3e2 --- /dev/null +++ b/pyuno/Package_pyunorc.mk @@ -0,0 +1,31 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 David Ostrovsky (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Package_Package,pyuno_pyunorc,$(SRCDIR)/pyuno/source/module)) + +$(eval $(call gb_Package_add_file,pyuno_pyunorc,$(call gb_Helper_get_rcfile,bin/pyuno),pyuno)) + +# vim: set noet sw=4 ts=4: diff --git a/pyuno/Package_zipcore.mk b/pyuno/Package_zipcore.mk new file mode 100644 index 000000000000..9069a8fdd32c --- /dev/null +++ b/pyuno/Package_zipcore.mk @@ -0,0 +1,35 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 David Ostrovsky (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Package_Package,python_zipcore,$(call gb_CustomTarget_get_workdir,pyuno/zipcore))) + +include $(OUTDIR)/inc/pyversion.Makefile +pyuno_PYTHON_ARCHIVE_NAME:=python-core-$(PYVERSION).zip + +$(eval $(call gb_Package_add_file,python_zipcore,bin/$(pyuno_PYTHON_ARCHIVE_NAME),$(pyuno_PYTHON_ARCHIVE_NAME))) + + +# vim: set noet sw=4 ts=4: diff --git a/pyuno/inc/pyuno/pyuno.hxx b/pyuno/inc/pyuno/pyuno.hxx index e62563e80afc..066fc93a4095 100644 --- a/pyuno/inc/pyuno/pyuno.hxx +++ b/pyuno/inc/pyuno/pyuno.hxx @@ -27,10 +27,10 @@ to do the necessary conversions. */ -#ifdef WIN32 -#define PY_DLLEXPORT __declspec(dllexport) +#if defined LO_DLLIMPLEMENTATION_PYUNO +#define LO_DLLPUBLIC_PYUNO SAL_DLLPUBLIC_EXPORT #else -#define PY_DLLEXPORT +#define LO_DLLPUBLIC_PYUNO SAL_DLLPUBLIC_IMPORT #endif /** function called by the python runtime to initialize the @@ -39,7 +39,8 @@ preconditions: python has been initialized before and the global interpreter lock is held */ -extern "C" PY_DLLEXPORT + +extern "C" LO_DLLPUBLIC_PYUNO #if PY_MAJOR_VERSION >= 3 PyObject* SAL_CALL PyInit_pyuno(); #else @@ -136,7 +137,7 @@ enum ConversionMode { ACCEPT_UNO_ANY, REJECT_UNO_ANY }; make sure to fulfill all preconditions mentioned for the specific methods. */ -class PY_DLLEXPORT Runtime +class LO_DLLPUBLIC_PYUNO Runtime { RuntimeImpl *impl; public: @@ -235,7 +236,7 @@ public: e.g. when you would leave them away, dtors of potential pyrefs may be called after the thread has detached again. */ -class PY_DLLEXPORT PyThreadAttach +class LO_DLLPUBLIC_PYUNO PyThreadAttach { PyThreadState *tstate; PyThreadAttach ( const PyThreadAttach & ); // not implemented @@ -262,7 +263,7 @@ public: @see PyThreadAttach */ -class PY_DLLEXPORT PyThreadDetach +class LO_DLLPUBLIC_PYUNO PyThreadDetach { PyThreadState *tstate; PyThreadDetach ( const PyThreadDetach & ); // not implemented diff --git a/pyuno/prj/build.lst b/pyuno/prj/build.lst index 8d0f8ba31525..ca0bce936b8b 100644 --- a/pyuno/prj/build.lst +++ b/pyuno/prj/build.lst @@ -1,5 +1,3 @@ bgpu pyuno : salhelper stoc cpputools cppuhelper bridges tools PYTHON:python LIBXSLT:libxslt NULL -pu pyuno usr1 - all br_mkout NULL -pu pyuno\zipcore nmake - all pu_zipcore NULL -pu pyuno\source\module nmake - all pu_module NULL -pu pyuno\source\loader nmake - all pu_loader pu_module NULL +pu pyuno usr1 - all br_mkout NULL +pu pyuno\prj nmake - all pu_prj NULL diff --git a/pyuno/prj/dmake b/pyuno/prj/dmake deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/pyuno/source/module/pyuno_dlopenwrapper.c b/pyuno/source/module/pyuno_dlopenwrapper.c index 3bdc912f95bd..cb17c51aec9c 100644 --- a/pyuno/source/module/pyuno_dlopenwrapper.c +++ b/pyuno/source/module/pyuno_dlopenwrapper.c @@ -84,14 +84,14 @@ static void * load(void * address, char const * symbol) { #if PY_MAJOR_VERSION >= 3 -PyObject * PyInit_pyuno(void) { +SAL_DLLPUBLIC_EXPORT PyObject * PyInit_pyuno(void) { return ((PyObject * (*)(void)) load((void *) &PyInit_pyuno, "PyInit_pyuno"))(); } #else -void initpyuno(void) { +SAL_DLLPUBLIC_EXPORT void initpyuno(void) { ((void (*)(void)) load((void *) &initpyuno, "initpyuno"))(); } diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index 432a61ef988d..26d1932bed0c 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -833,7 +833,7 @@ struct PyMethodDef PyUNOModule_methods [] = } -extern "C" PY_DLLEXPORT +extern "C" #if PY_MAJOR_VERSION >= 3 PyObject* PyInit_pyuno() { diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp index 359f9c6b7144..1de1e4b4e8bc 100644 --- a/scp2/source/ooo/common_brand.scp +++ b/scp2/source/ooo/common_brand.scp @@ -51,7 +51,6 @@ Module gid_Module_Root_Brand Files = (gid_Brand_File_Bin_Crashreport, gid_Brand_File_Bin_Crashreport_Script, gid_Brand_File_Bin_Crashreport_Com, - gid_Brand_File_Bin_Python, gid_Brand_File_Gdb_Trace, gid_Brand_File_Bin_Soffice, gid_Brand_File_Bin_Soffice_Bin, @@ -1431,16 +1430,6 @@ ProfileItem gid_Brand_Profileitem_Setup_Install End #endif -//TODO: This actually belongs into a module of its own: -#if !defined DISABLE_PYUNO && !defined SYSTEM_PYTHON -File gid_Brand_File_Bin_Python - BIN_FILE_BODY; - Name = EXENAME(pyuno/python); - Dir = gid_Brand_Dir_Program; - Styles = (PACKED); -End -#endif - File gid_License_Txt TXT_FILE_BODY; #if defined MACOSX diff --git a/scp2/source/python/file_python.scp b/scp2/source/python/file_python.scp index 194394dbc4f1..47ab5fecb93b 100644 --- a/scp2/source/python/file_python.scp +++ b/scp2/source/python/file_python.scp @@ -73,29 +73,59 @@ File gid_File_Py_Pythonloader End #ifndef SYSTEM_PYTHON +File gid_File_Py_Bin_Python + BIN_FILE_BODY; + Name = EXENAME(pyuno/python); + Dir = gid_Brand_Dir_Program; + Styles = (PACKED); +End + +#ifndef MACOSX +Directory gid_Dir_Py_PythonCore + ParentID = gid_Brand_Dir_Program; + HostName = STRING(CONCAT2(python-core-,PYVERSION)); +End + +Directory gid_Dir_Py_PythonCore_Lib + ParentID = gid_Dir_Py_PythonCore; + HostName = "lib"; +End +#endif + File gid_File_Py_Python_Core TXT_FILE_BODY; - Dir = gid_Brand_Dir_Program; #ifdef MACOSX + Dir = gid_Brand_Dir_Program; Name = "OOoPython.framework.zip"; Styles = (ARCHIVE,USE_INTERNAL_RIGHTS); #else + Dir = gid_Dir_Py_PythonCore_Lib; Name = STRING(CONCAT3(python-core-,PYVERSION,.zip)); Styles = (ARCHIVE); #endif End -#ifdef UNX +#ifdef WNT +Directory gid_Dir_Py_PythonCore_Bin + ParentID = gid_Dir_Py_PythonCore; + HostName = "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 //Scripting Framework Python example scripts diff --git a/scp2/source/python/module_python.scp b/scp2/source/python/module_python.scp index 6ee83450fe1f..0f15826b90ad 100644 --- a/scp2/source/python/module_python.scp +++ b/scp2/source/python/module_python.scp @@ -40,8 +40,22 @@ Module gid_Module_Optional_Pyuno gid_Dir_PythonFramework_Versions_ver_bin, gid_Dir_PythonFramework_Versions_ver_lib, gid_Dir_PythonFramework_Versions_ver_lib_pythonver, - gid_Dir_PythonFramework_Versions_ver_lib_pythonver_config); - Files = (gid_File_Pyuno,gid_File_Lib_Pyuno,gid_File_Lib_Pythonloader,gid_File_Py_Unohelper,gid_File_Py_Uno,gid_File_Py_Pythonloader,gid_File_Py_Python_Core,gid_File_Py_Python_Bin,gid_File_Lib_Python_So,gid_Shortcut_Lib_Python_So,gid_File_Scripts_Python,gid_File_Share_Registry_Pyuno_Xcd); + gid_Dir_PythonFramework_Versions_ver_lib_pythonver_config, + gid_Dir_Py_PythonCore, gid_Dir_Py_PythonCore_Bin, + gid_Dir_Py_PythonCore_Lib); + Files = (gid_File_Pyuno, + gid_File_Lib_Pyuno, + gid_File_Lib_Pythonloader, + gid_File_Py_Bin_Python, + gid_File_Py_Unohelper, + gid_File_Py_Uno, + gid_File_Py_Pythonloader, + gid_File_Py_Python_Core, + gid_File_Py_Python_Bin, + gid_File_Lib_Python_So, + gid_Shortcut_Lib_Python_So, + gid_File_Scripts_Python, + gid_File_Share_Registry_Pyuno_Xcd); Unixlinks = (gid_Unixlink_Python_Headers, gid_Unixlink_Python_Resources, gid_Unixlink_Python_Versions_Current, diff --git a/tools/StaticLibrary_ooopathutils.mk b/tools/StaticLibrary_ooopathutils.mk index a656700245ae..b21a0fdbc802 100644 --- a/tools/StaticLibrary_ooopathutils.mk +++ b/tools/StaticLibrary_ooopathutils.mk @@ -34,22 +34,4 @@ $(eval $(call gb_StaticLibrary_add_exception_objects,ooopathutils,\ tools/source/misc/pathutils \ )) - -# HACK for now -# We really should fix the clients of this to link against the static library -# Instead of this evil linking of an object from $(OUTDIR) -define StaticLibrary_ooopathutils_hack -$(call gb_StaticLibrary_get_target,ooopathutils) : $(OUTDIR)/lib/$(1) -$$(eval $$(call gb_Deliver_add_deliverable,$(OUTDIR)/lib/$(1),$(call gb_CxxObject_get_target,tools/source/misc/pathutils),$(1))) - -$(OUTDIR)/lib/$(1) : $(call gb_CxxObject_get_target,tools/source/misc/pathutils) - $$(call gb_Deliver_deliver,$$<,$$@) - -endef - -ifeq ($(OS),WNT) -$(eval $(call StaticLibrary_ooopathutils_hack,pathutils-obj.obj)) -else -$(eval $(call StaticLibrary_ooopathutils_hack,pathutils-obj.o)) -endif # vim: set noet sw=4 ts=4: -- cgit v1.2.3