Browse Source

Switch to pbr

Also creates a required "venv" environment, drops version handling
from __init__.py and updates requirements.

Closes-Bug: #1466477
Change-Id: I57ce71ee52cc48e0239cdecb69fd2272fc99ea41
changes/45/193145/1
Dmitry Tantsur 7 years ago
parent
commit
9dcc2bb082
  1. 2
      .gitignore
  2. 15
      ironic_inspector/__init__.py
  3. 7
      requirements.txt
  4. 45
      setup.cfg
  5. 90
      setup.py
  6. 3
      tox.ini

2
.gitignore vendored

@ -6,3 +6,5 @@ dist/
*.egg-info/
.coverage
*~
AUTHORS
ChangeLog

15
ironic_inspector/__init__.py

@ -1,15 +0,0 @@
# 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
#
# 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.
__version_info__ = (2, 0, 0)
__version__ = '%d.%d.%d' % __version_info__

7
requirements.txt

@ -7,12 +7,13 @@ eventlet>=0.17.3
Flask>=0.10,<1.0
keystonemiddleware>=1.5.0
netifaces>=0.10.4
pbr>=0.11,<2.0
python-ironicclient>=0.2.1
python-keystoneclient>=1.3.0
python-keystoneclient>=1.6.0
python-openstackclient>=1.0.3
requests>=2.5.2
oslo.config>=1.11.0 # Apache-2.0
oslo.i18n>=1.5.0 # Apache-2.0
oslo.utils>=1.4.0 # Apache-2.0
oslo.utils>=1.6.0 # Apache-2.0
six>=1.9.0
stevedore>=1.3.0 # Apache-2.0
stevedore>=1.5.0 # Apache-2.0

45
setup.cfg

@ -1,3 +1,48 @@
[metadata]
name = ironic-inspector
summary = Hardware introspection for Ironic
version = 2.0.0
description-file = README.rst
home-page = https://launchpad.net/ironic-inspector
license = Apache-2
classifier =
Environment :: Console
Environment :: OpenStack
Intended Audience :: System Administrators
Intended Audience :: Information Technology
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 2
[files]
packages =
ironic_inspector
ironic_inspector_ramdisk
scripts =
bin/ironic-inspector-ramdisk
[entry_points]
console_scripts =
ironic-inspector = ironic_inspector.main:main
ironic_inspector.hooks.processing =
scheduler = ironic_inspector.plugins.standard:SchedulerHook
validate_interfaces = ironic_inspector.plugins.standard:ValidateInterfacesHook
ramdisk_error = ironic_inspector.plugins.standard:RamdiskErrorHook
example = ironic_inspector.plugins.example:ExampleProcessingHook
extra_hardware = ironic_inspector.plugins.extra_hardware:ExtraHardwareHook
root_device_hint = ironic_inspector.plugins.root_device_hint:RootDeviceHintHook
ironic_inspector.hooks.node_not_found =
example = ironic_inspector.plugins.example:example_not_found_hook
openstack.cli.extension =
baremetal-introspection = ironic_inspector.shell
openstack.baremetal_introspection.v1 =
baremetal_introspection_start = ironic_inspector.shell:StartCommand
baremetal_introspection_status = ironic_inspector.shell:StatusCommand
oslo.config.opts =
ironic_inspector = ironic_inspector.conf:list_opts
ironic_inspector.common.swift = ironic_inspector.common.swift:list_opts
[compile_catalog]
directory = locale
domain = ironic-inspector

90
setup.py

@ -1,68 +1,30 @@
import re
from setuptools import setup
#!/usr/bin/env python
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# 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
#
# 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.
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools
# In python < 2.7.4, a lazy loading of package `pbr` will break
# setuptools if some other modules registered functions in `atexit`.
# solution from: http://bugs.python.org/issue15881#msg170215
try:
# Distributions have to delete *requirements.txt
with open('requirements.txt', 'r') as fp:
install_requires = [re.split(r'[<>=~]', line)[0]
for line in fp if line.strip()]
except EnvironmentError:
print("No requirements.txt, not handling dependencies")
install_requires = []
with open('ironic_inspector/__init__.py', 'rb') as fp:
exec(fp.read())
import multiprocessing # noqa
except ImportError:
pass
setup(
name = "ironic-inspector",
version = __version__,
description = open('README.rst', 'r').readline().strip(),
author = "Dmitry Tantsur",
author_email = "dtantsur@redhat.com",
url = "https://pypi.python.org/pypi/ironic-inspector",
packages = ['ironic_inspector', 'ironic_inspector.plugins',
'ironic_inspector.test', 'ironic_inspector.common',
'ironic_inspector_ramdisk', 'ironic_inspector_ramdisk.test'],
install_requires = install_requires,
# because entry points don't work with multiple packages
scripts = ['bin/ironic-inspector-ramdisk'],
entry_points = {
'console_scripts': [
"ironic-inspector = ironic_inspector.main:main",
],
'ironic_inspector.hooks.processing': [
"scheduler = ironic_inspector.plugins.standard:SchedulerHook",
"validate_interfaces = ironic_inspector.plugins.standard:ValidateInterfacesHook",
"ramdisk_error = ironic_inspector.plugins.standard:RamdiskErrorHook",
"example = ironic_inspector.plugins.example:ExampleProcessingHook",
"extra_hardware = ironic_inspector.plugins.extra_hardware:ExtraHardwareHook",
"root_device_hint = ironic_inspector.plugins.root_device_hint:RootDeviceHintHook",
],
'ironic_inspector.hooks.node_not_found': [
"example = ironic_inspector.plugins.example:example_not_found_hook",
],
'openstack.cli.extension': [
'baremetal-introspection = ironic_inspector.shell',
],
'openstack.baremetal_introspection.v1': [
"baremetal_introspection_start = ironic_inspector.shell:StartCommand",
"baremetal_introspection_status = ironic_inspector.shell:StatusCommand",
],
'oslo.config.opts': [
"ironic_inspector = ironic_inspector.conf:list_opts",
"ironic_inspector.common.swift = ironic_inspector.common.swift:list_opts"
],
},
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: OpenStack',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Apache Software License',
'Operating System :: POSIX',
],
license = 'APL 2.0',
)
setuptools.setup(
setup_requires=['pbr'],
pbr=True)

3
tox.ini

@ -14,6 +14,9 @@ commands =
setenv = PYTHONDONTWRITEBYTECODE=1
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:venv]
commands = {posargs}
[testenv:pep8]
basepython = python2.7
deps =

Loading…
Cancel
Save