Work around atexit bug in python < 2.7.4

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

This problem originally appeared in stevedore before the library
was adopted by Oslo
(74a719b117)

Change-Id: Icd412ca8435dca4b0f3b4075eca39b903dde6d27
This commit is contained in:
Doug Hellmann 2014-03-31 13:48:43 -07:00
parent 638a267d6e
commit c6d30536dc

View File

@ -17,6 +17,14 @@
# 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 # flake8: noqa
except ImportError:
pass
setuptools.setup(
setup_requires=['pbr'],
pbr=True)