Browse Source

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 <digambarpat@gmail.com>
Co-Authored-By: Steven Dake <sdake@redhat.com>

Change-Id: Ica6236a7ceba3f4e6a400c328839c5d0d53c268e
changes/00/133800/3
Steven Dake 4 years ago
parent
commit
86cc4354ec
3 changed files with 90 additions and 25 deletions
  1. 18
    0
      magnum/__init__.py
  2. 45
    6
      setup.cfg
  3. 27
    19
      setup.py

+ 18
- 0
magnum/__init__.py View File

@@ -0,0 +1,18 @@
1
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
2
+# not use this file except in compliance with the License. You may obtain
3
+# a copy of the License at
4
+#
5
+#      http://www.apache.org/licenses/LICENSE-2.0
6
+#
7
+# Unless required by applicable law or agreed to in writing, software
8
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10
+# License for the specific language governing permissions and limitations
11
+# under the License.
12
+
13
+import threading
14
+
15
+
16
+# Make a project global TLS trace storage repository
17
+TLS = threading.local()
18
+

+ 45
- 6
setup.cfg View File

@@ -1,6 +1,45 @@
1
-[nosetests]
2
-match=^test
3
-where=api
4
-nocapture=1
5
-cover-package=api
6
-cover-erase=1
1
+[metadata]
2
+name = magnum
3
+version = 0.0.1
4
+summary = Application Lifecycle Management for OpenStack
5
+description-file =
6
+    README.md
7
+author = OpenStack
8
+author-email = openstack-dev@lists.openstack.org
9
+home-page = http://www.openstack.org/
10
+classifier =
11
+    Environment :: OpenStack
12
+    Intended Audience :: Information Technology
13
+    Intended Audience :: System Administrators
14
+    License :: OSI Approved :: Apache Software License
15
+    Operating System :: POSIX :: Linux
16
+    Programming Language :: Python
17
+    Programming Language :: Python :: 2
18
+    Programming Language :: Python :: 2.7
19
+    Programming Language :: Python :: 2.6
20
+    Programming Language :: Python :: 3
21
+    Programming Language :: Python :: 3.3
22
+
23
+[files]
24
+packages =
25
+    magnum
26
+
27
+[build_sphinx]
28
+source-dir = doc/source
29
+build-dir = doc/build
30
+all_files = 1
31
+
32
+[upload_sphinx]
33
+upload-dir = doc/build/html
34
+
35
+[compile_catalog]
36
+directory = magnum/locale
37
+domain = magnum
38
+
39
+[update_catalog]
40
+domain = magnum
41
+output_dir = magnum/locale
42
+input_file = magnum/locale/magnum.pot
43
+
44
+[wheel]
45
+universal = 1

+ 27
- 19
setup.py View File

@@ -1,22 +1,30 @@
1
-# -*- coding: utf-8 -*-
1
+#!/usr/bin/env python
2
+# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
3
+#
4
+# Licensed under the Apache License, Version 2.0 (the "License");
5
+# you may not use this file except in compliance with the License.
6
+# You may obtain a copy of the License at
7
+#
8
+#    http://www.apache.org/licenses/LICENSE-2.0
9
+#
10
+# Unless required by applicable law or agreed to in writing, software
11
+# distributed under the License is distributed on an "AS IS" BASIS,
12
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
+# implied.
14
+# See the License for the specific language governing permissions and
15
+# limitations under the License.
16
+
17
+# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
18
+import setuptools
19
+
20
+# In python < 2.7.4, a lazy loading of package `pbr` will break
21
+# setuptools if some other modules registered functions in `atexit`.
22
+# solution from: http://bugs.python.org/issue15881#msg170215
2 23
 try:
3
-    from setuptools import setup, find_packages
24
+    import multiprocessing  # noqa
4 25
 except ImportError:
5
-    from ez_setup import use_setuptools
6
-    use_setuptools()
7
-    from setuptools import setup, find_packages
26
+    pass
8 27
 
9
-setup(
10
-    name='api',
11
-    version='0.1',
12
-    description='',
13
-    author='',
14
-    author_email='',
15
-    install_requires=[
16
-        "pecan",
17
-    ],
18
-    test_suite='api',
19
-    zip_safe=False,
20
-    include_package_data=True,
21
-    packages=find_packages(exclude=['ez_setup'])
22
-)
28
+setuptools.setup(
29
+    setup_requires=['pbr'],
30
+    pbr=True)

Loading…
Cancel
Save