[meld/build-updates: 5/26] build_helpers: Remove now-unused custom Python build step
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/build-updates: 5/26] build_helpers: Remove now-unused custom Python build step
- Date: Sun, 11 Sep 2022 02:17:14 +0000 (UTC)
commit 834a40509b0cd5e66dd2b6ca41a8522ef353de8f
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Aug 13 11:13:26 2022 +1000
build_helpers: Remove now-unused custom Python build step
meld/build_helpers.py | 48 ------------------------------------------------
1 file changed, 48 deletions(-)
---
diff --git a/meld/build_helpers.py b/meld/build_helpers.py
index cfb287bb..d86ffb54 100644
--- a/meld/build_helpers.py
+++ b/meld/build_helpers.py
@@ -297,51 +297,3 @@ class build_i18n(distutils.cmd.Command):
self.spawn(cmd)
files_merged.append(file_merged)
self.distribution.data_files.append((target, files_merged))
-
-
-class build_py(distutils.command.build_py.build_py):
- """Insert real package installation locations into conf module
-
- Adapted from gottengeography
- """
-
- data_line = 'DATADIR = "%s"'
- locale_line = 'LOCALEDIR = "%s"'
-
- def build_module(self, module, module_file, package):
-
- if module_file == 'meld/conf.py':
- with open(module_file) as f:
- contents = f.read()
-
- try:
- options = self.distribution.get_option_dict('install')
- prefix = options['prefix'][1]
- except KeyError as e:
- print(e)
- prefix = sys.prefix
-
- datadir = os.path.join(prefix, 'share', 'meld')
- localedir = os.path.join(prefix, 'share', 'locale')
-
- start, end = 0, 0
- lines = contents.splitlines()
- for i, line in enumerate(lines):
- if line.startswith('# START'):
- start = i
- elif line.startswith('# END'):
- end = i
-
- if start and end:
- lines[start:end + 1] = [
- self.data_line % datadir,
- self.locale_line % localedir,
- ]
-
- module_file = module_file + "-installed"
- contents = "\n".join(lines)
- with open(module_file, 'w') as f:
- f.write(contents)
-
- distutils.command.build_py.build_py.build_module(
- self, module, module_file, package)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]