dev-python/peewee: Fix two errors.
authorPatrice Clement <monsieurp@gentoo.org>
Thu, 18 Feb 2016 09:15:55 +0000 (09:15 +0000)
committerPatrice Clement <monsieurp@gentoo.org>
Thu, 18 Feb 2016 09:16:24 +0000 (09:16 +0000)
* sed to remove the string "test_suite='tests'" from setup.py.
* Add -fno-strict-aliasing compile flag when compiling with python2.7.

Package-Manager: portage-2.2.26

dev-python/peewee/peewee-2.8.0.ebuild

index 3d9a37b6d6865711009197404a3a81e83607bc72..aacf223e06a03ea9f4717df23399cadce74e9087 100644 (file)
@@ -22,6 +22,16 @@ DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
 # Req'd to ensure a unique tmp.db for each python impl running the testsuite.
 DISTUTILS_IN_SOURCE_BUILD=1
 
+python_prepare_all() {
+       sed -i -e "s#test_suite='tests',##g;" ./setup.py || die
+       distutils-r1_python_prepare_all
+}
+
+python_compile() {
+       python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
+       distutils-r1_python_compile
+}
+
 python_compile_all() {
        use doc && emake -C docs html
 }