diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2016-07-07 12:05:29 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2016-07-07 12:05:29 +0100 |
commit | e071e37b201cac573476e9ce90d774aaa0e4f62d (patch) | |
tree | 08069381995393c89966613f1f37473b1ebf0b29 /setup.py | |
parent | dc95b0963e50b8a3506b36c8700132a8af0a78d9 (diff) | |
download | psycopg2-fix-453.tar.gz |
Added empty options in setup.cfgfix-453
Setuptools removes them from the sdist, see #453
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -384,6 +384,11 @@ class psycopg_build_ext(build_ext): def finalize_options(self): """Complete the build system configuration.""" + # An empty option in the setup.cfg causes self.libraries to include + # an empty string in the list of libraries + if self.libraries is not None and not self.libraries.strip(): + self.libraries = None + build_ext.finalize_options(self) pg_config_helper = PostgresConfig(self) @@ -515,7 +520,7 @@ 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): +if mxincludedir.strip() and os.path.exists(mxincludedir): # Build the support for mx: we will check at runtime if it can be imported include_dirs.append(mxincludedir) define_macros.append(('HAVE_MXDATETIME', '1')) |