Don't use pbr for pbr.

It turns out, that when you setup_requires pbr from another package, it gets
installed via easy_install instead of via pip. easy_install, craptastic
pile of vomit and excrement that it is, can't manage to process the entry
points in the package it's installing while installing it, so you always
wind up with pbr version=="". Sigh.

Change-Id: Ib2b8e77662286fd4f86e9ccc55680cccc8ce349b
This commit is contained in:
Monty Taylor 2012-07-18 06:50:50 -07:00
parent 0daa8368f5
commit 5e4b10cf1e
1 changed files with 14 additions and 4 deletions

View File

@ -16,6 +16,10 @@
import pkg_resources
import setuptools
import pbr
from pbr import cmdclass
from pbr import requires
def _fake_require(*args, **kwargs):
"""We need to block this from recursing - we're instaling an
@ -26,16 +30,22 @@ pkg_resources.EntryPoint.require = _fake_require
setuptools.setup(
name="pbr",
version="#:",
version=pbr.version_info.canonical_version_string(always=True),
author='Hewlett-Packard Development Company, L.P.',
author_email='openstack@lists.launchpad.net',
description="Python Build Reasonableness",
license="Apache License, Version 2.0",
url="https://github.com/openstack-dev/pbr",
install_requires=['#:tools/pip-requires'],
tests_require=['#:tools/test-requires'],
dependency_links=['#:tools/pip-requires', '#:tools/test-requires'],
install_requires=requires.parse_requirements('tools/pip-requires'),
tests_require=requires.parse_requirements('tools/test-requires'),
dependency_links=requires.parse_dependency_links('tools/pip-requires',
'tools/test-requires'),
setup_requires=['setuptools-git>0.4'],
cmdclass=cmdclass.get_cmdclass('pbr/versioninfo'),
long_description=open('README.rst').read(),
include_package_data=True,
test_suite='nose.collector',
packages=setuptools.find_packages(exclude=['tests', 'tests.*']),
classifiers=[
"Environment :: Console",
"Intended Audience :: Developers",