Files
MINGW-packages/mingw-w64-python-matplotlib/PKGBUILD
J. Peter Mugaas e2a5ff5900 Numerous packages to verify python-pbr (#4329)
* Numerous packages to verify python-pbr
Please note that this only ONE part of a long chain of packages that seem to depend upon eachother for building and validation including some stuff that is already in MINGW-W64 PKGBUILD’s such as setuptools and pbr as well as some other stuff.  The idea is build something that’s good enough to build everything else in hopefully manner including some stuff such as opencv, eigen, vtm numerous gnome packages, and who knows what else.  I may have made mistakes and numerous omissios so please bear with me.
mingw-w64-python2-subprocess32 - 0.6.0
mingw-w64-python-pyperclip - 1.6.4
mingw-w64-python-pyreadline - 2.1
mingw-w64-python2-cmd2 - 0.8.6
mingw-w64-python3-cmd2 – 0.9.4
mingw-w64-python-stevedore – 1.29.0
mingw-w64-python-unicodecsv – 0.14.1
mingw-w64-python-pytest-forked – 0.2 cliff-2.13.0-1
mingw-w64-python-pytest-xdist – 1.23.0
mingw-w64-python-execnet – 1.50
mingw-w64-python-testrepository – 0.20
mingw-w64-python-testresources – 2.0.1
mingw-w64-python-cliff - cliff-2.13.0
mingw-w64-python-voluptuous – 0.15.1

* python-hacking - 1.1.0

* More necessary packages for tests and afix for nose and sphinx.
Also tried to fix most mentioned previous except for "testrepository"  That was deliberate because it refers to the name of a package.

* Numerous modules that I built for testins stestr thare useful elesewhere.
I also updated sqlchemy and decorator to the latest versions.
Some times the testing here may not work but I'm hoping to lay more solid groundwork and quite a bit can be conibalized by others for fixing things already in git.

* Remove Python2 dependency for python3 package.

* python-jsonschemea - 2.6.0 - make sure .EXE works.  Added dependency on python2-functools32
python2-functutils32 - 3.2.3-2 - new package required for jsonshcemas Python2 version.
Verified this with PIP.

* python-matplotlib - require backports.functools_lru_cache
backports.functools_lru_cache - 1.5 - new package requried for python-maplotlib in Python2 - verified with PIP
2018-09-04 08:07:33 +03:00

145 lines
5.6 KiB
Bash

# Contributor: Runar Tenfjord < runar dot tenfjord at gmail dot com >
_realname=matplotlib
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=2.2.3
pkgrel=2
pkgdesc="A python plotting library, making publication quality plots (mingw-w64)"
arch=('any')
url='https://matplotlib.org/'
license=('custom')
makedepends=(
"${MINGW_PACKAGE_PREFIX}-python2"
"${MINGW_PACKAGE_PREFIX}-python3"
"${MINGW_PACKAGE_PREFIX}-python2-setuptools"
"${MINGW_PACKAGE_PREFIX}-python3-setuptools"
"${MINGW_PACKAGE_PREFIX}-python2-pytz"
"${MINGW_PACKAGE_PREFIX}-python3-pytz"
"${MINGW_PACKAGE_PREFIX}-python2-numpy"
"${MINGW_PACKAGE_PREFIX}-python3-numpy"
"${MINGW_PACKAGE_PREFIX}-python2-cairo"
"${MINGW_PACKAGE_PREFIX}-python3-cairo"
"${MINGW_PACKAGE_PREFIX}-python2-pyqt5"
"${MINGW_PACKAGE_PREFIX}-python3-pyqt5"
"${MINGW_PACKAGE_PREFIX}-python2-dateutil"
"${MINGW_PACKAGE_PREFIX}-python3-dateutil"
"${MINGW_PACKAGE_PREFIX}-python2-pyparsing"
"${MINGW_PACKAGE_PREFIX}-python3-pyparsing"
"${MINGW_PACKAGE_PREFIX}-python2-cycler"
"${MINGW_PACKAGE_PREFIX}-python3-cycler"
"${MINGW_PACKAGE_PREFIX}-python2-kiwisolver"
"${MINGW_PACKAGE_PREFIX}-python3-kiwisolver"
"${MINGW_PACKAGE_PREFIX}-python2-backports.functools_lru_cache"
"${MINGW_PACKAGE_PREFIX}-freetype"
"${MINGW_PACKAGE_PREFIX}-libpng"
#"${MINGW_PACKAGE_PREFIX}-qhull"
)
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/matplotlib/matplotlib/archive/v${pkgver}.tar.gz"
setupext.py.patch
setup.py.patch)
sha256sums=('da5b804222864a8e854ed68f16dcbc8b2fa096537d84f879cc8289db368735c8'
'7ecd678f2325486fc79998dd11f79a5c0e0284d3c4260678f47c4b24d0a3d893'
'2ace7d4fe23ba9e96f2c81f827c8ea6bc65c532e6bd4eee3a655aae1ae6dab17')
noextract=("${_realname}-${pkgver}.tar.gz")
prepare() {
# Clean up old sources so re-patching doesn't fail.
[[ -d ${srcdir}/${_realname}-${pkgver} ]] && rm -rf $srcdir/${_realname}-${pkgver}
tar -xzvf ${_realname}-${pkgver}.tar.gz -C ${srcdir}
cd ${srcdir}/${_realname}-${pkgver}
patch -p1 -i ${srcdir}/setupext.py.patch
patch -p1 -i ${srcdir}/setup.py.patch
cd ${srcdir}
cp -a ${_realname}-${pkgver} ${_realname}-py2-${pkgver}
cp -a ${_realname}-${pkgver} ${_realname}-py3-${pkgver}
cd ${srcdir}/${_realname}-py3-${pkgver}
# remove cairo which fails for python3
sed -i 's/setupext\.BackendGtk3Cairo/#setupext\.BackendGtk3Cairo/g' setup.py
sed -i 's/setupext\.BackendCairo/#setupext\.BackendCairo/g' setup.py
cd ${srcdir}/${_realname}-py2-${pkgver}
sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/env python2|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
-e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
-i $(find . -name '*.py')
}
build() {
cd ${srcdir}/${_realname}-py2-${pkgver}
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python2 setup.py build
cd ${srcdir}/${_realname}-py3-${pkgver}
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python3 setup.py build
}
package_python3-matplotlib() {
depends=(
"${MINGW_PACKAGE_PREFIX}-python3-pytz"
"${MINGW_PACKAGE_PREFIX}-python3-numpy"
"${MINGW_PACKAGE_PREFIX}-python3-cairo"
"${MINGW_PACKAGE_PREFIX}-python3-cycler"
"${MINGW_PACKAGE_PREFIX}-python3-pyqt5"
"${MINGW_PACKAGE_PREFIX}-python3-dateutil"
"${MINGW_PACKAGE_PREFIX}-python3-pyparsing"
"${MINGW_PACKAGE_PREFIX}-python3-kiwisolver"
"${MINGW_PACKAGE_PREFIX}-freetype"
"${MINGW_PACKAGE_PREFIX}-libpng"
#"${MINGW_PACKAGE_PREFIX}-qhull"
)
cd ${srcdir}/${_realname}-py3-${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
}
package_python2-matplotlib() {
depends=(
"${MINGW_PACKAGE_PREFIX}-python2-pytz"
"${MINGW_PACKAGE_PREFIX}-python2-numpy"
"${MINGW_PACKAGE_PREFIX}-python2-cairo"
"${MINGW_PACKAGE_PREFIX}-python2-cycler"
"${MINGW_PACKAGE_PREFIX}-python2-pyqt5"
"${MINGW_PACKAGE_PREFIX}-python2-dateutil"
"${MINGW_PACKAGE_PREFIX}-python2-pyparsing"
"${MINGW_PACKAGE_PREFIX}-python2-kiwisolver"
"${MINGW_PACKAGE_PREFIX}-python2-backports.functools_lru_cache"
"${MINGW_PACKAGE_PREFIX}-freetype"
"${MINGW_PACKAGE_PREFIX}-libpng"
#"${MINGW_PACKAGE_PREFIX}-qhull"
)
cd ${srcdir}/${_realname}-py2-${pkgver}
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python2 setup.py install -O1 --skip-build \
--root="${pkgdir}" --prefix=${MINGW_PREFIX}
install -Dm644 doc/users/license.rst "${pkgdir}${MINGW_PREFIX}"/share/licenses/python2-matplotlib/LICENSE
}
package_mingw-w64-i686-python2-matplotlib() {
package_python2-matplotlib
}
package_mingw-w64-i686-python3-matplotlib() {
package_python3-matplotlib
}
package_mingw-w64-x86_64-python2-matplotlib() {
package_python2-matplotlib
}
package_mingw-w64-x86_64-python3-matplotlib() {
package_python3-matplotlib
}
# vim:set ts=2 sw=2 et: