svn commit: r355942 - head/Mk

Marcus von Appen mva at FreeBSD.org
Sat May 31 08:14:25 UTC 2014


Author: mva
Date: Sat May 31 08:14:24 2014
New Revision: 355942
URL: http://svnweb.freebsd.org/changeset/ports/355942
QAT: https://qat.redports.org/buildarchive/r355942/

Log:
  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.

Modified:
  head/Mk/bsd.python.mk

Modified: head/Mk/bsd.python.mk
==============================================================================
--- head/Mk/bsd.python.mk	Sat May 31 07:12:10 2014	(r355941)
+++ head/Mk/bsd.python.mk	Sat May 31 08:14:24 2014	(r355942)
@@ -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}


More information about the svn-ports-all mailing list