From da31dd428ea088f7188230ad3c0b66e5a365a31d Mon Sep 17 00:00:00 2001 From: Alexander Sashnov Date: Sat, 27 Jun 2020 14:36:22 +0700 Subject: [PATCH] remove 'zimwriterfs' project from build and CI configuration 'zimwriterfs' is now a part of zim-tools (openzim/zim-tools/#92) --- .github/scripts/build_release_nightly.py | 4 ++-- .github/scripts/common.py | 2 +- .github/scripts/compile_all_deps.py | 4 ++-- README.md | 9 +++++++++ kiwixbuild/dependencies/__init__.py | 1 - kiwixbuild/dependencies/all_dependencies.py | 4 ++-- kiwixbuild/dependencies/zim_tools.py | 7 +++++-- kiwixbuild/dependencies/zimwriterfs.py | 22 --------------------- kiwixbuild/versions.py | 2 -- 9 files changed, 21 insertions(+), 34 deletions(-) delete mode 100644 kiwixbuild/dependencies/zimwriterfs.py diff --git a/.github/scripts/build_release_nightly.py b/.github/scripts/build_release_nightly.py index b724b73..4ada7e2 100755 --- a/.github/scripts/build_release_nightly.py +++ b/.github/scripts/build_release_nightly.py @@ -36,14 +36,14 @@ elif PLATFORM_TARGET.startswith("iOS"): TARGETS = ("libzim", "kiwix-lib") elif PLATFORM_TARGET.startswith("native_"): if OS_NAME == "osx": - TARGETS = ("libzim", ) if PLATFORM_TARGET == "native_mixed" else ("libzim", "zimwriterfs", "zim-tools", "kiwix-lib") + TARGETS = ("libzim", ) if PLATFORM_TARGET == "native_mixed" else ("libzim", "zim-tools", "kiwix-lib") else: if DESKTOP: TARGETS = ("kiwix-desktop",) elif PLATFORM_TARGET == "native_mixed": TARGETS = ("libzim",) else: - TARGETS = ("zimwriterfs", "zim-tools", "kiwix-tools") + TARGETS = ("zim-tools", "kiwix-tools") elif PLATFORM_TARGET in ("win32_static", "armhf_static", "i586_static"): TARGETS = ("kiwix-tools",) elif PLATFORM_TARGET == "flatpak": diff --git a/.github/scripts/common.py b/.github/scripts/common.py index f83de8d..c14ed76 100644 --- a/.github/scripts/common.py +++ b/.github/scripts/common.py @@ -72,10 +72,10 @@ EXPORT_FILES = { "zimdiff", "zimpatch", "zimsplit", + "zimwriterfs", ) ], ), - "zimwriterfs": (INSTALL_DIR / "bin", ["zimwriterfs" + BIN_EXT]), "libzim": ( INSTALL_DIR, ( diff --git a/.github/scripts/compile_all_deps.py b/.github/scripts/compile_all_deps.py index d6d5197..ff0fd9d 100755 --- a/.github/scripts/compile_all_deps.py +++ b/.github/scripts/compile_all_deps.py @@ -18,14 +18,14 @@ elif PLATFORM_TARGET.startswith("iOS"): TARGETS = ("libzim", "kiwix-lib") elif PLATFORM_TARGET.startswith("native_"): if OS_NAME == "osx": - TARGETS = ("libzim", "zimwriterfs", "zim-tools", "kiwix-lib") + TARGETS = ("libzim", "zim-tools", "kiwix-lib") else: if DESKTOP: TARGETS = ("kiwix-desktop",) elif PLATFORM_TARGET == "native_mixed": TARGETS = ("libzim",) else: - TARGETS = ("libzim", "zimwriterfs", "zim-tools", "kiwix-lib", "kiwix-tools") + TARGETS = ("libzim", "zim-tools", "kiwix-lib", "kiwix-tools") else: TARGETS = ("libzim", "zim-tools", "kiwix-lib", "kiwix-tools") diff --git a/README.md b/README.md index 0873563..01a818c 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,15 @@ kiwix-build zim-tools # will build zim-tools and its dependencies By default, `kiwix-build` will build `kiwix-tools` . +To see the whole list of available targets run with non existing target, ex: + +```bash +kiwix-build not-existing-target +... +invalid choice: 'not-existing-target' (choose from 'alldependencies', 'android-ndk', +... +``` + #### Target platform If no target platform is specified, a default one will be infered from diff --git a/kiwixbuild/dependencies/__init__.py b/kiwixbuild/dependencies/__init__.py index 81a90ff..3558c53 100644 --- a/kiwixbuild/dependencies/__init__.py +++ b/kiwixbuild/dependencies/__init__.py @@ -25,7 +25,6 @@ from . import ( uuid, xapian, zim_tools, - zimwriterfs, zlib, zstd ) diff --git a/kiwixbuild/dependencies/all_dependencies.py b/kiwixbuild/dependencies/all_dependencies.py index 6b1598a..3755875 100644 --- a/kiwixbuild/dependencies/all_dependencies.py +++ b/kiwixbuild/dependencies/all_dependencies.py @@ -13,10 +13,10 @@ class AllBaseDependencies(Dependency): @classmethod def get_dependencies(cls, platformInfo, allDeps): base_deps = ['zlib', 'lzma', 'zstd', 'xapian-core', 'pugixml', 'libcurl', 'icu4c', 'mustache', 'libmicrohttpd'] - # zimwriterfs + # zimwriterfs from zim-tools if platformInfo.build not in ('android', 'win32'): base_deps += ['libmagic', 'gumbo'] - + # zimtools if platformInfo.build not in ('android','iOS'): base_deps += ['docoptcpp'] diff --git a/kiwixbuild/dependencies/zim_tools.py b/kiwixbuild/dependencies/zim_tools.py index 8ceab10..ed03041 100644 --- a/kiwixbuild/dependencies/zim_tools.py +++ b/kiwixbuild/dependencies/zim_tools.py @@ -16,6 +16,9 @@ class ZimTools(Dependency): @property def configure_option(self): + base_option = "" + if self.buildEnv.platformInfo.build not in ('android', 'win32'): + base_option += " -Dmagic-install-prefix={buildEnv.install_dir}" if self.buildEnv.platformInfo.static: - return "-Dstatic-linkage=true" - return "" + base_option += " -Dstatic-linkage=true" + return base_option diff --git a/kiwixbuild/dependencies/zimwriterfs.py b/kiwixbuild/dependencies/zimwriterfs.py deleted file mode 100644 index cf3898a..0000000 --- a/kiwixbuild/dependencies/zimwriterfs.py +++ /dev/null @@ -1,22 +0,0 @@ -from .base import ( - Dependency, - GitClone, - MesonBuilder) - -class Zimwriterfs(Dependency): - name = "zimwriterfs" - force_build = True - - class Source(GitClone): - git_remote = "https://github.com/openzim/zimwriterfs.git" - git_dir = "zimwriterfs" - - class Builder(MesonBuilder): - dependencies = ['libzim', 'zlib', 'xapian-core', 'gumbo', 'icu4c', 'libmagic'] - - @property - def configure_option(self): - base_option = "-Dmagic-install-prefix={buildEnv.install_dir}" - if self.buildEnv.platformInfo.static: - base_option += " -Dstatic-linkage=true" - return base_option diff --git a/kiwixbuild/versions.py b/kiwixbuild/versions.py index 85b4cd5..e98a1de 100644 --- a/kiwixbuild/versions.py +++ b/kiwixbuild/versions.py @@ -5,7 +5,6 @@ main_project_versions = { 'kiwix-lib': '9.3.0', 'kiwix-tools': '3.1.2', # Also need to change this in appveyor/install_kiwix-tools.cmd 'zim-tools': '1.2.1', - 'zimwriterfs': '1.3.10', 'kiwix-desktop': '2.0.2' # Also change KIWIX_DESKTOP_VERSION and KIWIX_DESKTOP_RELEASE in appveyor.yml # You need to do the release process of kiwix-tools and kiwix-desktop in two separated process. } @@ -35,7 +34,6 @@ release_versions = { 'kiwix-lib': 0, # Depends of libzim (was 1) 'kiwix-tools': 0, # Depends of kiwix-lib and libzim (was 6) 'zim-tools': None, # Depends of libzim (was 3) - 'zimwriterfs': None, # Depends of libzim (was 4) 'kiwix-desktop': None # Depends of kiwix-lib and libzim (was 0) }