From 8cec49a54809e67d55390e95b7ed7f86d0b3c9de Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 18 Dec 2015 11:28:11 -0500 Subject: [PATCH] Migrate to pbr for setuptools needs Since syntribos lives in OpenStack Infra, just using pbr for setup.py management will make life easier all the way around. Change-Id: I47c987ffec63f00d21de1881b4fa87facbd1db72 --- .gitignore | 4 ++ .mailmap | 6 +++ MANIFEST.in | 2 +- pip-requires => requirements.txt | 0 setup.cfg | 21 ++++++++++ setup.py | 69 ++++++++++++-------------------- tox.ini | 2 +- 7 files changed, 59 insertions(+), 45 deletions(-) create mode 100644 .mailmap rename pip-requires => requirements.txt (100%) create mode 100644 setup.cfg diff --git a/.gitignore b/.gitignore index ba746605..6724294c 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,7 @@ docs/_build/ # PyBuilder target/ + +# pbr makes these +ChangeLog +AUTHORS diff --git a/.mailmap b/.mailmap new file mode 100644 index 00000000..8fa9de4c --- /dev/null +++ b/.mailmap @@ -0,0 +1,6 @@ +# Format is: +# +# + +Nathan Buckner bucknerns + diff --git a/MANIFEST.in b/MANIFEST.in index 70a4fa78..301a5cd6 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include README.md LICENSE pip-requires HISTORY.rst +include README.md LICENSE requirements.txt HISTORY.rst diff --git a/pip-requires b/requirements.txt similarity index 100% rename from pip-requires rename to requirements.txt diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..53a6959e --- /dev/null +++ b/setup.cfg @@ -0,0 +1,21 @@ +[metadata] +name = syntribos +summary = API Security Scanner +description-file = + README.md +author = Rackspace Cloud QE +author-email = nathan.buckner@rackspace.com +home-page = http://www.openstack.org/ +classifier = + Development Status :: 1 - Planning + Intended Audience :: Developers + Natural Language :: English + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + Programming Language :: Python + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + +[entry_points] +console_scripts = + syntribos = syntribos.runner:entry_point diff --git a/setup.py b/setup.py index 1856956e..782bb21f 100644 --- a/setup.py +++ b/setup.py @@ -1,46 +1,29 @@ -""" -Copyright 2015 Rackspace +# 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. -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 +# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT +import setuptools - http://www.apache.org/licenses/LICENSE-2.0 +# 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 -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. -""" -from setuptools import setup, find_packages -import os - - -base_path = os.path.dirname(os.path.abspath(__file__)) -requires = open(os.path.join(base_path, 'pip-requires')).readlines() -setup( - name='syntribos', - version='0.0.1', - description=('API Security Scanner'), - long_description='{0}\n\n{1}'.format( - open(os.path.join(base_path, 'README.md')).read(), - open(os.path.join(base_path, 'HISTORY.rst')).read()), - author='Rackspace Cloud QE', - author_email='nathan.buckner@rackspace.com', - packages=find_packages(), - include_package_data=True, - install_requires=requires, - license=open(os.path.join(base_path, 'LICENSE')).read(), - zip_safe=False, - entry_points={'console_scripts': [ - 'syntribos = syntribos.runner:entry_point']}, - classifiers=( - 'Development Status :: 1 - Planning', - 'Intended Audience :: Developers', - 'Natural Language :: English', - 'License :: Other/Proprietary License', - 'Operating System :: POSIX :: Linux', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2.6', - 'Programming Language :: Python :: 2.7',)) +setuptools.setup( + setup_requires=['pbr>=1.8'], + pbr=True) diff --git a/tox.ini b/tox.ini index 6835326a..a2093a41 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,7 @@ skipsdist = True usedevelop = True install_command = pip install -U {opts} {packages} setenv=VIRTUAL_ENV={envdir} -deps=-r{toxinidir}/pip-requires +deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt [testenv:py27]