From 2f94008fa5894d9b1fc42b230244b452d1275b67 Mon Sep 17 00:00:00 2001
From: Andreas Jaeger <aj@suse.com>
Date: Mon, 10 Oct 2016 21:37:42 +0200
Subject: [PATCH] Update sphinx version

Sync with global requirements and allow newer versions of pbr and
sphinx.

Change-Id: I6d782ba0a3e69522ae236d22f4c5789858a53f1a
---
 requirements.txt |  7 +++++--
 setup.py         | 10 +++++++++-
 2 files changed, 14 insertions(+), 3 deletions(-)
 mode change 100755 => 100644 setup.py

diff --git a/requirements.txt b/requirements.txt
index 6e29eb6..8b1fc97 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,6 @@
-pbr>=0.6,<1.0
+# The order of packages is significant, because pip processes them in the order
+# of appearance. Changing the order has an impact on the overall integration
+# process, which may cause wedges in the gate later.
+pbr>=1.6 # Apache-2.0
 oslosphinx
-sphinx>=1.1.2,<1.2
+sphinx!=1.3b1,<1.4,>=1.2.1 # BSD
diff --git a/setup.py b/setup.py
old mode 100755
new mode 100644
index c0a24ea..4a4d537
--- a/setup.py
+++ b/setup.py
@@ -16,6 +16,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'],
+    setup_requires=['pbr>=1.8'],
     pbr=True)