mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-24 20:48:31 -07:00
dev-python/matplotlib: Run tests against bundled freetype
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
DIST freetype-2.6.1.tar.gz 2302080 BLAKE2B 6a5fb98e5fa6cf4b7d7533ad44e364227d8c2f7dded4c552d6e22e204c32b7858f20d41d1e809ecdad6e5353d6cec81bea0e0b06a4533363a41ecab83ce3f7ca SHA512 ff2daed64d712737085924c50e75862fafbcbb24eef6d72dac9eaae63bb656d7245397fd828f5d3e47ac847f7ff83d73dedfdd61fde1f7d6e0f0cdeb49bcf83b
|
||||
DIST matplotlib-2.2.2.tar.gz 37317332 BLAKE2B 4120265263c5b1e4ab57f7c0eb7a477b4071a5f219d1d6328d6ed51d44460217c7c4da82a4b7d13c6ba9f80308406a217f2dbcfa310f3137cbe8bc56a9ef0eef SHA512 1d21ef821190f22354098f8f0db6449f237acbf3c1419ab3815ecd4e9c6922fd3f00c4a8f60858e319b55b6fb2e8fe2922c0bf8e72b204e7edff0b409cf76320
|
||||
DIST matplotlib-2.2.4.tar.gz 36974286 BLAKE2B 9c4c69163a23ff02107ee155f72e142dcf31ba965f6a20f468b96f3f4b70b95ff6caade6b14bcbacd5b231848d2000ce6af9f113feefb41d6e186725349490d3 SHA512 968f5731b8a9a2c5575403c60d5b0a98a452b33094e520be44f4d901f892d082babc8fc1d73c519e1ff2baf756f3cb7652f4b796e166d66dfda31f7e50c58139
|
||||
DIST matplotlib-3.1.2.tar.gz 40909582 BLAKE2B 670907670335ca13ec01f3acf036fd502ce34abd12666b2e0d10867c6115a0fe80039326cee89099471aa6b3bbd25f1ca4aa837072dea624ee41984da9f647be SHA512 2eff3c0525d01824ed758a87f50a3f6094767b580fca1eae4e9dbc2cc972af3d0cc3ac9615e576c5685e8bfc1ec90754bc826635f4f2a919d0b26bbb686cccab
|
||||
|
||||
@@ -9,9 +9,13 @@ PYTHON_REQ_USE='tk?,threads(+)'
|
||||
DISTUTILS_USE_SETUPTOOLS=bdepend
|
||||
inherit distutils-r1 flag-o-matic virtualx toolchain-funcs prefix
|
||||
|
||||
FT_PV=2.6.1
|
||||
DESCRIPTION="Pure python plotting library with matlab like syntax"
|
||||
HOMEPAGE="https://matplotlib.org/"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
|
||||
test? (
|
||||
https://downloads.sourceforge.net/project/freetype/freetype2/${FT_PV}/freetype-${FT_PV}.tar.gz
|
||||
)"
|
||||
|
||||
# Main license: matplotlib
|
||||
# Some modules: BSD
|
||||
@@ -140,10 +144,6 @@ python_prepare_all() {
|
||||
mkdir "${XDG_RUNTIME_DIR}" || die
|
||||
chmod 0700 "${XDG_RUNTIME_DIR}" || die
|
||||
|
||||
local freetype_version
|
||||
freetype_version="$(best_version media-libs/freetype | sed -r -e 's/.*-([0-9].*[0-9])(-r[0-9]+|$)/\1/g')"
|
||||
sed -i -r -e "s:(LOCAL_FREETYPE_VERSION =).*:\\1 \"${freetype_version}\":g" setupext.py lib/matplotlib/__init__.py || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
@@ -213,9 +213,13 @@ python_compile_all() {
|
||||
}
|
||||
|
||||
python_test() {
|
||||
wrap_setup distutils_install_for_testing
|
||||
# we need to rebuild mpl against bundled freetype, otherwise
|
||||
# over 1000 tests will fail because of mismatched font rendering
|
||||
local -x MPLLOCALFREETYPE=1
|
||||
ln -s "${WORKDIR}/freetype-${FT_PV}" "${BUILD_DIR}" || die
|
||||
wrap_setup distutils-r1_python_compile --build-lib="${BUILD_DIR}"/test-lib
|
||||
local -x PYTHONPATH=${BUILD_DIR}/test-lib:${PYTHONPATH}
|
||||
|
||||
distutils_install_for_testing
|
||||
"${EPYTHON}" -c "import sys, matplotlib as m; sys.exit(m.test(verbosity=2))" || die
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user