diff options
author | mva <mva@FreeBSD.org> | 2014-05-31 16:14:24 +0800 |
---|---|---|
committer | mva <mva@FreeBSD.org> | 2014-05-31 16:14:24 +0800 |
commit | 1e67f3dacf37a944b1fed726dc58e9e61bcd80d3 (patch) | |
tree | eafab7435ee7d1eae562c01d8d468143866294d4 /Mk | |
parent | aa724347f86ef827a33334ae3561fb12689728ff (diff) | |
download | freebsd-ports-graphics-1e67f3dacf37a944b1fed726dc58e9e61bcd80d3.tar.gz freebsd-ports-graphics-1e67f3dacf37a944b1fed726dc58e9e61bcd80d3.tar.zst freebsd-ports-graphics-1e67f3dacf37a944b1fed726dc58e9e61bcd80d3.zip |
Handle non-ASCII encoded setup.py files properly, if the locale of the
execution environment does not match the encoding of the setup.py file. Simply
read everything in as binary data without trying to convert it to the matching
locale.
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.python.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Mk/bsd.python.mk b/Mk/bsd.python.mk index 57825802626..2578b298529 100644 --- a/Mk/bsd.python.mk +++ b/Mk/bsd.python.mk @@ -494,7 +494,7 @@ post-install: stage-python-compileall # distutils support PYSETUP?= setup.py -PYDISTUTILS_SETUP?= -c "import setuptools; __file__='${PYSETUP}'; exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))" +PYDISTUTILS_SETUP?= -c "import setuptools; __file__='${PYSETUP}'; exec(compile(open(__file__, 'rb').read().replace(b'\\r\\n', b'\\n'), __file__, 'exec'))" PYDISTUTILS_CONFIGUREARGS?= PYDISTUTILS_BUILDARGS?= PYDISTUTILS_INSTALLARGS?= -c -O1 --prefix=${PREFIX} |