Skip to content

Commit d8bd7ed

Browse files
author
James William Pye
committed
Conditionally build extensions modules on windows.
This will allow people to do source installs without having to modify the source.
1 parent 59b8ab2 commit d8bd7ed

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

setup.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
sys.stderr.write(
1212
"ERROR: py-postgresql is for Python 3.0 and greater." + os.linesep
1313
)
14+
sys.stderr.write(
15+
"HINT: setup.py was ran using Python " + \
16+
'.'.join([str(x) for x in sys.version_info[:3]]) +
17+
': ' + sys.executable + os.linesep
18+
)
1419
sys.exit(1)
1520

1621
NAME = 'py-postgresql'
@@ -41,6 +46,20 @@
4146
postgresql.driver.dbapi20
4247
4348
However, PG-API is recommended as it provides greater utility.
49+
50+
51+
History
52+
-------
53+
54+
py-postgresql is not yet another PostgreSQL driver, it's been in development for
55+
years. py-postgresql is the Python 3.0 port of the ``pg_proboscis`` driver and
56+
integration of the other ``pg/python`` projects.
57+
58+
59+
More Information
60+
----------------
61+
62+
http://python.projects.postgresql.org
4463
"""
4564

4665
CLASSIFIERS = [
@@ -91,7 +110,8 @@
91110
# People who get failures are more likely to just give up on the package
92111
# without reading the documentation. :(
93112
'ext_modules' : (
94-
extensions if sys.platform != 'win32' or os.environ.get('PY_BUILD_EXTENSIONS')
113+
extensions if os.environ.get('PY_BUILD_EXTENSIONS') or \
114+
not sys.platform in ('win32',)
95115
else ()
96116
),
97117

0 commit comments

Comments
 (0)