How to use the versioneer.versionfile_source function in versioneer

To help you get started, we’ve selected a few versioneer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github numba / llvmlite / setup.py View on Github external
from distutils.command.clean import clean
from distutils import log
from distutils.dir_util import remove_tree
from distutils.spawn import spawn
import os
import sys
import shutil

if os.environ.get('READTHEDOCS', None) == 'True':
    sys.exit("setup.py disabled on readthedocs: called with %s"
             % (sys.argv,))

import versioneer

versioneer.VCS = 'git'
versioneer.versionfile_source = 'llvmlite/_version.py'
versioneer.versionfile_build = 'llvmlite/_version.py'
versioneer.tag_prefix = 'v' # tags are like v1.2.0
versioneer.parentdir_prefix = 'llvmlite-' # dirname like 'myproject-1.2.0'


here_dir = os.path.dirname(os.path.abspath(__file__))

cmdclass = versioneer.get_cmdclass()
build = cmdclass.get('build', build)
build_ext = cmdclass.get('build_ext', build_ext)


def build_library_files(dry_run, pic=False):
    cmd = [sys.executable, os.path.join(here_dir, 'ffi', 'build.py')]
    if pic:
        os.environ['CXXFLAGS'] = os.environ.get('CXXFLAGS', '') + ' -fPIC'
github dib-lab / khmer / doc / conf.py View on Github external
copyright = u'''2010-2014 Michael R. Crusoe, Greg Edvenson, Jordan
Fish, Adina Howe, Luiz Irber, Eric McDonald, Joshua Nahum, Kaben Nanlohy,
Humberto Ortiz-Zuazaga, Jason Pell, Jared Simpson, Camille Scott, Ramakrishnan
Rajaram Srinivasan, Qingpeng Zhang, and C. Titus Brown'''

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#

# The full version, including alpha/beta/rc tags.

sys.path.insert(0, '../')
import versioneer
versioneer.VCS = 'git'
versioneer.versionfile_source = '../khmer/_version.py'
versioneer.versionfile_build = '../khmer/_version.py'
versioneer.tag_prefix = 'v'  # tags are like v1.2.0
versioneer.parentdir_prefix = '..'
release = versioneer.get_version()
del versioneer
sys.path.remove('../')

# The short X.Y version.

version = '.'.join(release.split('.')[:2])


# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
github axltxl / m2bk / setup.py View on Github external
# Check minimum Python version
PYVER_MAJOR = 3
PYVER_MINOR = 3
if not (sys.version_info[0] == PYVER_MAJOR and sys.version_info[1] >= PYVER_MINOR):
    print("Sorry, Python >= 3.3 is supported (for the moment")
    sys.exit(1)

from setuptools import setup, find_packages
import versioneer
import os
from m2bk.const import PKG_NAME, PKG_URL


# versioneer
versioneer.VCS = 'git'
versioneer.versionfile_source = "{p}/_version.py".format(p=PKG_NAME)
versioneer.versionfile_build = "{p}/_version.py".format(p=PKG_NAME)
versioneer.tag_prefix = ''
versioneer.parentdir_prefix = "{p}-".format(p=PKG_NAME)

# default config file location
if sys.prefix != '/usr':
    conf_dir = os.path.join(sys.prefix, 'etc')
else:
    conf_dir = '/etc'

pkg_ver = versioneer.get_version()

