[or-cvs] r23798: {arm} Moving the man page compressed for installation to /tmp to a (arm/trunk)
Damian Johnson
atagar1 at gmail.com
Mon Nov 15 03:32:06 UTC 2010
Author: atagar
Date: 2010-11-15 03:32:06 +0000 (Mon, 15 Nov 2010)
New Revision: 23798
Modified:
arm/trunk/setup.py
Log:
Moving the man page compressed for installation to /tmp to avoid having it appear in the source deb.
Modified: arm/trunk/setup.py
===================================================================
--- arm/trunk/setup.py 2010-11-15 03:16:54 UTC (rev 23797)
+++ arm/trunk/setup.py 2010-11-15 03:32:06 UTC (rev 23798)
@@ -7,18 +7,17 @@
# 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. Build resources are cleaned up by the installion script later.
+# page instead.
try:
manInputFile = open('arm.1', 'r')
manContents = manInputFile.read()
manInputFile.close()
- if not os.path.exists('./build'): os.makedirs('./build')
- manOutputFile = gzip.open('build/arm.1.gz', 'wb')
+ manOutputFile = gzip.open('/tmp/arm.1.gz', 'wb')
manOutputFile.write(manContents)
manOutputFile.close()
- manFilename = "build/arm.1.gz"
+ manFilename = "/tmp/arm.1.gz"
except IOError, exc:
print "Unable to compress man page: %s" % exc
manFilename = "arm.1"
@@ -37,6 +36,11 @@
("/usr/lib/arm", ["src/settings.cfg"])],
)
+# Cleans up the temporary compressed man page.
+if manFilename == '/tmp/arm.1.gz' and os.path.isfile(manFilename):
+ if "-q" not in sys.argv: print "Removing %s" % manFilename
+ os.remove(manFilename)
+
# Removes the egg_info file. Apparently it is not optional during setup
# (hardcoded in distutils/command/install.py), nor are there any arguments to
# bypass its creation.
More information about the tor-commits
mailing list