예제 #1
0
파일: conf.py 프로젝트: drjova/hepcrawl

def _warn_node(self, msg, *args, **kwargs):
    """Do not warn on external images."""
    if not msg.startswith('nonlocal image URI found:'):
        _warn_node_old(self, msg, *args, **kwargs)




if not os.path.exists('_build/html/_static'):
    os.makedirs('_build/html/_static')

with open('_build/html/_static/AUTHORS.txt', 'w') as changelog_fd:
    changelog_fd.write(
        '\n'.join(a.encode('utf-8') for a in get_authors(project_dir='..'))
    )

with open('_build/html/_static/RELEASE_NOTES.txt', 'w') as changelog_fd:
    changelog_fd.write(get_releasenotes(
        project_dir='..',
        bugtracker_url=BUGTRACKER_URL,
    ).encode('utf-8'))
with open('_build/html/_static/CHANGELOG.txt', 'w') as changelog_fd:
    changelog_fd.write(get_changelog(
        project_dir='..',
        bugtracker_url=BUGTRACKER_URL,
    ).encode('utf-8'))


예제 #2
0
파일: conf.py 프로젝트: drjova/hepcrawl-1

if not os.path.exists('_build/html/_static'):
    os.makedirs('_build/html/_static')

with open('_build/html/_static/CHANGELOG.txt', 'w') as changelog_fd:
    changelog_fd.write(
        get_changelog(
            project_dir='..',
            bugtracker_url=
            'https://github.com/inspirehep/inspire-schemas/issues/',
        ).encode('utf-8'))

with open('_build/html/_static/AUTHORS.txt', 'w') as changelog_fd:
    changelog_fd.write('\n'.join(
        a.encode('utf-8') for a in get_authors(project_dir='..')))

sphinx.environment.BuildEnvironment.warn_node = _warn_node

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.intersphinx',
예제 #3
0
with open('_build/html/_static/CHANGELOG.txt', 'wb') as changelog_fd:
    changelog_fd.write(
        get_changelog(
            project_dir='..',
            bugtracker_url=(
                'https://github.com/inveniosoftware-contrib/inspire-workflows/'
                'issues/'
            ),
        ).encode('utf-8')
    )


with open('_build/html/_static/AUTHORS.txt', 'wb') as changelog_fd:
    changelog_fd.write(
        '\n'.join(get_authors(project_dir='..')).encode('utf-8')
    )


def _warn_node(self, msg, node, *args, **kwargs):
    """Do not warn on external images."""
    if not msg.startswith('nonlocal image URI found:'):
        self._warnfunc(msg, '%s:%s' % get_source_line(node))

sphinx.environment.BuildEnvironment.warn_node = _warn_node


# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
예제 #4
0
with open('_build/html/_static/CHANGELOG.txt', 'wb') as changelog_fd:
    changelog_fd.write(
        get_changelog(
            project_dir='..',
            bugtracker_url=(
                'https://github.com/inveniosoftware-contrib/inspire-workflows/'
                'issues/'
            ),
        ).encode('utf-8')
    )


with open('_build/html/_static/AUTHORS.txt', 'wb') as changelog_fd:
    changelog_fd.write(
        '\n'.join(get_authors(project_dir='..')).encode('utf-8')
    )



_warn_node_old = sphinx.environment.BuildEnvironment.warn_node


def _warn_node(self, msg, *args, **kwargs):
    """Do not warn on external images."""
    if not msg.startswith('nonlocal image URI found:'):
        _warn_node_old(self, msg, *args, **kwargs)

sphinx.environment.BuildEnvironment.warn_node = _warn_node

예제 #5
0
    __version__ = get_current_version(project_name=PROJECT_NAME)
else:
    IN_A_PACKAGE = True
    with open(PKG_INFO) as info_fd:
        for line in info_fd.readlines():
            if line.startswith('Version: '):
                __version__ = line.split(' ', 1)[-1]
                break
        else:
            raise ImportError('Unable to find version for autosemver')

if __name__ == '__main__':
    URL = 'https://github.com/david-caro/python-autosemver'
    if not IN_A_PACKAGE:
        with open('AUTHORS', 'w') as authors_fd:
            authors_fd.write('\n'.join(get_authors()))

        with open('CHANGELOG', 'w') as changelog_fd:
            changelog_fd.write(get_changelog(bugtracker_url=URL + '/issues/'))

    setup(
        author='David Caro',
        author_email='*****@*****.**',
        description='Tools to handle automatic semantic versioning in python',
        install_requires=['dulwich'],
        license='GPLv3',
        name='autosemver',
        package_data={'': ['CHANGELOG', 'AUTHORS']},
        packages=['autosemver'],
        url=URL,
        version=__version__,
예제 #6
0
else:
    IN_A_PACKAGE = True
    with open(PKG_INFO) as info_fd:
        for line in info_fd.readlines():
            if line.startswith("Version: "):
                __version__ = line.split(" ", 1)[-1]
                break
        else:
            raise ImportError("Unable to find version for autosemver")

if __name__ == "__main__":
    URL = "https://github.com/david-caro/python-autosemver"
    LONG_DESCRIPTION = ""
    if not IN_A_PACKAGE:
        with open("AUTHORS", "w") as authors_fd:
            authors_fd.write("\n".join(get_authors()))

        with open("CHANGELOG", "w") as changelog_fd:
            changelog_fd.write(get_changelog(bugtracker_url=URL + "/issues/"))

        README_PATH = os.path.join(os.path.dirname(__file__), "README.rst")
        with open(README_PATH, "rb") as readme:
            LONG_DESCRIPTION = readme.read().decode("UTF-8")

    setup(
        author="David Caro",
        author_email="*****@*****.**",
        description="Tools to handle automatic semantic versioning in python",
        install_requires=["dulwich>=0.19.6"],
        long_description=LONG_DESCRIPTION,
        long_description_content_type="text/x-rst",