mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Command to build deps
This commit is contained in:
parent
1fbfffd772
commit
f52d529090
@ -7,27 +7,28 @@ __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
__all__ = [
|
||||
'pot', 'translations', 'get_translations', 'iso639', 'iso3166',
|
||||
'build', 'mathjax', 'man_pages',
|
||||
'gui',
|
||||
'git_version',
|
||||
'develop', 'install',
|
||||
'kakasi', 'rapydscript', 'cacerts', 'recent_uas', 'resources',
|
||||
'check', 'to3', 'unicode_check', 'iterators_check', 'test',
|
||||
'sdist', 'bootstrap', 'extdev',
|
||||
'manual', 'tag_release',
|
||||
'upload_to_server',
|
||||
'upload_installers',
|
||||
'upload_user_manual', 'upload_demo', 'reupload',
|
||||
'stage1', 'stage2', 'stage3', 'stage4', 'stage5', 'publish', 'publish_betas',
|
||||
'linux', 'linux32', 'linux64', 'win', 'win32', 'win64', 'osx',
|
||||
]
|
||||
'pot', 'translations', 'get_translations', 'iso639', 'iso3166',
|
||||
'build', 'mathjax', 'man_pages',
|
||||
'gui',
|
||||
'git_version',
|
||||
'develop', 'install',
|
||||
'kakasi', 'rapydscript', 'cacerts', 'recent_uas', 'resources',
|
||||
'check', 'to3', 'unicode_check', 'iterators_check', 'test',
|
||||
'sdist', 'bootstrap', 'extdev',
|
||||
'manual', 'tag_release',
|
||||
'upload_to_server',
|
||||
'upload_installers',
|
||||
'upload_user_manual', 'upload_demo', 'reupload',
|
||||
'stage1', 'stage2', 'stage3', 'stage4', 'stage5', 'publish', 'publish_betas',
|
||||
'linux', 'linux32', 'linux64', 'win', 'win32', 'win64', 'osx', 'build_dep',
|
||||
]
|
||||
|
||||
from setup.installers import Linux, Win, OSX, Linux32, Linux64, Win32, Win64, ExtDev
|
||||
from setup.installers import Linux, Win, OSX, Linux32, Linux64, Win32, Win64, ExtDev, BuildDep
|
||||
linux, linux32, linux64 = Linux(), Linux32(), Linux64()
|
||||
win, win32, win64 = Win(), Win32(), Win64()
|
||||
osx = OSX()
|
||||
extdev = ExtDev()
|
||||
build_dep = BuildDep()
|
||||
|
||||
from setup.translations import POT, GetTranslations, Translations, ISO639, ISO3166
|
||||
pot = POT()
|
||||
|
@ -88,6 +88,15 @@ def build_single(which='windows', bitness='64', shutdown=True):
|
||||
subprocess.Popen(cmd).wait()
|
||||
|
||||
|
||||
def build_dep(args):
|
||||
base, bypy = get_paths()
|
||||
exe = get_exe()
|
||||
cmd = [exe, bypy] + list(args)
|
||||
ret = subprocess.Popen(cmd).wait()
|
||||
if ret != 0:
|
||||
raise SystemExit(ret)
|
||||
|
||||
|
||||
class BuildInstaller(Command):
|
||||
|
||||
OS = BITNESS = ''
|
||||
@ -151,6 +160,18 @@ class Win(BuildInstallers):
|
||||
OS = 'win'
|
||||
|
||||
|
||||
class BuildDep(Command):
|
||||
|
||||
description = (
|
||||
'Build a calibre dependency. For e.g. build_dep windows expat.'
|
||||
' Without arguments builds all deps for specified platform. Use windows 32 for 32bit.'
|
||||
)
|
||||
|
||||
def run(self, opts):
|
||||
args = opts.cli_args
|
||||
build_dep(args)
|
||||
|
||||
|
||||
class ExtDev(Command):
|
||||
|
||||
description = 'Develop a single native extension conveniently'
|
||||
|
Loading…
x
Reference in New Issue
Block a user