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

[tor-commits] [arm/master] Hotfix to help gentoo ebuilds (https://bugs.gentoo.org/349792)



commit 5fe915d46d01906215676e64765abb2d9b4064f5
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sun Jan 16 02:18:44 2011 +0000

    Hotfix to help gentoo ebuilds (https://bugs.gentoo.org/349792)
    
    
    
    svn:r24092
---
 setup.py       |   20 ++++++++++++++++++--
 src/version.py |    4 ++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/setup.py b/setup.py
index edae307..03caaa3 100644
--- a/setup.py
+++ b/setup.py
@@ -17,6 +17,23 @@ for arg in sys.argv:
 
 docPath = "/usr/share/doc/%s" % ("tor-arm" if isDebInstall else "arm")
 
+# Allow the docPath to be overridden via a '--docPath' argument. This is to
+# support custom documentation locations on Gentoo, as discussed in:
+# https://bugs.gentoo.org/349792
+
+try:
+  docPathFlagIndex = sys.argv.index("--docPath")
+  if docPathFlagIndex < len(sys.argv) - 1:
+    docPath = sys.argv[docPathFlagIndex + 1]
+    
+    # remove the custom --docPath argument (otherwise the setup call will
+    # complain about them)
+    del sys.argv[docPathFlagIndex:docPathFlagIndex + 3]
+  else:
+    print "No path provided for --docPath"
+    sys.exit(1)
+except ValueError: pass # --docPath flag not found
+
 # Provides the configuration option to install to "/usr/share" rather than as a
 # python module. Alternatives are to either provide this as an input argument
 # (not an option for deb/rpm builds) or add a setup.cfg with:
@@ -77,8 +94,7 @@ if manFilename != 'arm.1' and os.path.isfile(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.
-# TODO: not sure how to remove this from the deb build too...
+# bypass its creation. The deb build removes this as part of its rules script.
 eggPath = '/usr/share/arm-%s.egg-info' % VERSION
 
 if not isDebInstall and os.path.isfile(eggPath):
diff --git a/src/version.py b/src/version.py
index cf86296..a851658 100644
--- a/src/version.py
+++ b/src/version.py
@@ -2,6 +2,6 @@
 Provides arm's version and release date.
 """
 
-VERSION = '1.4.1.2'
-LAST_MODIFIED = "January 12, 2011"
+VERSION = '1.4.1.3'
+LAST_MODIFIED = "January 15, 2011"
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits