Rename python3 folders to python
This commit is contained in:
61
mingw-w64-python-matplotlib/PKGBUILD
Normal file
61
mingw-w64-python-matplotlib/PKGBUILD
Normal file
@@ -0,0 +1,61 @@
|
||||
# Contributor: Christoph Reiter <reiter.chrsitoph@gmail.com>
|
||||
|
||||
_realname=matplotlib
|
||||
pkgbase=mingw-w64-python3-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
pkgver=3.1.2
|
||||
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"
|
||||
"https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip"
|
||||
setupext.py.patch)
|
||||
sha256sums=('a48803e79013d01f22454fd718a575c6f9dadced211722637487fc2f7803620e'
|
||||
'f8233674366ab36b2c34c577ec77a3d70cac75d2e387d8587f3836345c0f624d'
|
||||
'329283ed24e3f91a628f204885d296dec1d8ad0e0dda2ef58a53a08c6ab8d959')
|
||||
|
||||
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}"
|
||||
|
||||
local pyver=$(${MINGW_PREFIX}/bin/python3 -c "import sys;sys.stdout.write('.'.join(map(str, sys.version_info[:2])))")
|
||||
local query_dest="${pkgdir}${MINGW_PREFIX}/lib/python${pyver}/site-packages/matplotlib/backends/web_backend"
|
||||
mkdir -p "${query_dest}"
|
||||
cp -R "${srcdir}/jquery-ui-1.12.1" "${query_dest}"
|
||||
|
||||
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
|
||||
}
|
||||
28
mingw-w64-python-matplotlib/setupext.py.patch
Normal file
28
mingw-w64-python-matplotlib/setupext.py.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
--- matplotlib-3.1.0/setupext.py.orig 2019-05-18 03:55:28.000000000 +0200
|
||||
+++ matplotlib-3.1.0/setupext.py 2019-05-19 11:31:01.633173900 +0200
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
_log = logging.getLogger(__name__)
|
||||
|
||||
+MSYS = "MSYSTEM" in os.environ
|
||||
|
||||
def _get_xdg_cache_dir():
|
||||
"""
|
||||
@@ -220,7 +221,7 @@
|
||||
def __init__(self):
|
||||
"""Determines whether pkg-config exists on this machine."""
|
||||
self.pkg_config = None
|
||||
- if sys.platform != 'win32':
|
||||
+ if sys.platform != 'win32' or MSYS:
|
||||
pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config')
|
||||
if shutil.which(pkg_config) is not None:
|
||||
self.pkg_config = pkg_config
|
||||
@@ -276,7 +277,7 @@
|
||||
|
||||
# conda Windows header and library paths.
|
||||
# https://github.com/conda/conda/issues/2312 re: getting the env dir.
|
||||
- if sys.platform == 'win32':
|
||||
+ if sys.platform == 'win32' and not MSYS:
|
||||
conda_env_path = (os.getenv('CONDA_PREFIX') # conda >= 4.1
|
||||
or os.getenv('CONDA_DEFAULT_ENV')) # conda < 4.1
|
||||
if conda_env_path and os.path.isdir(conda_env_path):
|
||||
Reference in New Issue
Block a user