Skip to content

Commit 93090ac

Browse files
author
James William Pye
committed
Rely on the optional extension keyword.
distutils
1 parent 02e6f81 commit 93090ac

1 file changed

Lines changed: 6 additions & 17 deletions

File tree

setup.py

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
#!/usr/bin/env python
22
##
3-
# copyright 2009, James William Pye
4-
# http://python.projects.postgresql.org
3+
# setup.py - .release.distutils
54
##
65
import sys
76
import os
87

9-
if sys.version_info[:2] < (3,0):
8+
if sys.version_info[:2] < (3,1):
109
sys.stderr.write(
11-
"ERROR: py-postgresql is for Python 3.0 and greater." + os.linesep
10+
"ERROR: py-postgresql is for Python 3.1 and greater." + os.linesep
1211
)
1312
sys.stderr.write(
1413
"HINT: setup.py was ran using Python " + \
@@ -19,21 +18,11 @@
1918

2019
# distutils data is kept in `postgresql.release.distutils`
2120
sys.path.insert(0, '')
22-
23-
# Only build extension modules on win32 if PY_BUILD_EXTENSIONS is enabled.
24-
# People who get failures are more likely to just give up on the package
25-
# without reading the documentation. :(
26-
build_extensions = (
27-
os.environ.get('PY_BUILD_EXTENSIONS') \
28-
or not sys.platform in ('win32',)
29-
)
30-
if build_extensions == '0':
31-
build_extensions = False
21+
sys.dont_write_bytecode = True
3222

3323
import postgresql.release.distutils as pg_dist
34-
defaults = pg_dist.standard_setup_keywords(
35-
build_extensions = build_extensions
36-
)
24+
defaults = pg_dist.standard_setup_keywords()
25+
3726
if __name__ == '__main__':
3827
from distutils.core import setup
3928
setup(**defaults)

0 commit comments

Comments
 (0)