diff options
Diffstat (limited to 'cambalache/installation-changes.patch')
-rw-r--r-- | cambalache/installation-changes.patch | 233 |
1 files changed, 0 insertions, 233 deletions
diff --git a/cambalache/installation-changes.patch b/cambalache/installation-changes.patch deleted file mode 100644 index 77f888f..0000000 --- a/cambalache/installation-changes.patch +++ /dev/null @@ -1,233 +0,0 @@ -From 16c43a33d67cdbf0be3569c2221b873c9df855f4 Mon Sep 17 00:00:00 2001 -From: Lyes Saadi <mail@lyes.eu> -Date: Thu, 22 Jul 2021 01:21:41 +0100 -Subject: [PATCH 1/1] Conforming to distributions packaging requirements - -This introduces several changes to the installation scripts in -order to account for distributions' requirements (Fedora -specifically). This include the installation of python source -files alongside bytecode cache pyc files as well as the -installation of python files in the standard /usr/lib/python3.9/ -directory as python modules. ---- - cambalacheui/meson.build | 32 +++++++++++++++----------------- - merengue/merengue.in | 5 +---- - merengue/meson.build | 26 ++++++++++++-------------- - run-dev.py | 11 +++++------ - src/cambalache.in | 4 +--- - src/meson.build | 10 ++++------ - 6 files changed, 38 insertions(+), 50 deletions(-) - -diff --git a/cambalacheui/meson.build b/cambalacheui/meson.build -index 5ee9409..b97b173 100644 ---- a/cambalacheui/meson.build -+++ b/cambalacheui/meson.build -@@ -20,24 +20,22 @@ configure_file( - install_dir: moduledir - ) - --run_command('python3', '-m', 'compileall', '-b', '.') -- - install_data([ -- 'cmb_base.pyc', -- 'cmb_db.pyc', -- 'cmb_objects_base.pyc', -- 'cmb_tree_view.pyc', -- 'cmb_list_store.pyc', -- 'cmb_ui.pyc', -- 'cmb_property.pyc', -- 'cmb_layout_property.pyc', -- 'cmb_type_info.pyc', -- 'cmb_object.pyc', -- 'cmb_view.pyc', -- 'cmb_object_editor.pyc', -- 'cmb_project.pyc', -- 'cmb_signal_editor.pyc', -- '__init__.pyc' -+ 'cmb_base.py', -+ 'cmb_db.py', -+ 'cmb_objects_base.py', -+ 'cmb_tree_view.py', -+ 'cmb_list_store.py', -+ 'cmb_ui.py', -+ 'cmb_property.py', -+ 'cmb_layout_property.py', -+ 'cmb_type_info.py', -+ 'cmb_object.py', -+ 'cmb_view.py', -+ 'cmb_object_editor.py', -+ 'cmb_project.py', -+ 'cmb_signal_editor.py', -+ '__init__.py', - ], - install_dir: moduledir) - -diff --git a/merengue/merengue.in b/merengue/merengue.in -index 7a18d22..a04b010 100755 ---- a/merengue/merengue.in -+++ b/merengue/merengue.in -@@ -12,16 +12,13 @@ import gi - import sys - import signal - --pkgdatadir = '@pkgdatadir@' -- --sys.path.insert(1, pkgdatadir) - signal.signal(signal.SIGINT, signal.SIG_DFL) - - from gi.repository import GLib - - if __name__ == "__main__": - if len(sys.argv) != 2: -- print(f"Ussage: {sys.argv[0]} gtkversion", file=sys.stderr) -+ print(f"Usage: {sys.argv[0]} gtkversion", file=sys.stderr) - exit() - - version = sys.argv[1] -diff --git a/merengue/meson.build b/merengue/meson.build -index 05a244b..c7c63c1 100644 ---- a/merengue/meson.build -+++ b/merengue/meson.build -@@ -1,5 +1,5 @@ - pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'merengue') --moduledir = join_paths(pkgdatadir, 'merengue') -+moduledir = join_paths(get_option('prefix'), python_bin.get_install_dir(), 'merengue') - - gnome.compile_resources('merengue', - 'merengue.gresource.xml', -@@ -29,35 +29,33 @@ configure_file( - install_dir: get_option('bindir') - ) - --run_command('python3', '-m', 'compileall', '-b', '.') -- - install_data([ -- 'mrg_application.pyc', -- '__init__.pyc', -+ 'mrg_application.py', -+ '__init__.py', - ], - install_dir: moduledir - ) - - install_data([ -- 'controller/__init__.pyc', -- 'controller/mrg_controller.pyc', -- 'controller/mrg_controller_registry.pyc', -+ 'controller/__init__.py', -+ 'controller/mrg_controller.py', -+ 'controller/mrg_controller_registry.py', - ], - install_dir: join_paths(moduledir, 'controller') - ) - - install_data([ -- 'mrg_gtk/__init__.pyc', -- 'mrg_gtk/mrg_selection.pyc', -- 'mrg_gtk/mrg_gtk_widget.pyc', -- 'mrg_gtk/mrg_gtk_window.pyc', -+ 'mrg_gtk/__init__.py', -+ 'mrg_gtk/mrg_selection.py', -+ 'mrg_gtk/mrg_gtk_widget.py', -+ 'mrg_gtk/mrg_gtk_window.py', - ], - install_dir: join_paths(moduledir, 'mrg_gtk') - ) - - install_data([ -- 'utils/__init__.pyc', -- 'utils/utils.pyc', -+ 'utils/__init__.py', -+ 'utils/utils.py', - ], - install_dir: join_paths(moduledir, 'utils') - ) -diff --git a/run-dev.py b/run-dev.py -index b1c9bd2..57f0060 100755 ---- a/run-dev.py -+++ b/run-dev.py -@@ -7,7 +7,6 @@ - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as - # published by the Free Software Foundation; version 2 of the License. --# - # This program is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -@@ -33,6 +32,7 @@ basedir = os.path.dirname(__file__) - sys.path.insert(1, basedir) - - os.environ['PATH'] = os.path.join(basedir, 'merengue') + ':' + os.environ.get('PATH') -+os.environ['PYTHONPATH'] = basedir + ':' + str(os.environ.get('PYTHONPATH') or '') - - glib_compile_resources = GLib.find_program_in_path ('glib-compile-resources') - -@@ -94,16 +94,15 @@ if __name__ == '__main__': - - # Create config files pointing to source directories - dev_config('cambalacheui/config.py', -- f"VERSION = 'git'\npkgdatadir = '{os.path.abspath('cambalacheui')}'") -+ f"VERSION = 'git'") - dev_config('merengue/config.py', -- f"VERSION = 'git'\npkgdatadir = '{os.path.abspath('merengue')}'") -+ f"VERSION = 'git'") - dev_config('src/config.py', -- f"VERSION = 'git'\npkgdatadir = '{os.path.abspath('src')}'") -+ f"VERSION = 'git'") - - # Create merengue bin script - configure_file('merengue/merengue.in', 'merengue/merengue', { -- 'PYTHON': GLib.find_program_in_path('python3'), -- 'pkgdatadir': os.path.abspath('.') -+ 'PYTHON': GLib.find_program_in_path('python3') - }) - os.chmod('merengue/merengue', stat.S_IREAD | stat.S_IWRITE | stat.S_IEXEC) - -diff --git a/src/cambalache.in b/src/cambalache.in -index c0adbf0..d85f13c 100755 ---- a/src/cambalache.in -+++ b/src/cambalache.in -@@ -11,12 +11,10 @@ import os - import sys - import signal - --pkgdatadir = '@pkgdatadir@' - localedir = '@localedir@' - --sys.path.insert(1, pkgdatadir) - signal.signal(signal.SIGINT, signal.SIG_DFL) --print(pkgdatadir, localedir) -+print(localedir) - - import locale - locale.bindtextdomain("cambalache", localedir) -diff --git a/src/meson.build b/src/meson.build -index 683cdff..81f3ea9 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -1,5 +1,5 @@ - pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'cambalache') --moduledir = join_paths(pkgdatadir, 'cambalache') -+moduledir = join_paths(get_option('prefix'), python_bin.get_install_dir(), 'cambalache') - - gnome.compile_resources('cambalache', - 'cambalache.gresource.xml', -@@ -30,12 +30,10 @@ configure_file( - install_dir: moduledir - ) - --run_command('python3', '-m', 'compileall', '-b', '.') -- - install_data([ -- '__init__.pyc', -- 'cmb_application.pyc', -- 'cmb_window.pyc' -+ '__init__.py', -+ 'cmb_application.py', -+ 'cmb_window.py', - ], - install_dir: moduledir) - --- -2.31.1 - |