From patchwork Mon Aug 12 23:01:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [6, of, 6] plan9: update setup.py and mkfile to support new cpython 2.7 build From: jas@corpus-callosum.com X-Patchwork-Id: 2174 Message-Id: <5d2d7f71b19aac6e78bd.1376348472@acme.buf.io> To: mercurial-devel@selenic.com Cc: jas@buf.io Date: Mon, 12 Aug 2013 18:01:12 -0500 # HG changeset patch # User Jeff Sickel # 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)