if not os.path.exists('_build/html/_static'): os.makedirs('_build/html/_static') URL = 'https://github.com/inveniosoftware-contrib/workflow' BUGTRACKER_URL = URL + '/issues/' with open('_build/html/_static/RELEASE_NOTES.txt', 'w') as changelog_fd: changelog_fd.write(get_releasenotes( project_dir='..', bugtracker_url=BUGTRACKER_URL, )) with open('_build/html/_static/CHANGELOG.txt', 'w') as changelog_fd: changelog_fd.write(get_changelog( project_dir='..', bugtracker_url=BUGTRACKER_URL, )) # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('..')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Do not warn on external images. suppress_warnings = ['image.nonlocal_uri']
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/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. #
get_authors, get_changelog, get_current_version, ) if not os.path.exists('_build/html/_static'): os.makedirs('_build/html/_static') 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:'):
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__, entry_points={ 'console_scripts': 'autosemver=autosemver:main',
# You should have received a copy of the GNU General Public License # along with autosemver; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. from __future__ import print_function import os from autosemver.packaging import get_changelog, get_current_version 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='..')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Do not warn on external images. suppress_warnings = ['image.nonlocal_uri'] # 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.coverage',
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__': 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()) setup(author='David Caro', author_email='*****@*****.**', install_requires=['dulwich'], license='GPLv3', name='autosemver', package_data={'': ['CHANGELOG', 'AUTHORS']}, packages=['autosemver'], url='https://github.com/david-caro/python-autosemver', version=__version__, entry_points={ 'console_scripts': 'autosemver=autosemver:main', 'distutils.setup_keywords': [ 'autosemver=autosemver:distutils',
# as an Intergovernmental Organization or submit itself to any jurisdiction. from __future__ import print_function import os from autosemver.packaging import get_changelog, get_current_version 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/', )) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Do not warn on external images. suppress_warnings = ['image.nonlocal_uri'] # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [
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')) # -- 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',
os.makedirs("_build/html/_static") URL = "https://github.com/david-caro/python-autosemver" BUGTRACKER_URL = URL + "/issues/" with open("_build/html/_static/RELEASE_NOTES.txt", "w") as changelog_fd: changelog_fd.write( get_releasenotes( project_dir="..", bugtracker_url=BUGTRACKER_URL, ) ) with open("_build/html/_static/CHANGELOG.txt", "w") as changelog_fd: changelog_fd.write( get_changelog( project_dir="..", bugtracker_url=BUGTRACKER_URL, ) ) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' # Do not warn on external images. suppress_warnings = ["image.nonlocal_uri"] # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [
import sphinx.environment from autosemver.packaging import ( get_authors, get_changelog, get_current_version, ) if not os.path.exists('_build/html/_static'): os.makedirs('_build/html/_static') 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