Mercurial > gub
changeset 6207:895c23f49db3
Python: add conflict dicts. Enables python-2.x builds and installs.
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Tue, 28 Aug 2012 11:26:57 +0200 |
parents | 8021db07ffb8 |
children | 08125e83bb42 |
files | gub/specs/python-2.4.py gub/specs/python-2.6.py gub/specs/python-config.py gub/specs/python.py gub/tools.py |
diffstat | 5 files changed, 51 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/gub/specs/python-2.4.py Tue Aug 28 10:29:46 2012 +0200 +++ b/gub/specs/python-2.4.py Tue Aug 28 11:26:57 2012 +0200 @@ -2,10 +2,21 @@ from gub import tools from gub.specs import python -class Python_2_4 (python.Python): pass -class Python_2_4__mingw (python.Python__mingw): pass -class Python_2_4__tools (python.Python__tools): pass -class Python_2_4__mingw_binary (python.Python__mingw_binary): pass -class Python_2_4__freebsd (python.Python__freebsd): pass -class Python_2_4__mingw (python.Python__mingw): pass -class Python_2_4__tools (python.Python__tools): pass +def get_conflict_dict (self): + return { + '': ['python-2.6', 'python'], + 'doc': ['python-2.6-doc', 'python-doc'], + 'devel': ['python-2.6-devel', 'python-devel'], + 'runtime': ['python-2.6-runtime', 'python-runtime'], + } + +class Python_2_4 (python.Python): + get_conflict_dict = get_conflict_dict +class Python_2_4__mingw (python.Python__mingw): + get_conflict_dict = get_conflict_dict +class Python_2_4__mingw_binary (python.Python__mingw_binary): + get_conflict_dict = get_conflict_dict +class Python_2_4__freebsd (python.Python__freebsd): + get_conflict_dict = get_conflict_dict +class Python_2_4__tools (python.Python__tools): + get_conflict_dict = get_conflict_dict
--- a/gub/specs/python-2.6.py Tue Aug 28 10:29:46 2012 +0200 +++ b/gub/specs/python-2.6.py Tue Aug 28 11:26:57 2012 +0200 @@ -2,6 +2,14 @@ from gub import tools from gub.specs import python +def get_conflict_dict (self): + return { + '': ['python-2.4', 'python'], + 'doc': ['python-2.4-doc', 'python-doc'], + 'devel': ['python-2.4-devel', 'python-devel'], + 'runtime': ['python-2.4-runtime', 'python-runtime'], + } + class Python_2_6 (python.Python): source = 'http://www.python.org/ftp/python/2.6.4/Python-2.6.4.tar.bz2' dependencies = [ @@ -36,6 +44,7 @@ 'itertools', 'time', ] + get_conflict_dict = get_conflict_dict class Python_2_6__mingw (python.Python__mingw): source = Python_2_6.source @@ -58,12 +67,18 @@ ac_cv_py_format_size_t=no ''' so_modules = Python_2_6.so_modules + get_conflict_dict = get_conflict_dict def patch (self): python.Python__mingw.patch (self) self.system ('cd %(srcdir)s && cp -pv PC/dl_nt.c Python/fileblocks.c') def generate_dll_a_and_la (self, libname, depend=''): target.AutoBuild.generate_dll_a_and_la (self, 'python2.6', depend) +class Python_2_4__mingw_binary (python.Python__mingw_binary): + get_conflict_dict = get_conflict_dict +class Python_2_4__freebsd (python.Python__freebsd): + get_conflict_dict = get_conflict_dict + class Python_2_6__tools (python.Python__tools): source = Python_2_6.source patches = [ @@ -74,5 +89,6 @@ force_autoupdate = True make_flags = python.Python__tools.make_flags so_modules = Python_2_6.so_modules + get_conflict_dict = get_conflict_dict def patch (self): tools.AutoBuild.patch (self)
--- a/gub/specs/python-config.py Tue Aug 28 10:29:46 2012 +0200 +++ b/gub/specs/python-config.py Tue Aug 28 11:26:57 2012 +0200 @@ -1,8 +1,9 @@ from gub import build from gub import misc +from gub import tools class Python_config (build.SdkBuild): - source = 'url://host/python-config-2.4.1.tar.gz' + source = 'url://host/python-config-' + tools.python_version + '.tar.gz' dependencies = ['tools::python'] def install (self): build.SdkBuild.install (self)
--- a/gub/specs/python.py Tue Aug 28 10:29:46 2012 +0200 +++ b/gub/specs/python.py Tue Aug 28 11:26:57 2012 +0200 @@ -44,6 +44,13 @@ make_flags = misc.join_lines (r''' BLDLIBRARY='%(rpath)s -L. -lpython$(VERSION)' ''') + def get_conflict_dict (self): + return { + '': ['python-2.6', 'python-2.4'], + 'doc': ['python-2.6-doc', 'python-2.4-doc'], + 'devel': ['python-2.6-devel', 'python-2.4-devel'], + 'runtime': ['python-2.6-runtime', 'python-2.4-runtime'], + } def __init__ (self, settings, source): target.AutoBuild.__init__ (self, settings, source) self.CROSS_ROOT = '%(targetdir)s' @@ -197,5 +204,12 @@ parallel_build_broken = True not_supported = ['nis', 'crypt'] make_flags = Python.make_flags + def get_conflict_dict (self): + return { + '': ['python-2.6', 'python-2.4'], + 'doc': ['python-2.6-doc', 'python-2.4-doc'], + 'devel': ['python-2.6-devel', 'python-2.4-devel'], + 'runtime': ['python-2.6-runtime', 'python-2.4-runtime'], + } def patch (self): Python.patch (self)