Пример #1
0
from datetime import datetime
from inspect import (
    getfile as inspect_getfile,
    currentframe as inspect_currentframe,
)
from os.path import (
    abspath as path_abspath,
    dirname as path_dirname,
    join as path_join,
)
from sys import path as sys_path

from nose.tools import (eq_, ok_)

SCRIPT_PATH = path_dirname(
    path_abspath(inspect_getfile(inspect_currentframe())))
PROJECT_ROOT = path_dirname(SCRIPT_PATH)

ROOT_PACKAGE_NAME = 'LCONF'
ROOT_PACKAGE_PATH = path_join(PROJECT_ROOT, ROOT_PACKAGE_NAME)

sys_path.insert(0, PROJECT_ROOT)

from LCONF.lconf_classes import (
    LconfBlk,
    LconfBlkI,
    LconfKVList,
    LconfKVMap,
    LconfRoot,
    LconfListOT,
)
Пример #2
0
   loads as json_loads
)
from os.path import (
   abspath as path_abspath,
   dirname as path_dirname,
   join as path_join,
)
from sys import path as sys_path

from nose.tools import (
   eq_,
   ok_
)


SCRIPT_PATH = path_dirname(path_abspath(inspect_getfile(inspect_currentframe())))
PROJECT_ROOT = path_dirname(SCRIPT_PATH)

ROOT_PACKAGE_NAME = 'LCONF'
ROOT_PACKAGE_PATH = path_join(PROJECT_ROOT, ROOT_PACKAGE_NAME)

sys_path.insert(0, PROJECT_ROOT)

from LCONF.lconf_classes import (
   LconfKVList,
   LconfRoot,
)
from LCONF.lconf_structure_classes import (
   KVList,
   Root,
)
Пример #3
0
# https://github.com/enthought/pyql/blob/master/setup.py
from Cython.Build import cythonize
from Cython.Compiler.Options import parse_directive_list

import versioneer


versioneer.VCS = 'git'
versioneer.versionfile_source = 'PySpeedIT/_version.py'
versioneer.versionfile_build = 'PySpeedIT/_version.py'
versioneer.tag_prefix = ''  # tags are like 1.1.0
versioneer.parentdir_prefix = 'PySpeedIT-'  # path_dirname like 'PySpeedIT-1.1.0'

_version = versioneer.get_version()

SCRIPT_PATH = path_dirname(path_abspath(inspect_getfile(inspect_currentframe())))
PACKAGE_NAME = 'PySpeedIT'
ROOT_PACKAGE_PATH = path_join(path_dirname(SCRIPT_PATH), PACKAGE_NAME)
MAIN_PACKAGE_PATH = path_join(ROOT_PACKAGE_PATH, PACKAGE_NAME)

from PySpeedIT import TESTED_HOST_OS

if sys_version_info[:2] < (3, 4) or 'linux' not in sys_platform:
   print('''

      PySpeedIT is only tested with Python 3.4.2rc1 or higher:\n  current python version: {0:d}.{1:d}\n\n

      TESTED_HOST_OS: {3:}
      '''.format(sys_version_info[:2][0], sys_version_info[:2][1], TESTED_HOST_OS))

# check some untested options
Пример #4
0
def get_psphinxtheme_root_dir():
   """ :return: (str) path of the *P-SphinxTheme* root dir
   """
   return path_dirname(path_abspath(inspect_getfile(inspect_currentframe())))