Commit 2229e63f authored by Robert Bradshaw's avatar Robert Bradshaw

merge

parents 0b8b1fb9 b86ec60c
include MANIFEST.in README.txt INSTALL.txt ToDo.txt USAGE.txt
include COPYING.txt LICENSE.txt Makefile
recursive-include .hg *
include .hgignore .hgtags
include .hgrev
include setup.py
include bin/*
include cython.py
......
PYTHON?=python
REPO = http://hg.cython.org/cython-devel
all: local
local:
${PYTHON} setup.py build_ext --inplace
.hg: REV := $(shell cat .hgrev)
.hg: TMPDIR := $(shell mktemp -d tmprepo.XXXXXX)
.hg:
hg clone --rev $(REV) $(REPO) $(TMPDIR)
hg -R $(TMPDIR) update
mv $(TMPDIR)/.hg .
mv $(TMPDIR)/.hgtags .
rm -rf $(TMPDIR)
repo: .hg
clean:
@echo Cleaning Source
@rm -fr build
......
......@@ -3,6 +3,17 @@ from distutils.sysconfig import get_python_lib
import os, os.path
import sys
if 'sdist' in sys.argv:
# Record the current revision in .hgrev
import subprocess # os.popen is cleaner but depricated
changset = subprocess.Popen("hg log --rev tip | grep changeset",
shell=True,
stdout=subprocess.PIPE).stdout.read()
rev = changset.split(':')[-1].strip()
hgrev = open('.hgrev', 'w')
hgrev.write(rev)
hgrev.close()
compiler_dir = os.path.join(get_python_lib(prefix=''), 'Cython/Compiler')
if sys.platform == "win32":
compiler_dir = compiler_dir[len(sys.prefix)+1:]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment