[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r23838: {arm} More changes for deb builds: - Including flag so dh_pysuppor (in arm: resources/build/debian trunk)



Author: atagar
Date: 2010-11-20 05:33:59 +0000 (Sat, 20 Nov 2010)
New Revision: 23838

Modified:
   arm/resources/build/debian/rules
   arm/trunk/setup.py
Log:
More changes for deb builds:
- Including flag so dh_pysupport will recognize the private python module (thanks, weasel and Emilio Pozuelo Monfort!)
- Only performing man page compression when the --install flag is provided (preventing extra work and error messages)



Modified: arm/resources/build/debian/rules
===================================================================
--- arm/resources/build/debian/rules	2010-11-20 03:10:28 UTC (rev 23837)
+++ arm/resources/build/debian/rules	2010-11-20 05:33:59 UTC (rev 23838)
@@ -5,6 +5,7 @@
 
 	include /usr/share/cdbs/1/rules/debhelper.mk
 	include /usr/share/cdbs/1/class/python-distutils.mk
+  DEB_PYTHON_PRIVATE_MODULES_DIRS += /usr/share/arm
 
 build:
 	echo "nothing to build"

Modified: arm/trunk/setup.py
===================================================================
--- arm/trunk/setup.py	2010-11-20 03:10:28 UTC (rev 23837)
+++ arm/trunk/setup.py	2010-11-20 05:33:59 UTC (rev 23838)
@@ -24,30 +24,30 @@
 #   install-purelib=/usr/share
 # which would mean a bit more unnecessary clutter.
 
+manFilename = "arm.1"
 if "install" in sys.argv:
   sys.argv += ["--install-purelib", "/usr/share"]
-
-# Compresses the man page. This is a temporary file that we'll install. If
-# something goes wrong then we'll print the issue and use the uncompressed man
-# page instead.
-
-try:
-  manInputFile = open('arm.1', 'r')
-  manContents = manInputFile.read()
-  manInputFile.close()
   
-  # temporary destination for the man page guarenteed to be unoccupied (to
-  # avoid conflicting with files that are already there)
-  manOutputFile = gzip.open(tempfile.mktemp("/arm.1.gz"), 'wb')
-  manOutputFile.write(manContents)
-  manOutputFile.close()
+  # Compresses the man page. This is a temporary file that we'll install. If
+  # something goes wrong then we'll print the issue and use the uncompressed man
+  # page instead.
   
-  # places in tmp rather than a relative path to avoid having this copy appear
-  # in the deb and rpm builds
-  manFilename = manOutputFile.name
-except IOError, exc:
-  print "Unable to compress man page: %s" % exc
-  manFilename = "arm.1"
+  try:
+    manInputFile = open('arm.1', 'r')
+    manContents = manInputFile.read()
+    manInputFile.close()
+    
+    # temporary destination for the man page guarenteed to be unoccupied (to
+    # avoid conflicting with files that are already there)
+    manOutputFile = gzip.open(tempfile.mktemp("/arm.1.gz"), 'wb')
+    manOutputFile.write(manContents)
+    manOutputFile.close()
+    
+    # places in tmp rather than a relative path to avoid having this copy appear
+    # in the deb and rpm builds
+    manFilename = manOutputFile.name
+  except IOError, exc:
+    print "Unable to compress man page: %s" % exc
 
 setup(name='arm',
       version=VERSION,