Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r696:f4f64f8ced68 Date: 2012-07-27 03:30 +0200 http://bitbucket.org/cffi/cffi/changeset/f4f64f8ced68/
Log: Bah, no os.path.samefile() on Windows diff --git a/cffi/ffiplatform.py b/cffi/ffiplatform.py --- a/cffi/ffiplatform.py +++ b/cffi/ffiplatform.py @@ -23,7 +23,7 @@ # we're going to chdir(), then replace it with a pathless copy. for i, src in enumerate(ext.sources): src = os.path.abspath(src) - if os.path.samefile(os.path.dirname(src), tmpdir): + if samefile(os.path.dirname(src), tmpdir): src = os.path.basename(src) ext.sources[i] = src @@ -60,3 +60,9 @@ cmd_obj = dist.get_command_obj('build_ext') [soname] = cmd_obj.get_outputs() return soname + +try: + from os.path import samefile +except ImportError: + def samefile(f1, f2): + return os.path.abspath(f1) == os.path.abspath(f2) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit