[Libreoffice-commits] .: configure.ac officecfg/registry scp2/source scripting/Extension_ScriptProviderForPython.mk scripting/Module_scripting.mk scripting/Package_scriptproviderforpython.mk scripting/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 30 01:28:47 PST 2012
configure.ac | 2
officecfg/registry/data/org/openoffice/Setup.xcu | 1
scp2/source/extensions/directory_extensions.scp | 11 -----
scp2/source/extensions/file_extensions.scp | 17 +++++--
scp2/source/extensions/module_extensions.scp | 5 +-
scripting/Extension_ScriptProviderForPython.mk | 36 ----------------
scripting/Module_scripting.mk | 3 -
scripting/Package_scriptproviderforpython.mk | 15 ++++++
scripting/source/pyprov/META-INF/manifest.xml | 24 ----------
scripting/source/pyprov/components.rdb | 26 -----------
scripting/source/pyprov/description-en-US.txt | 1
scripting/source/pyprov/description.xml | 44 --------------------
scripting/source/pyprov/pythonscript.py | 2
scripting/source/pyprov/scriptproviderforpython.rdb | 28 ++++++++++++
14 files changed, 63 insertions(+), 152 deletions(-)
New commits:
commit 1f3496e204cd305264d27a362f34fdcb6fa5f693
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Nov 30 10:23:23 2012 +0100
Turn Python Scripting Provider from bundled extension to plain code
To avoid unnecessary confusion between the newly plain code and any instance of
the old extension still installed (per-user or shared), I renamed the UNO
implementation identifier org.openoffice.pyuno.LanguageScriptProviderForPython
to org.libreoffice.pyuno.LanguageScriptProviderForPython. Also, existing
installations of the extension are explicitly not migrated to new user profiles.
Change-Id: Id3dd66ba5e52e0962f7ad0ccb5e4ad5b0bec97fa
diff --git a/configure.ac b/configure.ac
index 4b51831..4cfcb92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10182,7 +10182,7 @@ dnl Scripting provider for Python extension?
dnl We always provide this unless we have disabled Python completely
if test $enable_python = no; then
ENABLE_SCRIPTING_PYTHON=NO
- SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_SCRIPTING_PYTHON"
+ SCPDEFS="$SCPDEFS -DWITHOUT_SCRIPTING_PYTHON"
else
ENABLE_SCRIPTING_PYTHON=YES
fi
diff --git a/officecfg/registry/data/org/openoffice/Setup.xcu b/officecfg/registry/data/org/openoffice/Setup.xcu
index 05ddaac..da0c62e 100644
--- a/officecfg/registry/data/org/openoffice/Setup.xcu
+++ b/officecfg/registry/data/org/openoffice/Setup.xcu
@@ -798,6 +798,7 @@
<!-- arguably, dropping PDFImport extensions should be
conditional on having in-core PDF import actually built
and installed -->
+ <it>com.sun.star.script.provider.ScriptProviderForPython</it>
</value>
</prop>
</node>
diff --git a/scp2/source/extensions/directory_extensions.scp b/scp2/source/extensions/directory_extensions.scp
index 9d3a018..eb3a08e 100644
--- a/scp2/source/extensions/directory_extensions.scp
+++ b/scp2/source/extensions/directory_extensions.scp
@@ -226,15 +226,4 @@ End
#endif
-/* ** Script provider for Python ** */
-
-#ifndef WITHOUT_EXTENSION_SCRIPTING_PYTHON
-
-Directory gid_Brand_Dir_Share_Extensions_Script_Provider_For_Python
- ParentID = gid_Brand_Dir_Share_Extensions;
- DosName = "script-provider-for-python";
-End
-
-#endif
-
#endif
diff --git a/scp2/source/extensions/file_extensions.scp b/scp2/source/extensions/file_extensions.scp
index 24b2e77..7633125 100644
--- a/scp2/source/extensions/file_extensions.scp
+++ b/scp2/source/extensions/file_extensions.scp
@@ -297,13 +297,20 @@ End
/* ** Script provider for Python ** */
-#ifndef WITHOUT_EXTENSION_SCRIPTING_PYTHON
+#ifndef WITHOUT_SCRIPTING_PYTHON
-File gid_File_Oxt_Script_Provider_For_Python
+File gid_File_Py_Pythonscript
TXT_FILE_BODY;
- Styles = (PACKED, ARCHIVE);
- Dir = gid_Brand_Dir_Share_Extensions_Script_Provider_For_Python;
- Name = "script-provider-for-python.oxt";
+ Dir = gid_Brand_Dir_Program;
+ Name = "pythonscript.py";
+ Styles = (PACKED);
+End
+
+File gid_File_Rdb_Scriptproviderforpython
+ TXT_FILE_BODY;
+ Dir = gid_Brand_Dir_Program_Services;
+ Name = "scriptproviderforpython.rdb";
+ Styles = (PACKED);
End
#endif
diff --git a/scp2/source/extensions/module_extensions.scp b/scp2/source/extensions/module_extensions.scp
index 37558c3..17c7710 100644
--- a/scp2/source/extensions/module_extensions.scp
+++ b/scp2/source/extensions/module_extensions.scp
@@ -334,14 +334,15 @@ End
/* ** Script provider for Python ** */
-#ifndef WITHOUT_EXTENSION_SCRIPTING_PYTHON
+#ifndef WITHOUT_SCRIPTING_PYTHON
Module gid_Module_Optional_Extensions_Script_Provider_For_Python
PackageInfo = "packinfo_extensions.txt";
MOD_NAME_DESC(MODULE_OPTIONAL_EXTENSIONS_SCRIPT_PROVIDER_FOR_PYTHON);
ParentID = gid_Module_Optional_Extensions;
Files = (
- gid_File_Oxt_Script_Provider_For_Python );
+ gid_File_Py_Pythonscript,
+ gid_File_Rdb_Scriptproviderforpython );
Minimal = NO;
Default = YES;
Styles = ( );
diff --git a/scripting/Extension_ScriptProviderForPython.mk b/scripting/Extension_ScriptProviderForPython.mk
deleted file mode 100644
index 4c4b043..0000000
--- a/scripting/Extension_ScriptProviderForPython.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- Mode: makefile; 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.
-#
-# The Initial Developer of the Original Code is
-# Matúš Kukan <matus.kukan at gmail.com>
-# Portions created by the Initial Developer are Copyright (C) 2011 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-#
-# 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_Extension_Extension,script-provider-for-python,scripting/source/pyprov))
-
-$(eval $(call gb_Extension_add_file,script-provider-for-python,pythonscript.py,\
- $(SRCDIR)/scripting/source/pyprov/pythonscript.py))
-$(eval $(call gb_Extension_add_file,script-provider-for-python,components.rdb,\
- $(SRCDIR)/scripting/source/pyprov/components.rdb))
-
-# vim: set noet sw=4 ts=4:
diff --git a/scripting/Module_scripting.mk b/scripting/Module_scripting.mk
index bf385cd..3243ba9 100644
--- a/scripting/Module_scripting.mk
+++ b/scripting/Module_scripting.mk
@@ -48,7 +48,8 @@ $(eval $(call gb_Module_add_targets,scripting,\
Zip_ScriptsJava \
) \
$(if $(filter $(ENABLE_SCRIPTING_PYTHON),YES),\
- Extension_ScriptProviderForPython) \
+ Package_scriptproviderforpython \
+ ) \
Library_basprov \
Library_dlgprov \
Library_protocolhandler \
diff --git a/scripting/Package_scriptproviderforpython.mk b/scripting/Package_scriptproviderforpython.mk
new file mode 100644
index 0000000..641c3cb
--- /dev/null
+++ b/scripting/Package_scriptproviderforpython.mk
@@ -0,0 +1,15 @@
+# -*- 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,scriptproviderforpython,$(SRCDIR)/scripting/source/pyprov))
+
+$(eval $(call gb_Package_add_file,scriptproviderforpython,xml/scriptproviderforpython.rdb,scriptproviderforpython.rdb))
+$(eval $(call gb_Package_add_file,scriptproviderforpython,bin/pythonscript.py,pythonscript.py))
+
+# vim: set noet sw=4 ts=4:
diff --git a/scripting/source/pyprov/META-INF/manifest.xml b/scripting/source/pyprov/META-INF/manifest.xml
deleted file mode 100644
index 7a8f084..0000000
--- a/scripting/source/pyprov/META-INF/manifest.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
-<!--
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
- <manifest:file-entry
- manifest:media-type="application/vnd.sun.star.uno-components"
- manifest:full-path="components.rdb"/>
-</manifest:manifest>
diff --git a/scripting/source/pyprov/components.rdb b/scripting/source/pyprov/components.rdb
deleted file mode 100644
index 2436cab..0000000
--- a/scripting/source/pyprov/components.rdb
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.Python" uri="./pythonscript.py">
- <implementation name="org.openoffice.pyuno.LanguageScriptProviderForPython">
- <service name="com.sun.star.script.provider.ScriptProviderForPython"/>
- <service name="com.sun.star.script.provider.LanguageScriptProvider"/>
- </implementation>
- </component>
-</components>
diff --git a/scripting/source/pyprov/description-en-US.txt b/scripting/source/pyprov/description-en-US.txt
deleted file mode 100644
index 7e60ea0..0000000
--- a/scripting/source/pyprov/description-en-US.txt
+++ /dev/null
@@ -1 +0,0 @@
-Add support for Python via the Scripting Framework to enable Python scripts in the user and share directories of a LibreOffice installation, and also in loaded documents.
diff --git a/scripting/source/pyprov/description.xml b/scripting/source/pyprov/description.xml
deleted file mode 100644
index d3b5cb6..0000000
--- a/scripting/source/pyprov/description.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-<!--
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-<description
- xmlns="http://openoffice.org/extensions/description/2006"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:dep="http://openoffice.org/extensions/description/2006">
-
- <identifier value="com.sun.star.script.provider.ScriptProviderForPython"/>
-
- <dependencies>
- <OpenOffice.org-minimal-version value="3.0" dep:name="OpenOffice.org 3.0"/>
- </dependencies>
-
- <version value="3.3.1"/>
-
- <publisher>
- <name xlink:href="http://www.documentfoundation.org" lang="en-US">The Document Foundation</name>
- </publisher>
-
- <display-name>
- <name lang="en-US">Script provider for Python</name>
- </display-name>
-
- <extension-description>
- <src xlink:href="description-en-US.txt" lang="en-US"/>
- </extension-description>
-
-</description>
diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index 78c6226..dcf05d4 100755
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -137,7 +137,7 @@ CALLABLE_CONTAINER_NAME = "g_exportedScripts"
# pythonloader looks for a static g_ImplementationHelper variable
g_ImplementationHelper = unohelper.ImplementationHelper()
-g_implName = "org.openoffice.pyuno.LanguageScriptProviderFor"+LANGUAGENAME
+g_implName = "org.libreoffice.pyuno.LanguageScriptProviderFor"+LANGUAGENAME
diff --git a/scripting/source/pyprov/scriptproviderforpython.rdb b/scripting/source/pyprov/scriptproviderforpython.rdb
new file mode 100644
index 0000000..09a37e4
--- /dev/null
+++ b/scripting/source/pyprov/scriptproviderforpython.rdb
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!--
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+<components xmlns="http://openoffice.org/2010/uno-components">
+ <component loader="com.sun.star.loader.Python"
+ uri="vnd.openoffice.pymodule:pythonscript">
+ <implementation
+ name="org.libreoffice.pyuno.LanguageScriptProviderForPython">
+ <service name="com.sun.star.script.provider.ScriptProviderForPython"/>
+ <service name="com.sun.star.script.provider.LanguageScriptProvider"/>
+ </implementation>
+ </component>
+</components>
More information about the Libreoffice-commits
mailing list