From cd1a8b933dc417a9d5702231cd30fe524b4dc455 Mon Sep 17 00:00:00 2001 From: Radoslav Gerganov Date: Wed, 22 Feb 2017 09:51:52 -0500 Subject: [PATCH] Start using pbr Use pbr for packaging. Also swith to py35 in tox.ini to match the configuration of the CI jobs. Change-Id: Ib5602177d940d07813600ad7c220786f1a656c76 --- requirements.txt | 1 + setup.cfg | 27 +++++++++++++++++++++++++++ setup.py | 48 ++++++++++++++++++++++++++---------------------- tox.ini | 2 +- 4 files changed, 55 insertions(+), 23 deletions(-) create mode 100644 setup.cfg diff --git a/requirements.txt b/requirements.txt index aada6b1..6ec9674 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ +pbr>=1.8 # Apache-2.0 oslo.config>=3.7.0 # Apache-2.0 oslo.log>=1.14.0 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..18f52ea --- /dev/null +++ b/setup.cfg @@ -0,0 +1,27 @@ +[metadata] +name = vmware-vspc +summary = Virtual Serial Port Concentrator for VMware instances. +description-file = + README.rst +author = OpenStack +author-email = openstack-dev@lists.openstack.org +home-page = http://www.openstack.org/ +classifier = + Environment :: OpenStack + Intended Audience :: Information Technology + 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.7 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.5 + +[files] +packages = + vspc + +[entry_points] +console_scripts = + vmware-vspc = vspc.server:main diff --git a/setup.py b/setup.py index 48592ef..056c16c 100644 --- a/setup.py +++ b/setup.py @@ -1,25 +1,29 @@ -from setuptools import setup +# 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. -with open('README.rst') as f: - readme = f.read() +# 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: + import multiprocessing # noqa +except ImportError: + pass -with open('LICENSE') as f: - license = f.read() - - -setup( - name='vmware-vspc', - version='0.0.1', - description='Virtual Serial Port Concentrator', - long_description=readme, - author='VMware Inc.', - author_email='rgerganov@vmware.com', - url='https://github.com/rgerganov/vmware-vspc', - license=license, - entry_points = { - 'console_scripts': ['vmware-vspc=vspc.server:main'], - }, - packages=['vspc'], - install_requires=['oslo.config', 'oslo.log'] -) +setuptools.setup( + setup_requires=['pbr'], + pbr=True) diff --git a/tox.ini b/tox.ini index a8a534a..607f5c3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py34,pep8 +envlist = py35,pep8 skipsdist = True [testenv]