2022-09-01 15:40:07 +02:00
|
|
|
Index: kitty-0.26.1/setup.py
|
|
|
|
===================================================================
|
|
|
|
--- kitty-0.26.1.orig/setup.py
|
|
|
|
+++ kitty-0.26.1/setup.py
|
|
|
|
@@ -66,6 +66,7 @@ class Options(argparse.Namespace):
|
2022-04-18 20:20:57 +02:00
|
|
|
verbose: int = 0
|
|
|
|
sanitize: bool = False
|
|
|
|
prefix: str = './linux-package'
|
|
|
|
+ no_docs: bool = False
|
|
|
|
incremental: bool = True
|
|
|
|
profile: bool = False
|
|
|
|
libdir_name: str = 'lib'
|
2022-09-01 15:40:07 +02:00
|
|
|
@@ -999,12 +1000,13 @@ def compile_python(base_path: str) -> No
|
2022-04-18 20:20:57 +02:00
|
|
|
c(base_path, ddir='', rx=exclude, force=True, optimize=optimize, quiet=1, workers=num_workers)
|
|
|
|
|
|
|
|
|
|
|
|
-def create_linux_bundle_gunk(ddir: str, libdir_name: str) -> None:
|
|
|
|
- if not os.path.exists('docs/_build/html'):
|
|
|
|
- make = 'gmake' if is_freebsd else 'make'
|
|
|
|
- run_tool([make, 'docs'])
|
|
|
|
- copy_man_pages(ddir)
|
|
|
|
- copy_html_docs(ddir)
|
|
|
|
+def create_linux_bundle_gunk(ddir: str, libdir_name: str, no_docs=False) -> None:
|
|
|
|
+ if not no_docs:
|
|
|
|
+ if not os.path.exists('docs/_build/html'):
|
|
|
|
+ make = 'gmake' if is_freebsd else 'make'
|
|
|
|
+ run_tool([make, 'docs'])
|
|
|
|
+ copy_man_pages(ddir)
|
|
|
|
+ copy_html_docs(ddir)
|
|
|
|
for (icdir, ext) in {'256x256': 'png', 'scalable': 'svg'}.items():
|
|
|
|
icdir = os.path.join(ddir, 'share', 'icons', 'hicolor', icdir, 'apps')
|
|
|
|
safe_makedirs(icdir)
|
2022-09-01 15:40:07 +02:00
|
|
|
@@ -1377,7 +1379,7 @@ def package(args: Options, bundle_type:
|
2022-04-18 20:20:57 +02:00
|
|
|
path = os.path.join(root, f_)
|
2022-09-01 15:40:07 +02:00
|
|
|
os.chmod(path, 0o755 if should_be_executable(path) else 0o644)
|
2022-04-18 20:20:57 +02:00
|
|
|
if not is_macos:
|
|
|
|
- create_linux_bundle_gunk(ddir, args.libdir_name)
|
|
|
|
+ create_linux_bundle_gunk(ddir, args.libdir_name, args.no_docs)
|
|
|
|
|
|
|
|
if bundle_type.startswith('macos-'):
|
|
|
|
create_macos_bundle_gunk(ddir)
|
2022-09-01 15:40:07 +02:00
|
|
|
@@ -1470,6 +1472,12 @@ def option_parser() -> argparse.Argument
|
2022-04-18 20:20:57 +02:00
|
|
|
help='Where to create the linux package'
|
|
|
|
)
|
|
|
|
p.add_argument(
|
|
|
|
+ '--no-docs',
|
|
|
|
+ default=Options.no_docs,
|
|
|
|
+ action='store_true',
|
|
|
|
+ help='Disable building documentation when creating the linux package'
|
|
|
|
+ )
|
|
|
|
+ p.add_argument(
|
|
|
|
'--full',
|
|
|
|
dest='incremental',
|
|
|
|
default=Options.incremental,
|