Esempio n. 1
0
    import configparser
else:
    import ConfigParser as configparser
# pylint: enable=import-error

try:
    from wheel.bdist_wheel import bdist_wheel
except ImportError:
    bdist_wheel = None

try:
    import distutils644
except ImportError:
    pass
else:
    distutils644.install()

b = b''  # Python >= 2.6 is required

def uopen(*args):
    if str is bytes:
        return open(*args)
    else:
        return open(*args, encoding='UTF-8')

def get_readme():
    with io.open('doc/README', encoding='ASCII') as file:
        content = file.read()
    content = re.compile('^[.][.] vim:.*', re.MULTILINE).sub('', content)
    return '\n' + content.strip() + '\n'
import distutils.command.sdist
import distutils.dep_util
import distutils.dir_util
import distutils.version

try:
    import sphinx.setup_command as sphinx_setup_command
except ImportError:
    sphinx_setup_command = None

try:
    import distutils644
except ImportError:
    pass
else:
    distutils644.install()

b''  # Python >= 2.6 is required


def ext_modules():
    for pyx_file in glob.iglob(os.path.join('djvu', '*.pyx')):
        module, _ = os.path.splitext(os.path.basename(pyx_file))
        yield module


ext_modules = list(ext_modules())


def get_version():
    path = os.path.join(os.path.dirname(__file__), 'doc', 'changelog')