remove ptl support stuff (#4813)

This commit is contained in:
Frédéric Péters 2014-05-14 08:43:15 +02:00
parent 8273aecd64
commit 2bf4426619
3 changed files with 2 additions and 28 deletions

View File

@ -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)

View File

@ -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

View File

@ -14,30 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
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: