[PATCH 6 of 6] plan9: update setup.py and mkfile to support new cpython 2.7 build

Jeff Sickel jas at corpus-callosum.com
Mon Aug 12 18:01:12 CDT 2013


# HG changeset patch
# User Jeff Sickel <jas at corpus-callosum.com>
# Date 1376347707 18000
#      Mon Aug 12 17:48:27 2013 -0500
# Branch stable
# Node ID 5d2d7f71b19aac6e78bd6b9c9e945e7d4ca59e33
# Parent  5de1226ab7a2bda0cfc1a95c3d6c1120b1a9d519
plan9: update setup.py and mkfile to support new cpython 2.7 build

diff -r 5de1226ab7a2 -r 5d2d7f71b19a contrib/plan9/mkfile
--- a/contrib/plan9/mkfile	Mon Aug 12 17:47:53 2013 -0500
+++ b/contrib/plan9/mkfile	Mon Aug 12 17:48:27 2013 -0500
@@ -3,8 +3,6 @@
 
 PYTHON=python
 PYTHONBIN=/rc/bin
-SH=ape/psh
-
 PURE=--pure
 ROOT=../..
 
@@ -15,23 +13,28 @@
 build:VQ:
 	@{
 		cd $ROOT
-		$SH -c '$PYTHON setup.py $PURE build_py build_scripts'
+		$PYTHON setup.py $PURE build_py build_scripts
 	}
 
 clean:VQ:
 	@{
 		cd $ROOT
-		$SH -c '$PYTHON setup.py $PURE clean --all'
+		$PYTHON setup.py $PURE clean --all
+		rm -f */*.pyc
+		rm mercurial/__version__.py
 	}
 
 install:VQ:	build
 	@{
 		cd $ROOT
-		$SH -c '$PYTHON setup.py $PURE install \
+		$PYTHON setup.py $PURE install \
+			--prefix /sys \
 			--install-scripts $PYTHONBIN \
 			--skip-build \
-			--force'
+			--force
 	}
 	mkdir -p /lib/mercurial/hgrc.d
-	dircp hgrc.d /lib/mercurial/hgrc.d/
-	cp 9diff /rc/bin/
+	mkdir -p /rc/bin/mercurial
+	dircp hgrc.d /lib/mercurial/hgrc.d
+	cp -x 9diff /rc/bin/mercurial
+	cp -x 9mail /rc/bin/mercurial
diff -r 5de1226ab7a2 -r 5d2d7f71b19a setup.py
--- a/setup.py	Mon Aug 12 17:47:53 2013 -0500
+++ b/setup.py	Mon Aug 12 17:48:27 2013 -0500
@@ -129,7 +129,7 @@
     py2exeloaded = False
 
 def runcmd(cmd, env):
-    if sys.platform == 'plan9':
+    if sys.platform == 'plan9' and (sys.version_info[0] == 2 and sys.version_info[1] < 7):
         # subprocess kludge to work around issues in half-baked Python
         # ports, notably bichued/python:
         _, out, err = os.popen3(cmd)


More information about the Mercurial-devel mailing list