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'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'pot', 'translations', 'get_translations', 'iso639', 'iso3166',
|
'pot', 'translations', 'get_translations', 'iso639', 'iso3166',
|
||||||
'build', 'mathjax', 'man_pages',
|
'build', 'mathjax', 'man_pages',
|
||||||
'gui',
|
'gui',
|
||||||
'git_version',
|
'git_version',
|
||||||
'develop', 'install',
|
'develop', 'install',
|
||||||
'kakasi', 'rapydscript', 'cacerts', 'recent_uas', 'resources',
|
'kakasi', 'rapydscript', 'cacerts', 'recent_uas', 'resources',
|
||||||
'check', 'to3', 'unicode_check', 'iterators_check', 'test',
|
'check', 'to3', 'unicode_check', 'iterators_check', 'test',
|
||||||
'sdist', 'bootstrap', 'extdev',
|
'sdist', 'bootstrap', 'extdev',
|
||||||
'manual', 'tag_release',
|
'manual', 'tag_release',
|
||||||
'upload_to_server',
|
'upload_to_server',
|
||||||
'upload_installers',
|
'upload_installers',
|
||||||
'upload_user_manual', 'upload_demo', 'reupload',
|
'upload_user_manual', 'upload_demo', 'reupload',
|
||||||
'stage1', 'stage2', 'stage3', 'stage4', 'stage5', 'publish', 'publish_betas',
|
'stage1', 'stage2', 'stage3', 'stage4', 'stage5', 'publish', 'publish_betas',
|
||||||
'linux', 'linux32', 'linux64', 'win', 'win32', 'win64', 'osx',
|
'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()
|
linux, linux32, linux64 = Linux(), Linux32(), Linux64()
|
||||||
win, win32, win64 = Win(), Win32(), Win64()
|
win, win32, win64 = Win(), Win32(), Win64()
|
||||||
osx = OSX()
|
osx = OSX()
|
||||||
extdev = ExtDev()
|
extdev = ExtDev()
|
||||||
|
build_dep = BuildDep()
|
||||||
|
|
||||||
from setup.translations import POT, GetTranslations, Translations, ISO639, ISO3166
|
from setup.translations import POT, GetTranslations, Translations, ISO639, ISO3166
|
||||||
pot = POT()
|
pot = POT()
|
||||||
|
@ -88,6 +88,15 @@ def build_single(which='windows', bitness='64', shutdown=True):
|
|||||||
subprocess.Popen(cmd).wait()
|
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):
|
class BuildInstaller(Command):
|
||||||
|
|
||||||
OS = BITNESS = ''
|
OS = BITNESS = ''
|
||||||
@ -151,6 +160,18 @@ class Win(BuildInstallers):
|
|||||||
OS = 'win'
|
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):
|
class ExtDev(Command):
|
||||||
|
|
||||||
description = 'Develop a single native extension conveniently'
|
description = 'Develop a single native extension conveniently'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user