matplotlib: Update to 3.0.0 (#4434)
Matplotlib is Python 3 only now and has auto backend detection so move all the backend related dependencies into optdepends. This splits the package into two PKGBUILD files, one building a Python 2 version providing 2.2.x and one building a Python 3 version providing 3.x+
This commit is contained in:
committed by
Алексей
parent
16e24e4f6e
commit
182de74ab4
54
mingw-w64-python3-matplotlib/PKGBUILD
Normal file
54
mingw-w64-python3-matplotlib/PKGBUILD
Normal file
@@ -0,0 +1,54 @@
|
||||
# Contributor: Christoph Reiter <reiter.chrsitoph@gmail.com>
|
||||
|
||||
_realname=matplotlib
|
||||
pkgbase=mingw-w64-python3-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
pkgver=3.0.0
|
||||
pkgrel=1
|
||||
pkgdesc="A python plotting library, making publication quality plots (mingw-w64)"
|
||||
arch=('any')
|
||||
url='https://matplotlib.org/'
|
||||
license=('custom')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python3-pytz"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-numpy"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-cycler"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-dateutil"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-pyparsing"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-kiwisolver"
|
||||
"${MINGW_PACKAGE_PREFIX}-freetype"
|
||||
"${MINGW_PACKAGE_PREFIX}-libpng")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python3"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-setuptools")
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-python3-pyqt5: Qt5Agg/Qt5Cairo backend"
|
||||
"${MINGW_PACKAGE_PREFIX}-gtk3: GTK3Agg/GTK3Cairo backend"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-gobject: GTK3Agg/GTK3Cairo backend"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-cairo: cairo/GTK3Cairo/Qt5Cairo backend"
|
||||
"${MINGW_PACKAGE_PREFIX}-python3-tornado: WebAgg backend")
|
||||
|
||||
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/matplotlib/matplotlib/archive/v${pkgver}.tar.gz"
|
||||
setupext.py.patch)
|
||||
sha256sums=('4ab565581e3012fec06f93fc181d719a6f214f34c5b2a9f808741f0097507ea4'
|
||||
'4a40f33ceda86f4a70d71fc97f28e799fe6973f9358fd9d1dac9b40cc2f0c7fc')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
patch -p1 -i ${srcdir}/setupext.py.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
||||
${MINGW_PREFIX}/bin/python3 setup.py build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
||||
${MINGW_PREFIX}/bin/python3 setup.py install -O1 --skip-build \
|
||||
--root="${pkgdir}" --prefix=${MINGW_PREFIX}
|
||||
|
||||
install -Dm644 doc/users/license.rst "${pkgdir}${MINGW_PREFIX}"/share/licenses/python3-matplotlib/LICENSE
|
||||
}
|
||||
37
mingw-w64-python3-matplotlib/setupext.py.patch
Normal file
37
mingw-w64-python3-matplotlib/setupext.py.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
--- matplotlib-3.0.0/setupext.py.orig 2018-09-18 05:17:52.000000000 +0200
|
||||
+++ matplotlib-3.0.0/setupext.py 2018-09-20 12:51:06.529116400 +0200
|
||||
@@ -22,6 +22,7 @@
|
||||
import setuptools
|
||||
import versioneer
|
||||
|
||||
+MSYS = "MSYSTEM" in os.environ
|
||||
|
||||
def _get_xdg_cache_dir():
|
||||
"""
|
||||
@@ -267,7 +268,7 @@
|
||||
"""
|
||||
Determines whether pkg-config exists on this machine.
|
||||
"""
|
||||
- if sys.platform == 'win32':
|
||||
+ if sys.platform == 'win32' and not MSYS:
|
||||
self.has_pkgconfig = False
|
||||
else:
|
||||
self.pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config')
|
||||
@@ -946,7 +947,7 @@
|
||||
if options.get('local_freetype'):
|
||||
return "Using local version for testing"
|
||||
|
||||
- if sys.platform == 'win32':
|
||||
+ if sys.platform == 'win32' and not MSYS:
|
||||
try:
|
||||
check_include_file(get_include_dirs(), 'ft2build.h', 'freetype')
|
||||
except CheckFailed:
|
||||
@@ -1176,7 +1177,7 @@
|
||||
}
|
||||
|
||||
def check(self):
|
||||
- if sys.platform == 'win32':
|
||||
+ if sys.platform == 'win32' and not MSYS:
|
||||
check_include_file(get_include_dirs(), 'png.h', 'png')
|
||||
return 'Using unknown version found on system.'
|
||||
|
||||
Reference in New Issue
Block a user