From d0998712bb18a99645ee37dfee09ea72521c8250 Mon Sep 17 00:00:00 2001
From: Zooko O'Whielacronx <zooko@zooko.com>
Date: Thu, 23 Jul 2009 08:04:07 -0700
Subject: [PATCH] setup: mark stdeb as setup_requires if "sdist_dsc" is in
 sys.argv

---
 setup.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/setup.py b/setup.py
index 6e24acd3..99c491d1 100644
--- a/setup.py
+++ b/setup.py
@@ -127,6 +127,10 @@ setup_requires.extend(['setuptools_trial >= 0.5'])
 # to setup_requires. http://pypi.python.org/pypi/setuptools_darcs
 setup_requires.append('setuptools_darcs >= 1.1.0')
 
+# stdeb is required to produce Debian files with the "sdist_dsc" command.
+if "sdist_dsc" in sys.argv:
+    setup_requires.append('stdeb >= 0.3')
+
 class ShowSupportLib(Command):
     user_options = []
     def initialize_options(self):
-- 
2.45.2