From 2bf44266191d01b8b60f6beb49154e58137709bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 14 May 2014 08:43:15 +0200 Subject: [PATCH] remove ptl support stuff (#4813) --- po/Makefile | 2 +- setup.py | 3 --- wcs/qommon/__init__.py | 25 +------------------------ 3 files changed, 2 insertions(+), 28 deletions(-) diff --git a/po/Makefile b/po/Makefile index 8c5058dd8..2b26515ea 100644 --- a/po/Makefile +++ b/po/Makefile @@ -1,6 +1,6 @@ POFILES=$(wildcard *.po) MOFILES=$(POFILES:.po=.mo) -PYFILES=$(shell find ../wcs -name '*.py' -or -name '*.ptl' | grep -v vendor) +PYFILES=$(shell find ../wcs -name '*.py' | grep -v vendor) all: $(MOFILES) diff --git a/setup.py b/setup.py index 3eb3192b1..e2d3926bb 100644 --- a/setup.py +++ b/setup.py @@ -9,8 +9,6 @@ from distutils.command.install_data import install_data as _install_data from distutils.command.build import build as _build from distutils.command.sdist import sdist -from quixote.ptl.qx_distutils import qx_build_py - local_cfg = None if os.path.exists('wcs/wcs_cfg.py'): local_cfg = file('wcs/wcs_cfg.py').read() @@ -105,7 +103,6 @@ def get_version(): cmdclass = { 'build': build, - 'build_py': qx_build_py, 'build_trans': build_trans, 'install_data': install_data, 'sdist': eo_sdist diff --git a/wcs/qommon/__init__.py b/wcs/qommon/__init__.py index c58ac821f..ffabe1963 100644 --- a/wcs/qommon/__init__.py +++ b/wcs/qommon/__init__.py @@ -14,30 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, see . -from quixote import enable_ptl, get_publisher - -enable_ptl() - -import sys -# Make ihooks works under Python 2.6 and Quixote < 2.7, the problem is that -# ihooks is broken AND deprecated, and is removed in Python 3 without being -# repaired before and there no transition module. -# The exact problem is that the ihooks __import__ implementation does not -# handle the last argument 'level', which is used to do 'relatives' import -if sys.version_info >= (2, 6): - import __builtin__ - import ihooks - if ihooks.current_importer: - __old_importer = __builtin__.__import__ - __very_old_importer = ihooks.current_importer.save_import_module - def __import_wrapper(name, globals={}, locals={}, fromlist=[], level=-1): - if level == -1: - return __old_importer(name, globals, locals, fromlist) - else: - return __very_old_importer(name, globals, locals, fromlist, level) - if ihooks.current_importer: - __builtin__.__import__ = __import_wrapper - +from quixote import get_publisher from publisher import get_cfg, get_logger try: