From 86cc4354ec770e2e2d1968c8f176f61826004ff3 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Mon, 27 Oct 2014 17:12:29 -0700 Subject: [PATCH] Fix the setup so the installation is sanitary Prior the installation was not sanitary. Fix the installation so that magnum installs properly. Co-Authored-By: Digambar Patil Co-Authored-By: Steven Dake Change-Id: Ica6236a7ceba3f4e6a400c328839c5d0d53c268e --- magnum/__init__.py | 18 ++++++++++++++++ setup.cfg | 51 ++++++++++++++++++++++++++++++++++++++++------ setup.py | 50 ++++++++++++++++++++++++++------------------- 3 files changed, 92 insertions(+), 27 deletions(-) create mode 100644 magnum/__init__.py diff --git a/magnum/__init__.py b/magnum/__init__.py new file mode 100644 index 0000000000..9e0f3f0f54 --- /dev/null +++ b/magnum/__init__.py @@ -0,0 +1,18 @@ +# 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. + +import threading + + +# Make a project global TLS trace storage repository +TLS = threading.local() + diff --git a/setup.cfg b/setup.cfg index ccfb5b2c5b..c387a63a47 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,45 @@ -[nosetests] -match=^test -where=api -nocapture=1 -cover-package=api -cover-erase=1 +[metadata] +name = magnum +version = 0.0.1 +summary = Application Lifecycle Management for OpenStack +description-file = + README.md +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 :: 2.6 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.3 + +[files] +packages = + magnum + +[build_sphinx] +source-dir = doc/source +build-dir = doc/build +all_files = 1 + +[upload_sphinx] +upload-dir = doc/build/html + +[compile_catalog] +directory = magnum/locale +domain = magnum + +[update_catalog] +domain = magnum +output_dir = magnum/locale +input_file = magnum/locale/magnum.pot + +[wheel] +universal = 1 diff --git a/setup.py b/setup.py index 75f9e5cdc8..736375744d 100644 --- a/setup.py +++ b/setup.py @@ -1,22 +1,30 @@ -# -*- coding: utf-8 -*- -try: - from setuptools import setup, find_packages -except ImportError: - from ez_setup import use_setuptools - use_setuptools() - from setuptools import setup, find_packages +#!/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. -setup( - name='api', - version='0.1', - description='', - author='', - author_email='', - install_requires=[ - "pecan", - ], - test_suite='api', - zip_safe=False, - include_package_data=True, - packages=find_packages(exclude=['ez_setup']) -) +# 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 + +setuptools.setup( + setup_requires=['pbr'], + pbr=True)