diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | setup.cfg | 4 | ||||
-rw-r--r-- | setup.py | 11 |
3 files changed, 13 insertions, 5 deletions
@@ -1,5 +1,8 @@ 2005-12-11 Federico Di Gregorio <fog@initd.org> + * 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. @@ -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: @@ -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')) |