From 31d85750b0c150527eb9f53c02cfd5598e5bf146 Mon Sep 17 00:00:00 2001 From: Federico Di Gregorio Date: Sun, 11 Dec 2005 08:05:49 +0000 Subject: [PATCH] mx_include_dir in setup.cfg. --- ChangeLog | 3 +++ setup.cfg | 4 ++++ setup.py | 11 ++++++----- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d260dbc8..d49b85e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-12-11 Federico Di Gregorio + * setup.py: half-applied patch from Tavis to specify mx_include_dir + in setup.cfg. + * psycopg/typecast.c (typecast_parse_time): cz limit in the while loop is 6, not 5. This solve the problem with "fractionary" time zones and fixes #78. diff --git a/setup.cfg b/setup.cfg index 0640674f..5570beae 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,6 +16,10 @@ use_pydatetime=1 # with old versions of psycopg 1 and pre-beta versions of psycopg 2.) use_decimal=0 +# If the build system does not find the mx.DateTime headers, try +# uncommenting the following line and setting its value to the right path. +#mx_include_dir= + # "include_dirs" is the preferred method for locating postgresql headers, # but some extra checks on sys.platform will still be done in setup.py. # The next line is the default as used on psycopg author Debian laptop: diff --git a/setup.py b/setup.py index cb2ac181..fba0189e 100644 --- a/setup.py +++ b/setup.py @@ -77,13 +77,11 @@ class psycopg_build_ext(build_ext): user_options = build_ext.user_options[:] user_options.extend([ ('pgdir=', None, - "The postgresql directory, either source or bin"), + "The postgresql directory, either source or bin (win32 only)"), ('use-pg-dll', None, - "Build against libpq.dll"), + "Build against libpq.dll (win32 only)"), ('use-pydatetime', None, "Use Python datatime objects for date and time representation."), - ('use-decimal', None, - "Use Decimal type even on Python 2.3 if the module is provided."), ]) boolean_options = build_ext.boolean_options[:] @@ -282,7 +280,10 @@ have_mxdatetime = False use_pydatetime = int(parser.get('build_ext', 'use_pydatetime')) # check for mx package -mxincludedir = os.path.join(get_python_inc(plat_specific=1), "mx") +if parser.has_option('build_ext', 'mx_include_dir'): + mxincludedir = parser.get('build_ext', 'mx_include_dir') +else: + mxincludedir = os.path.join(get_python_inc(plat_specific=1), "mx") if os.path.exists(mxincludedir): include_dirs.append(mxincludedir) define_macros.append(('HAVE_MXDATETIME','1'))