diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-06-04 22:26:21 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-06-04 22:26:21 +0100 |
commit | dcc9e84a68a0aa446b924c308a81605d57965859 (patch) | |
tree | 326f96b21aa639c16cc6503a95124dd5d1e2af8b | |
parent | a0d16fcfb207ae088b4579b5ebe9f7b6e020ef5b (diff) | |
download | psycopg2-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.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |