Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 629430
Collapse All | Expand All

(-)psycopg2-2.7.3/setup.py (-14 / +15 lines)
Lines 527-546 have_pydatetime = True Link Here
527
have_mxdatetime = False
527
have_mxdatetime = False
528
use_pydatetime = int(parser.get('build_ext', 'use_pydatetime'))
528
use_pydatetime = int(parser.get('build_ext', 'use_pydatetime'))
529
529
530
# check for mx package
530
if not use_pydatetime:
531
mxincludedir = ''
531
    # check for mx package
532
if parser.has_option('build_ext', 'mx_include_dir'):
532
    mxincludedir = ''
533
    mxincludedir = parser.get('build_ext', 'mx_include_dir')
533
    if parser.has_option('build_ext', 'mx_include_dir'):
534
if not mxincludedir:
534
        mxincludedir = parser.get('build_ext', 'mx_include_dir')
535
    mxincludedir = os.path.join(get_python_inc(plat_specific=1), "mx")
535
    if not mxincludedir:
536
if mxincludedir.strip() and os.path.exists(mxincludedir):
536
        mxincludedir = os.path.join(get_python_inc(plat_specific=1), "mx")
537
    # Build the support for mx: we will check at runtime if it can be imported
537
    if mxincludedir.strip() and os.path.exists(mxincludedir):
538
    include_dirs.append(mxincludedir)
538
        # Build the support for mx: we will check at runtime if it can be imported
539
    define_macros.append(('HAVE_MXDATETIME', '1'))
539
        include_dirs.append(mxincludedir)
540
    sources.append('adapter_mxdatetime.c')
540
        define_macros.append(('HAVE_MXDATETIME', '1'))
541
    depends.extend(['adapter_mxdatetime.h', 'typecast_mxdatetime.c'])
541
        sources.append('adapter_mxdatetime.c')
542
    have_mxdatetime = True
542
        depends.extend(['adapter_mxdatetime.h', 'typecast_mxdatetime.c'])
543
    version_flags.append('mx')
543
        have_mxdatetime = True
544
        version_flags.append('mx')
544
545
545
# now decide which package will be the default for date/time typecasts
546
# now decide which package will be the default for date/time typecasts
546
if have_pydatetime and (use_pydatetime or not have_mxdatetime):
547
if have_pydatetime and (use_pydatetime or not have_mxdatetime):

Return to bug 629430