__init__.py
author Paul Tonelli <paul.tonelli@logilab.fr>
Tue, 08 Apr 2014 15:28:12 +0200
changeset 1468 3644b206edb5
parent 1458 2c4842747f04
child 1506 fbfad7f92d4f
child 1515 2a12802efe66
permissions -rw-r--r--
[apycotlib] move checkers/preprocessors to have same organisation in dev and packages various necessary changes: - path updates - import cubes.apycot in tests to be sure _apycotlib is added to path - rename pylint checkers to pycheckers to avoid confusion with package checkers - fix js path in jslint.py why: If you install a pkg, the checkers are installed in:: /usr/share/narval/checkers/apycot/* and /usr/share/narval is added to the path when launching them. In a dev environment, they were previously in :: _apycotlib/checkers/* This required specific paths to make a dev environment work (added in __init__.py). The new organisation puts checkers in:: _apycotlib/checkers/apycot/* The new organisation only requires to add _apycotlib to path to make checkers work. Same thing was done for preprpocessors.

"""cubicweb-apycot"""
from cubicweb.schema import ETYPE_NAME_MAP
ETYPE_NAME_MAP['TestConfigGroup'] = 'TestConfig'


try:
    # development version
    import _apycotlib
except ImportError:
    pass
else:
    import sys
    sys.modules['apycotlib'] = _apycotlib
    from os.path import dirname, join
    sys.path.append(join(dirname(__file__),'_apycotlib'))