Description: don't copy unicodedata_db.h if running 'clean' command
Author: Sandro Tosi <morph@debian.org>
Index: regex-0.1.20120323/setup.py
===================================================================
--- regex-0.1.20120323.orig/setup.py	2012-04-01 18:27:49.947372325 +0200
+++ regex-0.1.20120323/setup.py	2012-04-01 18:28:22.508447240 +0200
@@ -12,13 +12,14 @@
 PKG_BASE = 'Python%i' % MAJOR
 SRC_DIR = os.path.join(BASE_DIR, PKG_BASE)
 
-if (MAJOR, MINOR) in ((2,5), (2,6), (2,7), (3,1), (3,2)):
-    unicodedata_db_h = os.path.join(SRC_DIR, 'Python%i%i' % (MAJOR, MINOR),
-                                    'unicodedata_db.h')
-    shutil.copy(unicodedata_db_h, SRC_DIR)
-else:
-    sys.exit("No unicodedata_db.h could be prepared for Python %s"
-             % sys.version)
+if sys.argv[1] != 'clean':
+    if (MAJOR, MINOR) in ((2,5), (2,6), (2,7), (3,1), (3,2)):
+        unicodedata_db_h = os.path.join(SRC_DIR, 'Python%i%i' % (MAJOR, MINOR),
+                                        'unicodedata_db.h')
+        shutil.copy(unicodedata_db_h, SRC_DIR)
+    else:
+        sys.exit("No unicodedata_db.h could be prepared for Python %s"
+                 % sys.version)
 
 setup(
     name='regex',