setup(
    name=PKG_NAME,
    version=pkg_ver,
    cmdclass=versioneer.get_cmdclass(),
github fhcrc / taxtastic / setup.py View on Github external
# try:
#     from pysqlite2 import dbapi2 as sqlite3
#     print 'using pysqlite2, sqlite3 version {}'.format(sqlite3.sqlite_version)
# except ImportError:
#     import sqlite3
#     print 'using sqlite3, sqlite3 version {}'.format(sqlite3.sqlite_version)

# min_sqlite3_version = '3.8.3'
# if LooseVersion(sqlite3.sqlite_version) < LooseVersion(min_sqlite3_version):
#     raise ImportError(('the sqlite3 library version for this python interpreter is '
#                        '{}, but a version >= {} is required; '
#                        'see https://github.com/fhcrc/taxtastic#installing').format(
#                            sqlite3.sqlite_version, min_sqlite3_version))

versioneer.versionfile_source = 'taxtastic/_version.py'
versioneer.versionfile_build = 'taxtastic/_version.py'
versioneer.tag_prefix = 'v'  # tags are like v1.2.0
versioneer.parentdir_prefix = 'taxtastic-'

here = path.abspath(path.dirname(__file__))

# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as fi:
    long_description = fi.read()


class run_audit(Command):
    """Audits source code using PyFlakes for following issues:
        - Names which are used but not defined or used before they are defined.
        - Names which are redefined without having been used.
    """
github borevitzlab / timestreamlib / setup.py View on Github external
from setuptools import setup
import versioneer

versioneer.VCS = 'git'
versioneer.versionfile_source = 'timestream/_version.py'
versioneer.versionfile_build = 'timestream/_version.py'
versioneer.tag_prefix = ''
versioneer.parentdir_prefix = 'timestreamlib-'

desc = """
timestream: Utilities and a python library for manipulating timelapses in the
            TimeStream format
"""

install_requires = [
        "ExifRead==1.4.2",
        "docopt==0.6.2",
        "voluptuous==0.8.4",
        "netCDF4==1.1.0",
        "scikit-image>=0.10.1"
        ]
github opendatacube / datacube-core / docs / conf.py View on Github external
import sys

# 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('..'))
sys.path.insert(0, os.path.abspath('.'))
print(sys.path)

import versioneer

current_dir = os.getcwd()
os.chdir(os.path.dirname(versioneer.__file__))

versioneer.VCS = 'git'
versioneer.versionfile_source = '../datacube/_version.py'
versioneer.versionfile_build = '../datacube/_version.py'
versioneer.tag_prefix = 'datacube-'  # tags are like datacube-1.2.0
versioneer.parentdir_prefix = '..'

__version = versioneer.get_version().replace('.dirty', '')

del versioneer
os.chdir(current_dir)

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

# -- RTD Debugging
import subprocess

subprocess.call('which java', shell=True)
subprocess.call('java -version', shell=True)
github twisted / imaginary / setup.py View on Github external
from epsilon.setuphelper import autosetup

import versioneer
versioneer.vcs = "git"
versioneer.versionfile_source = "imaginary/_version.py"
versioneer.versionfile_build = "imaginary/_version.py"
versioneer.tag_prefix= ""
versioneer.parentdir_prefix = "Imaginary-"

with open("README.rst") as fObj:
    readme = fObj.read()

distobj = autosetup(
    name="Imaginary",
    version=versioneer.get_version(),
    maintainer="Divmod, Inc.",
    maintainer_email="support@divmod.org",
    url="http://divmod.org/trac/wiki/DivmodImaginary",
    license="MIT",
    platforms=["any"],
    description=readme,
github sherpa / sherpa / setup.py View on Github external
print >> sys.stderr, (
        "WARNING\n"
        "Could not import setuptools.\n"
        "This might lead to an incomplete installation\n"
    )

import platform

from numpy.distutils.core import setup

from helpers.extensions import static_ext_modules

import versioneer

versioneer.VCS = 'git'
versioneer.versionfile_source = 'sherpa/_version.py'
versioneer.versionfile_build = 'sherpa/_version.py'
versioneer.tag_prefix = ''
versioneer.parentdir_prefix = 'sherpa-'

meta = dict(name='sherpa',
            version=versioneer.get_version(),
            author='Smithsonian Astrophysical Observatory / Chandra X-Ray Center',
            author_email='cxchelp@head.cfa.harvard.edu',
            url='http://cxc.harvard.edu/sherpa/',
            description='Modeling and fitting package for scientific data analysis',
            license='GNU GPL v3',
            long_description=open('README.md', 'rt').read(),
            platforms='Linux, Mac OS X',
            install_requires=['numpy', ],
            tests_require=['pytest', ],
            packages=['sherpa',
github scrapinghub / frontera / setup.py View on Github external
from setuptools import setup, find_packages

import versioneer
versioneer.VCS = 'git'
versioneer.versionfile_source = 'frontera/_version.py'
versioneer.versionfile_build = 'frontera/_version.py'
versioneer.tag_prefix = 'v'  # tags are like v1.2.0
versioneer.parentdir_prefix = 'frontera-'


setup(
    name='frontera',
    version=versioneer.get_version(),
    cmdclass=versioneer.get_cmdclass(),
    packages=find_packages(exclude=('tests', 'tests.*', 'examples', 'examples.*')),
    url='https://github.com/scrapinghub/frontera',
    description='A scalable frontier for web crawlers',
    author='Frontera developers',
    maintainer='Alexander Sibiryakov',
    maintainer_email='sibiryakov@scrapinghub.com',
    license='BSD',
github zenoss / ZenPacks.zenoss.PostgreSQL / src / pg8000 / setup.py View on Github external
#!/usr/bin/env python

import versioneer
versioneer.VCS = 'git'
versioneer.versionfile_source = 'pg8000/_version.py'
versioneer.versionfile_build = 'pg8000/_version.py'
versioneer.tag_prefix = ''
versioneer.parentdir_prefix = 'pg8000-'
from distutils.core import setup

long_description = """\

pg8000
------

pg8000 is a Pure-Python interface to the PostgreSQL database engine.  It is \
one of many PostgreSQL interfaces for the Python programming language. pg8000 \
is somewhat distinctive in that it is written entirely in Python and does not \
rely on any external libraries (such as a compiled python module, or \
PostgreSQL's libpq library). pg8000 supports the standard Python DB-API \
version 2.0.