From a344028733e44e8594419ea26174d710eb688a43 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 5 Sep 2019 08:15:19 +0530 Subject: [PATCH] Command to export packages --- setup/commands.py | 4 +++- setup/installers.py | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/setup/commands.py b/setup/commands.py index 1c22436826..3cb61a690a 100644 --- a/setup/commands.py +++ b/setup/commands.py @@ -21,14 +21,16 @@ __all__ = [ 'upload_user_manual', 'upload_demo', 'reupload', 'stage1', 'stage2', 'stage3', 'stage4', 'stage5', 'publish', 'publish_betas', 'linux', 'linux32', 'linux64', 'win', 'win32', 'win64', 'osx', 'build_dep', + 'export_packages', ] -from setup.installers import Linux, Win, OSX, Linux32, Linux64, Win32, Win64, ExtDev, BuildDep +from setup.installers import Linux, Win, OSX, Linux32, Linux64, Win32, Win64, ExtDev, BuildDep, ExportPackages linux, linux32, linux64 = Linux(), Linux32(), Linux64() win, win32, win64 = Win(), Win32(), Win64() osx = OSX() extdev = ExtDev() build_dep = BuildDep() +export_packages = ExportPackages() from setup.translations import POT, GetTranslations, Translations, ISO639, ISO3166 pot = POT() diff --git a/setup/installers.py b/setup/installers.py index 318a437dd3..5f49a67ccd 100644 --- a/setup/installers.py +++ b/setup/installers.py @@ -172,6 +172,19 @@ class BuildDep(Command): build_dep(args) +class ExportPackages(Command): + + description = 'Export built deps to a server for CI testing' + + def run(self, opts): + base, bypy = get_paths() + exe = get_exe() + cmd = [exe, bypy, 'export'] + list(opts.cli_args) + ['download.calibre-ebook.com:/srv/download/ci/calibre'] + ret = subprocess.Popen(cmd).wait() + if ret != 0: + raise SystemExit(ret) + + class ExtDev(Command): description = 'Develop a single native extension conveniently'