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
This commit is contained in:
J. Peter Mugaas
2018-09-04 01:07:33 -04:00
committed by Алексей
parent 98ff5dbecd
commit e2a5ff5900
95 changed files with 6045 additions and 66 deletions

View File

@@ -0,0 +1,151 @@
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
_realname=sqlparse
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=0.2.4
pkgrel=1
pkgdesc="Non-validating SQL parser for Python (mingw-w64)"
arch=('any')
url='https://github.com/andialbrecht/sqlparse'
license=('BSD')
makedepends=("${MINGW_PACKAGE_PREFIX}-python2"
"${MINGW_PACKAGE_PREFIX}-python3"
"${MINGW_PACKAGE_PREFIX}-python3-setuptools"
"${MINGW_PACKAGE_PREFIX}-python2-setuptools")
options=('staticlibs' 'strip' '!debug')
source=("${_realname}-$pkgver.tar.gz::https://github.com/andialbrecht/sqlparse/archive/$pkgver.tar.gz")
sha256sums=('7087a2bd385c06ac1a5cf343e2e5ea7ce2bb6386849e59ef214e02af68f73fb4')
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying $_patch"
patch -Nbp1 -i "${srcdir}/$_patch"
done
}
del_file_exists() {
for _fname in "$@"
do
if [ -f $_fname ]; then
rm -rf $_fname
fi
done
}
# =========================================== #
prepare() {
cd "${srcdir}"
pushd "${_realname}-${pkgver}"
# apply_patch_with_msg 0001-A-really-important-fix.patch \
# 0002-A-less-important-fix.patch
popd
for builddir in python{2,3}-build-${CARCH}; do
rm -rf ${builddir} | true
cp -r "${_realname}-${pkgver}" "${builddir}"
done
# Set version for setuptools_scm
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
}
# Note that build() is sometimes skipped because it's done in
# the packages setup.py install for simplicity if you can do so.
# but sometimes, you want to do a check before install which would
# also trigger the build.
build() {
for pver in {2,3}; do
msg "Python ${pver} build for ${CARCH}"
cd "${srcdir}/python${pver}-build-${CARCH}"
${MINGW_PREFIX}/bin/python${pver} setup.py build
done
}
check() {
for pver in {2,3}; do
msg "Python ${pver} test for ${CARCH}"
cd "${srcdir}/python${pver}-build-${CARCH}"
${MINGW_PREFIX}/bin/python${pver} setup.py test
done
}
package_python3-sqlparse() {
depends=("${MINGW_PACKAGE_PREFIX}-python3")
#This package install is needed for .fixups with .EXE's
#in the bit directory. The install files "python-exe-installs"
#and should be renamed to your _realname .
install=${_realname}3-${CARCH}.install
cd "${srcdir}/python3-build-${CARCH}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE"
# This entire section should be removed if the package does NOT install
# anything in the /mingw*/bin directory.
### begin section ###
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
# fix python command in files
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do
sed -e "s|/usr/bin/env |${MINGW_PREFIX}|g" \
-e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_f}
done
#### end section ####
}
package_python2-sqlparse() {
depends=("${MINGW_PACKAGE_PREFIX}-python2")
#This package install is needed for .fixups with .EXE's
#in the bit directory. The install files "python-exe-installs"
#and should be renamed to your _realname
install=${_realname}2-${CARCH}.install
cd "${srcdir}/python2-build-${CARCH}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE"
# This entire section should be removed if the package does NOT install
# anything in the /mingw*/bin directory.
### begin section ###
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
# fix python command in files
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do
sed -e "s|/usr/bin/env |${MINGW_PREFIX}|g" \
-e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_f}
done
# for Python2 packages, you want to rename some stuff from the bin directory
# with the 2 suffix like in the mingw-w64-python-pygments package to avoid
# conflicts when installing both the Python2 and Python3 packages
for f in sqlformat; do
mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe
if [ -f "${pkgdir}${MINGW_PREFIX}"/bin/${f}.exe.manifest ]; then
mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe.manifest
sed -e "s|${f}|${f}2|g" -i "${pkgdir}${MINGW_PREFIX}"/bin/${f}2.exe.manifest
fi
mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}-script.py
done
#### end section ####
}
package_mingw-w64-i686-python2-sqlparse() {
package_python2-sqlparse
}
package_mingw-w64-i686-python3-sqlparse() {
package_python3-sqlparse
}
package_mingw-w64-x86_64-python2-sqlparse() {
package_python2-sqlparse
}
package_mingw-w64-x86_64-python3-sqlparse() {
package_python3-sqlparse
}

View File

@@ -0,0 +1,14 @@
post_install() {
cd mingw32
local _prefix=$(pwd -W)
cd -
local _it
for _it in sqlformat2; do
sed -e "s|/mingw32|${_prefix}|g" \
-i mingw32/bin/${_it}-script.py
done
}
post_upgrade() {
post_install
}

View File

@@ -0,0 +1,14 @@
post_install() {
cd mingw64
local _prefix=$(pwd -W)
cd -
local _it
for _it in sqlformat2; do
sed -e "s|/mingw64|${_prefix}|g" \
-i mingw64/bin/${_it}-script.py
done
}
post_upgrade() {
post_install
}

View File

@@ -0,0 +1,14 @@
post_install() {
cd mingw32
local _prefix=$(pwd -W)
cd -
local _it
for _it in sqlformat; do
sed -e "s|/mingw32|${_prefix}|g" \
-i mingw32/bin/${_it}-script.py
done
}
post_upgrade() {
post_install
}

View File

@@ -0,0 +1,14 @@
post_install() {
cd mingw64
local _prefix=$(pwd -W)
cd -
local _it
for _it in sqlformat; do
sed -e "s|/mingw64|${_prefix}|g" \
-i mingw64/bin/${_it}-script.py
done
}
post_upgrade() {
post_install
}