[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r23826: {arm} Breaking the truce with distutils and reverting r23802. The (in arm/trunk: . src)
Author: atagar
Date: 2010-11-18 15:50:31 +0000 (Thu, 18 Nov 2010)
New Revision: 23826
Modified:
arm/trunk/arm
arm/trunk/install
arm/trunk/setup.py
arm/trunk/src/uninstall
Log:
Breaking the truce with distutils and reverting r23802. The egg must die.
Modified: arm/trunk/arm
===================================================================
--- arm/trunk/arm 2010-11-18 09:21:31 UTC (rev 23825)
+++ arm/trunk/arm 2010-11-18 15:50:31 UTC (rev 23826)
@@ -1,6 +1,6 @@
#!/bin/sh
if [ $0 = /usr/bin/arm ]; then
- arm_base=/usr/share/pyshared/arm/
+ arm_base=/usr/share/arm/
else
arm_base=$( dirname $0 )/src/
fi
Modified: arm/trunk/install
===================================================================
--- arm/trunk/install 2010-11-18 09:21:31 UTC (rev 23825)
+++ arm/trunk/install 2010-11-18 15:50:31 UTC (rev 23826)
@@ -2,11 +2,11 @@
python src/prereq.py
if [ $? = 0 ]; then
- python setup.py -q install --install-purelib /usr/share/pyshared
+ python setup.py -q install
# provide notice if we installed successfully
if [ $? = 0 ]; then
- echo "installed to /usr/share/pyshared/arm"
+ echo "installed to /usr/share/arm"
fi
# cleans up the automatically built temporary files
Modified: arm/trunk/setup.py
===================================================================
--- arm/trunk/setup.py 2010-11-18 09:21:31 UTC (rev 23825)
+++ arm/trunk/setup.py 2010-11-18 15:50:31 UTC (rev 23826)
@@ -5,6 +5,16 @@
from src.version import VERSION
from distutils.core import setup
+# 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:
+# [install]
+# install-purelib=/usr/share
+# which would mean a bit more unnecessary clutter.
+
+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.
@@ -41,7 +51,7 @@
data_files=[("/usr/bin", ["arm"]),
("/usr/share/man/man1", [manFilename]),
(docPath, ["armrc.sample"]),
- ("/usr/share/pyshared/arm", ["src/settings.cfg"])],
+ ("/usr/share/arm", ["src/settings.cfg"])],
)
# Cleans up the temporary compressed man page.
@@ -49,3 +59,12 @@
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.
+# TODO: not sure how to remove this from the deb build too...
+eggPath = '/usr/share/arm-%s.egg-info' % VERSION
+if os.path.isfile(eggPath):
+ if "-q" not in sys.argv: print "Removing %s" % eggPath
+ os.remove(eggPath)
+
Modified: arm/trunk/src/uninstall
===================================================================
--- arm/trunk/src/uninstall 2010-11-18 09:21:31 UTC (rev 23825)
+++ arm/trunk/src/uninstall 2010-11-18 15:50:31 UTC (rev 23826)
@@ -1,5 +1,5 @@
#!/bin/sh
-files="/usr/bin/arm /usr/share/man/man1/arm.1.gz /usr/share/pyshared/arm"
+files="/usr/bin/arm /usr/share/man/man1/arm.1.gz /usr/share/arm"
for i in $files
do