Remove usage of pbr
Anvil has conflicts with pbr when it's used in setup.py and its usage in anvil doesn't really seem useful or applicable given the amount of pain it causes during packaging and later pip usage (dependencies downloaded and introspected will themselves fail due to the wrong version of pbr that anvil pulled in). So instead of using it, just switch back to using a simpler setup.py file with usage of nosetests for testing (since we don't need parallel tests for anvils tests) to avoid the problems that pbr has caused. Change-Id: I6d3c09a927434abf07fc025638a0860e44b029fa
This commit is contained in:
parent
a9333843e0
commit
6760f922e0
@ -1,8 +0,0 @@
|
||||
[DEFAULT]
|
||||
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
|
||||
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
|
||||
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-160} \
|
||||
${PYTHON:-python} -m subunit.run discover -t ./ ./anvil/tests $LISTOPT $IDOPTION
|
||||
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
@ -1,6 +1,9 @@
|
||||
include AUTHORS
|
||||
include ChangeLog
|
||||
include README.rst
|
||||
include HACKING.md
|
||||
include requirements.txt
|
||||
include test-requirements.txt
|
||||
include LICENSE
|
||||
|
||||
exclude .gitignore
|
||||
exclude .gitreview
|
||||
|
||||
global-exclude *.pyc
|
||||
|
@ -14,7 +14,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
ANVIL_VERSION = ['2013', '1', None]
|
||||
ANVIL_VERSION = ['2014', '1', None]
|
||||
YEAR, COUNT, REVISION = ANVIL_VERSION
|
||||
FINAL = False # May never be final ;)
|
||||
|
||||
|
5
pylintrc
5
pylintrc
@ -12,8 +12,7 @@ profile=no
|
||||
|
||||
# Add <file or directory> to the black list. It should be a base name, not a
|
||||
# path. You may set this option multiple times.
|
||||
|
||||
# ignore=
|
||||
ignore=anvil/tests/
|
||||
|
||||
# Pickle collected data for later comparisons.
|
||||
persistent=yes
|
||||
@ -270,4 +269,4 @@ max-attributes=12
|
||||
min-public-methods=0
|
||||
|
||||
# Maximum number of public methods for a class (see R0904).
|
||||
max-public-methods=80
|
||||
max-public-methods=100
|
||||
|
@ -1,7 +1,3 @@
|
||||
# Anvil should not depend on anything that will cause issues when running
|
||||
# egg_info on the downloaded dependencies, pbr seems to be the one case that
|
||||
# currently causes an issue (since it is not directly used for anvil runtime
|
||||
# it is placed in test-requirements for the time being).
|
||||
cheetah>=2.4.4
|
||||
iniparse
|
||||
iso8601>=0.1.8
|
||||
|
47
setup.cfg
47
setup.cfg
@ -1,47 +0,0 @@
|
||||
[metadata]
|
||||
name = anvil
|
||||
version = 2013.2
|
||||
summary = A tool to forge raw OpenStack into a productive tool
|
||||
description-file =
|
||||
README.rst
|
||||
author = OpenStack Foundation
|
||||
author-email = openstack-dev@lists.openstack.org
|
||||
home-page = http://anvil.readthedocs.org/
|
||||
classifier =
|
||||
Development Status :: 4 - Beta
|
||||
Environment :: Console
|
||||
Environment :: OpenStack
|
||||
Intended Audience :: Information Technology
|
||||
Intended Audience :: Developers
|
||||
Intended Audience :: System Administrators
|
||||
License :: OSI Approved :: Apache Software License
|
||||
Operating System :: POSIX :: Linux
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 2
|
||||
Programming Language :: Python :: 2.6
|
||||
Programming Language :: Python :: 2.7
|
||||
|
||||
[global]
|
||||
setup-hooks =
|
||||
pbr.hooks.setup_hook
|
||||
|
||||
[files]
|
||||
packages =
|
||||
anvil
|
||||
|
||||
scripts =
|
||||
tools/multipip
|
||||
tools/py2rpm
|
||||
tools/specprint
|
||||
tools/yyoom
|
||||
|
||||
[nosetests]
|
||||
verbosity=2
|
||||
|
||||
[build_sphinx]
|
||||
source-dir = docs/source
|
||||
build-dir = docs/build
|
||||
all_files = 1
|
||||
|
||||
[upload_sphinx]
|
||||
upload-dir = docs/build/html
|
70
setup.py
Normal file → Executable file
70
setup.py
Normal file → Executable file
@ -1,21 +1,65 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
|
||||
|
||||
# Copyright (C) 2014 Yahoo! Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import setuptools
|
||||
|
||||
from anvil import version
|
||||
|
||||
|
||||
def read_requires(filename):
|
||||
requires = []
|
||||
with open(filename, "rb") as fh:
|
||||
for line in fh:
|
||||
line = line.strip()
|
||||
if not line or line.startswith("#"):
|
||||
continue
|
||||
requires.append(line)
|
||||
return requires
|
||||
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['pbr'],
|
||||
pbr=True)
|
||||
name='anvil',
|
||||
description='A tool to forge raw OpenStack into a productive tool',
|
||||
author='OpenStack Foundation',
|
||||
author_email='anvil-dev@lists.launchpad.net',
|
||||
url='http://anvil.readthedocs.org/',
|
||||
long_description=open("README.rst", 'rb').read(),
|
||||
packages=setuptools.find_packages(),
|
||||
license='Apache Software License',
|
||||
version=version.version_string(),
|
||||
scripts=[
|
||||
"tools/yyoom",
|
||||
"tools/py2rpm",
|
||||
"tools/multipip",
|
||||
"tools/specprint",
|
||||
],
|
||||
install_requires=read_requires("requirements.txt"),
|
||||
tests_require=read_requires("test-requirements.txt"),
|
||||
classifiers=[
|
||||
'Development Status :: 4 - Beta',
|
||||
'Environment :: Console',
|
||||
'Environment :: OpenStack',
|
||||
'Intended Audience :: Information Technology',
|
||||
'Intended Audience :: Developers',
|
||||
'Intended Audience :: System Administrators',
|
||||
'License :: OSI Approved :: Apache Software License',
|
||||
'Operating System :: POSIX :: Linux',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
],
|
||||
)
|
||||
|
@ -1,16 +1,5 @@
|
||||
# Install bounded pep8/pyflakes first, then let flake8 install
|
||||
pep8==1.4.5
|
||||
pyflakes>=0.7.2,<0.7.4
|
||||
flake8==2.0
|
||||
pylint==0.25.2
|
||||
hacking>=0.8.0,<0.9
|
||||
mock>=1.0
|
||||
# This is only needed for running anvils setup.py which is not done
|
||||
# during running of anvil, but is done during testing or package
|
||||
# creation...
|
||||
#
|
||||
# Using it in the created virtualenv causes conflict with
|
||||
# other openstack packages (running there setup.py egg_info will break)
|
||||
# so placing it here means that we will avoid such conflicts in the first
|
||||
# place.
|
||||
pbr>=0.5.21,<1.0
|
||||
nose
|
||||
testtools>=0.9.34
|
||||
|
18
tox.ini
18
tox.ini
@ -1,7 +1,6 @@
|
||||
[tox]
|
||||
minversion = 1.6
|
||||
skipdist = True
|
||||
envlist = py26,py27,pep8
|
||||
envlist = py26,py27,pep8,pylint
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
@ -9,11 +8,7 @@ install_command = pip install {opts} {packages}
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
discover
|
||||
python-subunit>=0.0.18
|
||||
testtools>=0.9.34
|
||||
testrepository>=0.0.17
|
||||
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
||||
commands = nosetests {posargs}
|
||||
|
||||
[tox:jenkins]
|
||||
downloadcache = ~/cache/pip
|
||||
@ -28,11 +23,6 @@ deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = pylint --rcfile=pylintrc anvil
|
||||
|
||||
[testenv:cover]
|
||||
deps = {[testenv]deps}
|
||||
coverage>=3.6
|
||||
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
||||
@ -40,3 +30,7 @@ commands = {posargs}
|
||||
ignore = H102,H302,E501
|
||||
builtins = _
|
||||
exclude = .venv,.tox,dist,doc,*egg,.git,build
|
||||
|
||||
[nosetests]
|
||||
verbosity = 2
|
||||
detailed-errors = 1
|
||||
|
Loading…
Reference in New Issue
Block a user