summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2011-06-04 22:26:21 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2011-06-04 22:26:21 +0100
commitdcc9e84a68a0aa446b924c308a81605d57965859 (patch)
tree326f96b21aa639c16cc6503a95124dd5d1e2af8b
parenta0d16fcfb207ae088b4579b5ebe9f7b6e020ef5b (diff)
downloadpsycopg2-dcc9e84a68a0aa446b924c308a81605d57965859.tar.gz
Don't encode the pg_config path on Python 3 on Windows
It can deal with unicode ok, and fails if it gets bytes.
-rw-r--r--setup.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 6f06ad1..f155119 100644
--- a/setup.py
+++ b/setup.py
@@ -387,10 +387,10 @@ or with the pg_config option in 'setup.cfg'.
)
# Support unicode paths, if this version of Python provides the
# necessary infrastructure:
- if hasattr(sys, 'getfilesystemencoding'):
+ if sys.version_info[0] < 3 \
+ and hasattr(sys, 'getfilesystemencoding'):
pg_config_path = pg_config_path.encode(
- sys.getfilesystemencoding()
- )
+ sys.getfilesystemencoding())
return pg_config_path