本文整理汇总了Python中versioneer.get_versions函数的典型用法代码示例。如果您正苦于以下问题:Python get_versions函数的具体用法?Python get_versions怎么用?Python get_versions使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_versions函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: run
def run(self):
versions = versioneer.get_versions(verbose=True)
self._versioneer_generated_versions = versions
# unless we update this, the command will keep using the old version
self.distribution.metadata.version = pep440_version(
versions["version"])
return _sdist.run(self)
开发者ID:kapouille,项目名称:gevent_async,代码行数:7,代码来源:setup.py
示例2: run
def run(self):
# versioneer:
versions = versioneer.get_versions(verbose=True)
self._versioneer_generated_versions = versions
# unless we update this, the command will keep using the old version
self.distribution.metadata.version = versions["version"]
_cmd_develop.run(self)
开发者ID:leapcode,项目名称:soledad,代码行数:7,代码来源:setup.py
示例3: get_normalized_version
def get_normalized_version():
pieces = versioneer.get_versions()["version"].split("-")
if len(pieces) == 1:
normalized_version = pieces[0]
else:
normalized_version = "%s.post%s" % (pieces[0], pieces[1])
if pieces[-1] == "dirty":
normalized_version += ".dev0"
return normalized_version
开发者ID:jellonek,项目名称:pycryptopp,代码行数:9,代码来源:setup.py
示例4: run
def run(self):
versions = versioneer.get_versions()
fn = os.path.join(EMBEDDED_CRYPTOPP_DIR, 'extraversion.h')
f = open(fn, "wb")
BODY = CPP_GIT_VERSION_BODY
f.write(BODY %
{ "pkgname": self.distribution.get_name(),
"version": versions["version"],
"normalized": get_normalized_version(),
"full": versions["full"] })
f.close()
print "git-version: wrote '%s' into '%s'" % (versions["version"], fn)
开发者ID:jellonek,项目名称:pycryptopp,代码行数:12,代码来源:setup.py
示例5: run
def run(self):
versions = versioneer.get_versions()
tempdir = tempfile.mkdtemp()
generated = os.path.join(tempdir, "rundemo")
with open(generated, "wb") as f:
for line in open("src/rundemo-template", "rb"):
if line.strip().decode("ascii") == "#versions":
f.write(('versions = %r\n' % (versions,)).encode("ascii"))
else:
f.write(line)
self.scripts = [generated]
rc = build_scripts.run(self)
os.unlink(generated)
os.rmdir(tempdir)
return rc
开发者ID:DanLipsitt,项目名称:python-versioneer,代码行数:15,代码来源:setup.py
示例6: run
def run(self):
#versioneer.cmd_build(self)
_build.run(self)
# versioneer
versions = versioneer.get_versions(verbose=True)
# now locate _version.py in the new build/ directory and replace it
# with an updated value
target_versionfile = os.path.join(
self.build_lib,
versioneer.versionfile_build)
print("UPDATING %s" % target_versionfile)
os.unlink(target_versionfile)
f = open(target_versionfile, "w")
f.write(versioneer.SHORT_VERSION_PY % versions)
f.close()
# branding
target_brandingfile = os.path.join(
self.build_lib,
branding.brandingfile_build)
do_branding(targetfile=target_brandingfile)
开发者ID:andrejb,项目名称:bitmask_client,代码行数:22,代码来源:setup.py
示例7: len
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Topic :: Security",
'Topic :: Security :: Cryptography',
"Topic :: Communications",
'Topic :: Communications :: Email',
'Topic :: Communications :: Email :: Post-Office :: IMAP',
'Topic :: Internet',
"Topic :: Utilities",
]
DOWNLOAD_BASE = ('https://github.com/leapcode/bitmask_client/'
'archive/%s.tar.gz')
_versions = versioneer.get_versions()
VERSION = _versions['version']
VERSION_FULL = _versions['full']
DOWNLOAD_URL = ""
# get the short version for the download url
_version_short = re.findall('\d+\.\d+\.\d+', VERSION)
if len(_version_short) > 0:
VERSION_SHORT = _version_short[0]
DOWNLOAD_URL = DOWNLOAD_BASE % VERSION_SHORT
cmdclass = versioneer.get_cmdclass()
from setuptools import Command
开发者ID:bwagnerr,项目名称:bitmask_client,代码行数:30,代码来源:setup.py
示例8:
import sys
import versioneer
sys.stdout.write(versioneer.get_versions()["version"])
开发者ID:MartyTemple,项目名称:canmatrix,代码行数:6,代码来源:get_version.py
示例9: Extension
extra_compile_args=ea,
define_macros=[('GPUARRAY_SHARED', None)]
),
Extension('pygpu.collectives',
sources=['pygpu/collectives.pyx'],
include_dirs=include_dirs,
libraries=['gpuarray'],
library_dirs=library_dirs,
extra_compile_args=ea,
define_macros=[('GPUARRAY_SHARED', None)]
)]
cmds = versioneer.get_cmdclass()
cmds["clean"] = cmd_clean
version_data = versioneer.get_versions()
if version_data['error'] is not None:
raise ValueError("Can't determine version for build: %s\n Please make sure that your git checkout includes tags." % (version_data['error'],))
setup(name='pygpu',
version=version_data['version'],
cmdclass=cmds,
description='numpy-like wrapper on libgpuarray for GPU computations',
packages=['pygpu', 'pygpu/tests'],
include_package_data=True,
package_data={'pygpu': ['gpuarray.h', 'gpuarray_api.h',
'blas_api.h', 'numpy_compat.h',
'collectives.h', 'collectives_api.h']},
ext_modules=cythonize(exts),
install_requires=['mako>=0.7', 'six'],
开发者ID:Theano,项目名称:libgpuarray,代码行数:31,代码来源:setup.py
示例10: extensions
# -- Path setup --------------------------------------------------------------
# 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.
#
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))
os.chdir('../..')
import versioneer
version = versioneer.get_versions()['version']
os.chdir('docs')
# -- Project information -----------------------------------------------------
project = 'conda build'
copyright = '2018, Anaconda, Inc.'
author = 'Anaconda, Inc.'
# The full version, including alpha/beta/rc tags
release = version
# -- General configuration ---------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
开发者ID:conda,项目名称:conda-build,代码行数:30,代码来源:conf.py
示例11: setup
versioneer.tag_prefix = '' # tags are like 1.2.0
versioneer.parentdir_prefix = 'ESSArch_PP-'
if __name__ == '__main__':
setup(
name='ESSArch_PP',
version=versioneer.get_version(),
description='ESSArch Preservation Platform',
long_description=open("README.md").read(),
long_description_content_type='text/markdown',
author='Henrik Ek',
author_email='[email protected]',
url='http://www.essolutions.se',
project_urls={
'Documentation': 'http://docs.essarch.org/',
'Source Code': 'https://github.com/ESSolutions/ESSArch_EPP/tree/%s' % versioneer.get_versions()['full'],
'Travis CI': 'https://travis-ci.org/ESSolutions/ESSArch_EPP',
},
classifiers=[
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Natural Language :: Swedish",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Framework :: Django",
"Topic :: System :: Archiving",
],
install_requires=[
"ESSArch-Core>=1.1.0.*,<=1.1.1.*",
],
开发者ID:ESSolutions,项目名称:ESSArch_EPP,代码行数:31,代码来源:setup.py
示例12: VersioneerConfig
class VersioneerConfig:
pass
cfg = VersioneerConfig()
cfg.VCS = "git"
cfg.style = "pep440"
cfg.tag_prefix = "v"
cfg.parentdir_prefix = None
cfg.versionfile_source = "archiver/"
cfg.verbose = True
cfg.root = os.path.join(*__file__.split(os.sep)[:-1])
import versioneer
print('file = %s' % __file__)
__version__ = versioneer.get_versions(cfg, __file__)['version']
def load_configuration(name, prefix, fields):
"""
Load configuration data form a cascading series of locations.
The precedence order is (highest priority last):
1. CONDA_ENV/etc/{name}.yml (if CONDA_ETC_ env is defined)
2. /etc/{name}.yml
3. ~/.config/{name}/connection.yml
4. reading {PREFIX}_{FIELD} environmental variables
Parameters
----------
name : str
开发者ID:ericdill,项目名称:archiver,代码行数:30,代码来源:archiver.py
示例13: open
import versioneer, os, re
versionFile = open(os.path.join("scadFiles", "progSCADversion.scad"), 'w+')
rawVersion=versioneer.get_version()
if re.match('^\d+(\.\d+)*$',rawVersion.split('+')[0]):
sanitizedVersion=rawVersion.split('+')[0]
else:
sanitizedVersion=0
listVersion=sanitizedVersion.split('.')
listVersion = [int(number) for number in listVersion]
gitVersion=versioneer.get_versions()['full-revisionid']
versionText = """\
progScadRawVersion="{rawVersion}"
progScadVersion="{version}"
progScadListVerion={listVersion}
prigScadGitVersion="{gitVersion}"
""".format(
rawVersion=rawVersion,
version=sanitizedVersion,
listVersion=listVersion,
gitVersion=gitVersion
)
versionFile.write(versionText)
开发者ID:traverseda,项目名称:progSCAD,代码行数:28,代码来源:updateVersion.py
示例14: RuntimeError
#!/usr/bin/env python
import sys
import versioneer
from setuptools import setup
if sys.version_info[:2] < (2, 7):
sys.exit("conda-build is only meant for Python >=2.7"
"Current Python version: %d.%d" % sys.version_info[:2])
# Don't proceed with 'unknown' in version
version_dict = versioneer.get_versions()
if version_dict['error']:
raise RuntimeError(version_dict["error"])
deps = ['conda', 'requests', 'filelock', 'pyyaml', 'jinja2', 'pkginfo',
'beautifulsoup4', 'chardet', 'pytz', 'tqdm', 'psutil', 'six', 'libarchive-c']
# We cannot build lief for Python 2.7 on Windows (unless we use mingw-w64 for it, which
# would be a non-trivial amount of work).
# .. lief is missing the egg-info directory so we cannot do this .. besides it is not on
# pypi.
# if sys.platform != 'win-32' or sys.version_info >= (3, 0):
# deps.extend(['lief'])
if sys.version_info < (3, 4):
deps.extend(['contextlib2', 'enum34', 'futures', 'scandir', 'glob2'])
setup(
name="conda-build",
开发者ID:conda,项目名称:conda-build,代码行数:31,代码来源:setup.py
示例15: read
#!/usr/bin/env python
import setuptools
from distutils.core import setup
import os
import versioneer
import archiver
__version__ = versioneer.get_versions(archiver.cfg, archiver.__file__)['version']
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='archiver',
version=__version__,
author='Brookhaven National Lab',
url='http://github.com/ericdill/archiver',
py_modules=['archiver'],
license='BSD',
)
开发者ID:ericdill,项目名称:archiver,代码行数:25,代码来源:setup.py
注:本文中的versioneer.get_versions函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论