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

[or-cvs] r23800: {arm} Workaround for needing a setup.cfg when buiding. To make dis (in arm/trunk: . debian)



Author: atagar
Date: 2010-11-15 04:25:37 +0000 (Mon, 15 Nov 2010)
New Revision: 23800

Removed:
   arm/trunk/debian/setup.cfg
Modified:
   arm/trunk/debian/MANIFEST
   arm/trunk/debian/make-deb
   arm/trunk/debian/make-rpm
   arm/trunk/install
   arm/trunk/setup.py
Log:
Workaround for needing a setup.cfg when buiding.
To make distutil install to /usr/lib it either needs an input flag or setup.cfg saying so. Unfortunately distutil is too dumb to accept this as a setup function argument so this is a hack to append it to the input argument list.



Modified: arm/trunk/debian/MANIFEST
===================================================================
--- arm/trunk/debian/MANIFEST	2010-11-15 04:08:01 UTC (rev 23799)
+++ arm/trunk/debian/MANIFEST	2010-11-15 04:25:37 UTC (rev 23800)
@@ -1,5 +1,4 @@
 README
-setup.cfg
 setup.py
 arm
 arm.1

Modified: arm/trunk/debian/make-deb
===================================================================
--- arm/trunk/debian/make-deb	2010-11-15 04:08:01 UTC (rev 23799)
+++ arm/trunk/debian/make-deb	2010-11-15 04:25:37 UTC (rev 23800)
@@ -1,9 +1,8 @@
 #!/bin/sh
-cp debian/setup.cfg ./
 debuild -I.svn -i.svn -I.pyc -i.pyc
 
 # cleans up after deb build
-files="build debian/tor-arm debian/python-module-stampdir debian/tor-arm.debhelper.log debian/files debian/tor-arm.substvars setup.cfg"
+files="build debian/tor-arm debian/python-module-stampdir debian/tor-arm.debhelper.log debian/files debian/tor-arm.substvars"
 
 for i in $files 
 do

Modified: arm/trunk/debian/make-rpm
===================================================================
--- arm/trunk/debian/make-rpm	2010-11-15 04:08:01 UTC (rev 23799)
+++ arm/trunk/debian/make-rpm	2010-11-15 04:25:37 UTC (rev 23800)
@@ -1,10 +1,9 @@
 #!/bin/sh
-cp debian/setup.cfg ./
 cp debian/MANIFEST ./
 python setup.py bdist_rpm
 
 # cleans up after rpm build
-files="build setup.cfg MANIFEST"
+files="build MANIFEST"
 
 for i in $files 
 do

Deleted: arm/trunk/debian/setup.cfg
===================================================================
--- arm/trunk/debian/setup.cfg	2010-11-15 04:08:01 UTC (rev 23799)
+++ arm/trunk/debian/setup.cfg	2010-11-15 04:25:37 UTC (rev 23800)
@@ -1,3 +0,0 @@
-[install]
-install-purelib=/usr/lib
-

Modified: arm/trunk/install
===================================================================
--- arm/trunk/install	2010-11-15 04:08:01 UTC (rev 23799)
+++ arm/trunk/install	2010-11-15 04:25:37 UTC (rev 23800)
@@ -2,7 +2,7 @@
 python src/prereq.py
 
 if [ $? = 0 ]; then
-  python setup.py -q install --install-purelib /usr/lib
+  python setup.py -q install
   
   # provide notice if we installed successfully
   if [ $? = 0 ]; then

Modified: arm/trunk/setup.py
===================================================================
--- arm/trunk/setup.py	2010-11-15 04:08:01 UTC (rev 23799)
+++ arm/trunk/setup.py	2010-11-15 04:25:37 UTC (rev 23800)
@@ -5,9 +5,20 @@
 from src.version import VERSION
 from distutils.core import setup
 
+# Provides the configuration option to install to "/usr/lib" 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:
+#   [install]
+#   install-purelib=/usr/lib
+# which would mean a bit more unnecessary clutter.
+
+if "install" in sys.argv:
+  sys.argv += ["--install-purelib", "/usr/lib"]
+
 # 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()