bugfix of pbr after updating 53/32453/1
authorMatthewLi <matthew.lijun@huawei.com>
Thu, 30 Mar 2017 10:52:41 +0000 (06:52 -0400)
committerMatthewLi <matthew.lijun@huawei.com>
Thu, 30 Mar 2017 10:53:48 +0000 (06:53 -0400)
JIRA: DOVETAIL-388

Change-Id: I3611624c955fa735aabfd00b456bd7f8455080e5
Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
setup.py

index a84dd40..03ea298 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -9,6 +9,14 @@
 
 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==2.0.0'],
     pbr=True)