File do-not-install-compiled-schemas.patch of Package nautilus-terminal
diff -Nur nautilus_terminal-4.0.2/nautilus_terminal/install_nautilus_extension.py patched/nautilus_terminal/install_nautilus_extension.py
--- nautilus_terminal-4.0.2/nautilus_terminal/install_nautilus_extension.py 2021-05-23 12:55:51.000000000 +0200
+++ patched/nautilus_terminal/install_nautilus_extension.py 2021-07-01 14:18:39.584927329 +0200
@@ -80,14 +80,15 @@
os.path.join(SYSTEM_GLIB_SCHEMA_DIR, GLIB_SCHEMA_FILE),
)
# Compile schemas
- if is_glib_compile_schema_installed():
- subprocess.call([GLIB_COMPILE_SCHEMA, SYSTEM_GLIB_SCHEMA_DIR])
- print("GLib schema successfully compiled.")
- else:
- print(
- "GLib schema cannot be compiled. Please install GLib schema compiler and run the following command (as root):"
- )
- print(" ".join([GLIB_COMPILE_SCHEMA, SYSTEM_GLIB_SCHEMA_DIR]))
+ if not "SKIP_SCHEMA_COMPILE" in os.environ:
+ if is_glib_compile_schema_installed():
+ subprocess.call([GLIB_COMPILE_SCHEMA, SYSTEM_GLIB_SCHEMA_DIR])
+ print("GLib schema successfully compiled.")
+ else:
+ print(
+ "GLib schema cannot be compiled. Please install GLib schema compiler and run the following command (as root):"
+ )
+ print(" ".join([GLIB_COMPILE_SCHEMA, SYSTEM_GLIB_SCHEMA_DIR]))
#
print("Nautilus Terminal extension successfully installed on the system.")
@@ -139,14 +140,15 @@
os.path.join(USER_GLIB_SCHEMA_DIR, GLIB_SCHEMA_FILE),
)
# Compile schemas
- if is_glib_compile_schema_installed():
- subprocess.call([GLIB_COMPILE_SCHEMA, USER_GLIB_SCHEMA_DIR])
- print("GLib schema successfully compiled.")
- else:
- print(
- "GLib schema cannot be compiled. Please install GLib schema compiler and run the following command:"
- )
- print(" ".join([GLIB_COMPILE_SCHEMA, USER_GLIB_SCHEMA_DIR]))
+ if not "SKIP_SCHEMA_COMPILE" in os.environ:
+ if is_glib_compile_schema_installed():
+ subprocess.call([GLIB_COMPILE_SCHEMA, USER_GLIB_SCHEMA_DIR])
+ print("GLib schema successfully compiled.")
+ else:
+ print(
+ "GLib schema cannot be compiled. Please install GLib schema compiler and run the following command:"
+ )
+ print(" ".join([GLIB_COMPILE_SCHEMA, USER_GLIB_SCHEMA_DIR]))
#
print(
"Nautilus Terminal extension successfully installed on the current user."
diff -Nur nautilus_terminal-4.0.2/README.rst patched/README.rst
--- nautilus_terminal-4.0.2/README.rst 2021-05-23 12:55:51.000000000 +0200
+++ patched/README.rst 2021-07-01 14:20:20.877808624 +0200
@@ -318,6 +318,8 @@
its installation (``--install-*`` and ``--uninstall-*`` options of the
``nautilus-terminal`` command).
+* You can set ``SKIP_SCHEMA_COMPILE`` environment variable to prevent the pip
+ install command from compiling the GLib schemas.
Supporting this project
-----------------------
diff -Nur nautilus_terminal-4.0.2/setup.py patched/setup.py
--- nautilus_terminal-4.0.2/setup.py 2021-05-23 12:55:51.000000000 +0200
+++ patched/setup.py 2021-07-01 14:17:52.096514159 +0200
@@ -25,6 +25,7 @@
print(" is_system_install: %s" % str(is_system_install))
print(" is_user_install: %s" % str(is_user_install))
print(" data_prefix: %s" % data_prefix)
+ print(" skip GLib compilation: %s" % str("SKIP_SCHEMA_COMPILE" in os.environ))
if is_system_install:
os.environ["XDG_DATA_DIR"] = data_prefix