mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 21:00:33 +03:00
Fixed bad interaction of setup.py with other dependencies
The problem is in Distribute dependencies on Python 3. Create a new command class instead of changing inplace the one other projects may use. Close ticket #153.
This commit is contained in:
parent
06bfa801f4
commit
fe6eb127fc
2
NEWS
2
NEWS
|
@ -14,6 +14,8 @@ What's new in psycopg 2.5
|
||||||
- connection.reset() implemented using DISCARD ALL on server versions
|
- connection.reset() implemented using DISCARD ALL on server versions
|
||||||
supporting it.
|
supporting it.
|
||||||
- Properly cleanup memory of broken connections (ticket #142).
|
- Properly cleanup memory of broken connections (ticket #142).
|
||||||
|
- Fixed bad interaction of setup.py with other dependencies in
|
||||||
|
Distribute project on Python 3 (ticket #153).
|
||||||
- 'errorcodes' map updated to PostgreSQL 9.2.
|
- 'errorcodes' map updated to PostgreSQL 9.2.
|
||||||
- Dropped Zope adapter from source repository. ZPsycopgDA can now be
|
- Dropped Zope adapter from source repository. ZPsycopgDA can now be
|
||||||
found at <http://github.com/psycopg/ZPsycopgDA>.
|
found at <http://github.com/psycopg/ZPsycopgDA>.
|
||||||
|
|
10
setup.py
10
setup.py
|
@ -55,14 +55,18 @@ from distutils.ccompiler import get_default_compiler
|
||||||
from distutils.util import get_platform
|
from distutils.util import get_platform
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from distutils.command.build_py import build_py_2to3 as build_py
|
from distutils.command.build_py import build_py_2to3
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from distutils.command.build_py import build_py
|
from distutils.command.build_py import build_py
|
||||||
else:
|
else:
|
||||||
|
class build_py(build_py_2to3):
|
||||||
|
# workaround subclass for ticket #153
|
||||||
|
pass
|
||||||
|
|
||||||
# Configure distutils to run our custom 2to3 fixers as well
|
# Configure distutils to run our custom 2to3 fixers as well
|
||||||
from lib2to3.refactor import get_fixers_from_package
|
from lib2to3.refactor import get_fixers_from_package
|
||||||
build_py.fixer_names = get_fixers_from_package('lib2to3.fixes')
|
build_py.fixer_names = get_fixers_from_package('lib2to3.fixes') \
|
||||||
build_py.fixer_names.append('fix_b')
|
+ [ 'fix_b' ]
|
||||||
sys.path.insert(0, 'scripts')
|
sys.path.insert(0, 'scripts')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user