From e2a5ff5900a8ee0d6598ce2343d9c4b4baab01ea Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Tue, 4 Sep 2018 01:07:33 -0400 Subject: [PATCH] Numerous packages to verify python-pbr (#4329) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- mingw-w64-python-alembic/PKGBUILD | 166 +++++++++++++++ .../alembic2-i686.install | 14 ++ .../alembic2-x86_64.install | 14 ++ .../alembic3-i686.install | 14 ++ .../alembic3-x86_64.install | 14 ++ .../PKGBUILD | 74 +++++++ mingw-w64-python-cliff/PKGBUILD | 147 ++++++++++++++ mingw-w64-python-ddt/PKGBUILD | 115 +++++++++++ mingw-w64-python-debtcollector/PKGBUILD | 118 +++++++++++ mingw-w64-python-decorator/PKGBUILD | 95 ++++++--- mingw-w64-python-editor/PKGBUILD | 110 ++++++++++ mingw-w64-python-eventlet/PKGBUILD | 156 +++++++++++++++ mingw-w64-python-execnet/PKGBUILD | 117 +++++++++++ mingw-w64-python-execnet/fix-metadata.patch | 18 ++ mingw-w64-python-fasteners/PKGBUILD | 103 ++++++++++ mingw-w64-python-hacking/PKGBUILD | 110 ++++++++++ mingw-w64-python-jsonschema/PKGBUILD | 38 +++- .../jsonschema2-i686.install | 14 ++ .../jsonschema2-x86_64.install | 14 ++ .../jsonschema3-i686.install | 17 ++ .../jsonschema3-x86_64.install | 14 ++ mingw-w64-python-matplotlib/PKGBUILD | 2 + mingw-w64-python-monotonic/PKGBUILD | 101 ++++++++++ mingw-w64-python-mox3/PKGBUILD | 113 +++++++++++ mingw-w64-python-msgpack/PKGBUILD | 107 ++++++++++ mingw-w64-python-netaddr/PKGBUILD | 164 +++++++++++++++ .../fix-0.7.19-python3.patch | 50 +++++ .../netaddr2-i686.install | 14 ++ .../netaddr2-x86_64.install | 14 ++ .../netaddr3-i686.install | 17 ++ .../netaddr3-x86_64.install | 14 ++ ...eturn-instead-of-raise-StopIteration.patch | 23 +++ mingw-w64-python-netifaces/PKGBUILD | 111 ++++++++++ mingw-w64-python-nose/PKGBUILD | 24 ++- mingw-w64-python-oslo-concurrency/PKGBUILD | 183 +++++++++++++++++ .../oslo-concurrency2-i686.install | 14 ++ .../oslo-concurrency2-x86_64.install | 14 ++ .../oslo-concurrency3-i686.install | 17 ++ .../oslo-concurrency3-x86_64.install | 14 ++ mingw-w64-python-oslo-config/PKGBUILD | 189 ++++++++++++++++++ .../oslo-config2-i686.install | 17 ++ .../oslo-config2-x86_64.install | 17 ++ .../oslo-config3-i686.install | 17 ++ .../oslo-config3-x86_64.install | 17 ++ mingw-w64-python-oslo-context/PKGBUILD | 123 ++++++++++++ mingw-w64-python-oslo-db/PKGBUILD | 162 +++++++++++++++ mingw-w64-python-oslo-i18n/PKGBUILD | 119 +++++++++++ mingw-w64-python-oslo-log/PKGBUILD | 180 +++++++++++++++++ .../oslo-log2-i686.install | 14 ++ .../oslo-log2-x86_64.install | 14 ++ .../oslo-log3-i686.install | 17 ++ .../oslo-log3-x86_64.install | 14 ++ mingw-w64-python-oslo-serialization/PKGBUILD | 131 ++++++++++++ mingw-w64-python-oslo-utils/PKGBUILD | 139 +++++++++++++ mingw-w64-python-oslosphinx/PKGBUILD | 123 ++++++++++++ mingw-w64-python-oslotest/PKGBUILD | 169 ++++++++++++++++ .../oslotest2-i686.install | 14 ++ .../oslotest2-x86_64.install | 14 ++ .../oslotest3-i686.install | 14 ++ .../oslotest3-x86_64.install | 14 ++ mingw-w64-python-pyperclip/PKGBUILD | 110 ++++++++++ mingw-w64-python-pyreadline/PKGBUILD | 106 ++++++++++ mingw-w64-python-pytest-forked/PKGBUILD | 116 +++++++++++ mingw-w64-python-rfc3986/PKGBUILD | 103 ++++++++++ mingw-w64-python-sphinx/PKGBUILD | 16 +- mingw-w64-python-sqlalchemy-migrate/PKGBUILD | 183 +++++++++++++++++ .../sqlalchemy-migrate2-i686.install | 14 ++ .../sqlalchemy-migrate2-x86_64.install | 14 ++ .../sqlalchemy-migrate3-i686.install | 14 ++ .../sqlalchemy-migrate3-x86_64.install | 14 ++ mingw-w64-python-sqlalchemy/PKGBUILD | 27 +-- mingw-w64-python-sqlparse/PKGBUILD | 151 ++++++++++++++ .../sqlparse2-i686.install | 14 ++ .../sqlparse2-x86_64.install | 14 ++ .../sqlparse3-i686.install | 14 ++ .../sqlparse3-x86_64.install | 14 ++ mingw-w64-python-stestr/PKGBUILD | 161 +++++++++++++++ mingw-w64-python-stestr/stestr2-i686.install | 14 ++ .../stestr2-x86_64.install | 17 ++ mingw-w64-python-stestr/stestr3-i686.install | 17 ++ .../stestr3-x86_64.install | 17 ++ mingw-w64-python-stevedore/PKGBUILD | 109 ++++++++++ mingw-w64-python-tempita/PKGBUILD | 107 ++++++++++ mingw-w64-python-testrepository/PKGBUILD | 153 ++++++++++++++ .../testrepository2-i686.install | 14 ++ .../testrepository2-x86_64.install | 14 ++ .../testrepository3-i686.install | 14 ++ .../testrepository3-x86_64.install | 14 ++ mingw-w64-python-testresources/PKGBUILD | 109 ++++++++++ mingw-w64-python-voluptuous/PKGBUILD | 117 +++++++++++ mingw-w64-python2-cmd2/PKGBUILD | 85 ++++++++ mingw-w64-python2-functools32/PKGBUILD | 67 +++++++ mingw-w64-python2-subprocess32/PKGBUILD | 38 ++++ mingw-w64-python2-unicodecsv/PKGBUILD | 43 ++++ mingw-w64-python3-cmd2/PKGBUILD | 81 ++++++++ 95 files changed, 6045 insertions(+), 66 deletions(-) create mode 100644 mingw-w64-python-alembic/PKGBUILD create mode 100644 mingw-w64-python-alembic/alembic2-i686.install create mode 100644 mingw-w64-python-alembic/alembic2-x86_64.install create mode 100644 mingw-w64-python-alembic/alembic3-i686.install create mode 100644 mingw-w64-python-alembic/alembic3-x86_64.install create mode 100644 mingw-w64-python-backports.functools-lru-cache/PKGBUILD create mode 100644 mingw-w64-python-cliff/PKGBUILD create mode 100644 mingw-w64-python-ddt/PKGBUILD create mode 100644 mingw-w64-python-debtcollector/PKGBUILD create mode 100644 mingw-w64-python-editor/PKGBUILD create mode 100644 mingw-w64-python-eventlet/PKGBUILD create mode 100644 mingw-w64-python-execnet/PKGBUILD create mode 100644 mingw-w64-python-execnet/fix-metadata.patch create mode 100644 mingw-w64-python-fasteners/PKGBUILD create mode 100644 mingw-w64-python-hacking/PKGBUILD create mode 100644 mingw-w64-python-jsonschema/jsonschema2-i686.install create mode 100644 mingw-w64-python-jsonschema/jsonschema2-x86_64.install create mode 100644 mingw-w64-python-jsonschema/jsonschema3-i686.install create mode 100644 mingw-w64-python-jsonschema/jsonschema3-x86_64.install create mode 100644 mingw-w64-python-monotonic/PKGBUILD create mode 100644 mingw-w64-python-mox3/PKGBUILD create mode 100644 mingw-w64-python-msgpack/PKGBUILD create mode 100644 mingw-w64-python-netaddr/PKGBUILD create mode 100644 mingw-w64-python-netaddr/fix-0.7.19-python3.patch create mode 100644 mingw-w64-python-netaddr/netaddr2-i686.install create mode 100644 mingw-w64-python-netaddr/netaddr2-x86_64.install create mode 100644 mingw-w64-python-netaddr/netaddr3-i686.install create mode 100644 mingw-w64-python-netaddr/netaddr3-x86_64.install create mode 100644 mingw-w64-python-netaddr/pep479-return-instead-of-raise-StopIteration.patch create mode 100644 mingw-w64-python-netifaces/PKGBUILD create mode 100644 mingw-w64-python-oslo-concurrency/PKGBUILD create mode 100644 mingw-w64-python-oslo-concurrency/oslo-concurrency2-i686.install create mode 100644 mingw-w64-python-oslo-concurrency/oslo-concurrency2-x86_64.install create mode 100644 mingw-w64-python-oslo-concurrency/oslo-concurrency3-i686.install create mode 100644 mingw-w64-python-oslo-concurrency/oslo-concurrency3-x86_64.install create mode 100644 mingw-w64-python-oslo-config/PKGBUILD create mode 100644 mingw-w64-python-oslo-config/oslo-config2-i686.install create mode 100644 mingw-w64-python-oslo-config/oslo-config2-x86_64.install create mode 100644 mingw-w64-python-oslo-config/oslo-config3-i686.install create mode 100644 mingw-w64-python-oslo-config/oslo-config3-x86_64.install create mode 100644 mingw-w64-python-oslo-context/PKGBUILD create mode 100644 mingw-w64-python-oslo-db/PKGBUILD create mode 100644 mingw-w64-python-oslo-i18n/PKGBUILD create mode 100644 mingw-w64-python-oslo-log/PKGBUILD create mode 100644 mingw-w64-python-oslo-log/oslo-log2-i686.install create mode 100644 mingw-w64-python-oslo-log/oslo-log2-x86_64.install create mode 100644 mingw-w64-python-oslo-log/oslo-log3-i686.install create mode 100644 mingw-w64-python-oslo-log/oslo-log3-x86_64.install create mode 100644 mingw-w64-python-oslo-serialization/PKGBUILD create mode 100644 mingw-w64-python-oslo-utils/PKGBUILD create mode 100644 mingw-w64-python-oslosphinx/PKGBUILD create mode 100644 mingw-w64-python-oslotest/PKGBUILD create mode 100644 mingw-w64-python-oslotest/oslotest2-i686.install create mode 100644 mingw-w64-python-oslotest/oslotest2-x86_64.install create mode 100644 mingw-w64-python-oslotest/oslotest3-i686.install create mode 100644 mingw-w64-python-oslotest/oslotest3-x86_64.install create mode 100644 mingw-w64-python-pyperclip/PKGBUILD create mode 100644 mingw-w64-python-pyreadline/PKGBUILD create mode 100644 mingw-w64-python-pytest-forked/PKGBUILD create mode 100644 mingw-w64-python-rfc3986/PKGBUILD create mode 100644 mingw-w64-python-sqlalchemy-migrate/PKGBUILD create mode 100644 mingw-w64-python-sqlalchemy-migrate/sqlalchemy-migrate2-i686.install create mode 100644 mingw-w64-python-sqlalchemy-migrate/sqlalchemy-migrate2-x86_64.install create mode 100644 mingw-w64-python-sqlalchemy-migrate/sqlalchemy-migrate3-i686.install create mode 100644 mingw-w64-python-sqlalchemy-migrate/sqlalchemy-migrate3-x86_64.install create mode 100644 mingw-w64-python-sqlparse/PKGBUILD create mode 100644 mingw-w64-python-sqlparse/sqlparse2-i686.install create mode 100644 mingw-w64-python-sqlparse/sqlparse2-x86_64.install create mode 100644 mingw-w64-python-sqlparse/sqlparse3-i686.install create mode 100644 mingw-w64-python-sqlparse/sqlparse3-x86_64.install create mode 100644 mingw-w64-python-stestr/PKGBUILD create mode 100644 mingw-w64-python-stestr/stestr2-i686.install create mode 100644 mingw-w64-python-stestr/stestr2-x86_64.install create mode 100644 mingw-w64-python-stestr/stestr3-i686.install create mode 100644 mingw-w64-python-stestr/stestr3-x86_64.install create mode 100644 mingw-w64-python-stevedore/PKGBUILD create mode 100644 mingw-w64-python-tempita/PKGBUILD create mode 100644 mingw-w64-python-testrepository/PKGBUILD create mode 100644 mingw-w64-python-testrepository/testrepository2-i686.install create mode 100644 mingw-w64-python-testrepository/testrepository2-x86_64.install create mode 100644 mingw-w64-python-testrepository/testrepository3-i686.install create mode 100644 mingw-w64-python-testrepository/testrepository3-x86_64.install create mode 100644 mingw-w64-python-testresources/PKGBUILD create mode 100644 mingw-w64-python-voluptuous/PKGBUILD create mode 100644 mingw-w64-python2-cmd2/PKGBUILD create mode 100644 mingw-w64-python2-functools32/PKGBUILD create mode 100644 mingw-w64-python2-subprocess32/PKGBUILD create mode 100644 mingw-w64-python2-unicodecsv/PKGBUILD create mode 100644 mingw-w64-python3-cmd2/PKGBUILD diff --git a/mingw-w64-python-alembic/PKGBUILD b/mingw-w64-python-alembic/PKGBUILD new file mode 100644 index 0000000000..8118017a6f --- /dev/null +++ b/mingw-w64-python-alembic/PKGBUILD @@ -0,0 +1,166 @@ +# Maintainer: Some One +#This value is here because some python package names have capital letters +#while there is a strong preference for lowercase letters in ArchLinux and +#MSYS packages. + +_realname=alembic +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=1.0.0 +pkgrel=1 +pkgdesc="Lightweight database migration tool for usage with SQLAlchemy (mingw-w64)" +arch=('any') +url='https://bitbucket.org/zzzeek/alembic' +license=('MIT') +makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-mako" + "${MINGW_PACKAGE_PREFIX}-python3-sqlalchemy" + "${MINGW_PACKAGE_PREFIX}-python3-editor" + "${MINGW_PACKAGE_PREFIX}-python3-dateutil" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-mako" + "${MINGW_PACKAGE_PREFIX}-python2-sqlalchemy" + "${MINGW_PACKAGE_PREFIX}-python2-editor" + "${MINGW_PACKAGE_PREFIX}-python2-dateutil") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest" + "${MINGW_PACKAGE_PREFIX}-python3-mock" + "${MINGW_PACKAGE_PREFIX}-python2-pytest" + "${MINGW_PACKAGE_PREFIX}-python2-mock") +options=('staticlibs' 'strip' '!debug') +source=(https://pypi.org/packages/source/a/alembic/alembic-${pkgver}.tar.gz{,.asc}) +sha512sums=('919798fd886b2e457c780ed743e34c7b09dc68a90dd616c698b4a96b41cfe16e3efd63531ab106d22c036c42ce50501f5817c8aa008e5e595e0e25c5580fd0df' + 'SKIP') +validpgpkeys=('83AF7ACE251C13E6BB7DEFBD330239C1C4DAFEE1') # Michael Bayer + +# 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 check + done +} + +package_python3-alembic() { + 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-alembic() { + 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 alembic; 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-alembic() { + package_python2-alembic +} + +package_mingw-w64-i686-python3-alembic() { + package_python3-alembic +} + +package_mingw-w64-x86_64-python2-alembic() { + package_python2-alembic +} + +package_mingw-w64-x86_64-python3-alembic() { + package_python3-alembic +} diff --git a/mingw-w64-python-alembic/alembic2-i686.install b/mingw-w64-python-alembic/alembic2-i686.install new file mode 100644 index 0000000000..6349f58bb9 --- /dev/null +++ b/mingw-w64-python-alembic/alembic2-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it + for _it in alembic2; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-alembic/alembic2-x86_64.install b/mingw-w64-python-alembic/alembic2-x86_64.install new file mode 100644 index 0000000000..1f21e0fdbe --- /dev/null +++ b/mingw-w64-python-alembic/alembic2-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in alembic2; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-alembic/alembic3-i686.install b/mingw-w64-python-alembic/alembic3-i686.install new file mode 100644 index 0000000000..b1ba753e59 --- /dev/null +++ b/mingw-w64-python-alembic/alembic3-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it + for _it in alembic; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-alembic/alembic3-x86_64.install b/mingw-w64-python-alembic/alembic3-x86_64.install new file mode 100644 index 0000000000..b22bd3d911 --- /dev/null +++ b/mingw-w64-python-alembic/alembic3-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in alembic; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-backports.functools-lru-cache/PKGBUILD b/mingw-w64-python-backports.functools-lru-cache/PKGBUILD new file mode 100644 index 0000000000..e6c917114a --- /dev/null +++ b/mingw-w64-python-backports.functools-lru-cache/PKGBUILD @@ -0,0 +1,74 @@ +# Maintainer: J. Peter Mugaas + +_realname=backports.functools_lru_cache +pkgbase=mingw-w64-python2-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-python2-${_realname}" +pkgver=1.5 +pkgrel=1 +pkgdesc="Backport of functools.lru_cache from Python 3.3 as published at ActiveState. (mingw-w64)" +arch=('any') +url='https://github.com/jaraco/backports.functools_lru_cache' +license=('MIT') +depends=("${MINGW_PACKAGE_PREFIX}-python2-backports") +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python2-pytest-runner") +optdepends=("${MINGW_PACKAGE_PREFIX}-python2-ipaddress: for IPAddress ServerAltnames support") +options=('staticlibs' 'strip' '!debug') +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/jaraco/backports.functools_lru_cache/archive/$pkgver.tar.gz") +sha256sums=('735e2d2985f0200637feffdf0bba8ef46f7feee1fd166f2d6a30df935416e5e9') + +# 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}" + rm -rf python2-build-${CARCH} | true + cp -r "${_realname}-${pkgver}" "python2-build-${CARCH}" + # 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() { + msg "Python 2 build for ${CARCH}" + cd python2-build-${CARCH} + ${MINGW_PREFIX}/bin/python${pver} setup.py build +} + +check() { + msg "Python 2 test for ${CARCH}" + cd python2-build-${CARCH} + ${MINGW_PREFIX}/bin/python2 setup.py pytest +} + +package() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + 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 + # This looks odd but the backports namespace module was imported earlier + rm "$pkgdir${MINGW_PREFIX}/lib/python2.7/site-packages/backports/"__init__.py* +} + diff --git a/mingw-w64-python-cliff/PKGBUILD b/mingw-w64-python-cliff/PKGBUILD new file mode 100644 index 0000000000..d675172cf5 --- /dev/null +++ b/mingw-w64-python-cliff/PKGBUILD @@ -0,0 +1,147 @@ +# Maintainer: J. Peter Mugaas + +_realname=cliff +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=2.13.0 +pkgrel=1 +pkgdesc="Command Line Interface Formulation Framewor (mingw-w64)" +arch=('any') +url='https://docs.openstack.org/cliff/latest/' +license=('Apache') +makedepends=('git' + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-cmd2" + "${MINGW_PACKAGE_PREFIX}-python2-cmd2" + "${MINGW_PACKAGE_PREFIX}-python3-prettytable" + "${MINGW_PACKAGE_PREFIX}-python2-prettytable" + "${MINGW_PACKAGE_PREFIX}-python3-pyparsing" + "${MINGW_PACKAGE_PREFIX}-python2-pyparsing" + "${MINGW_PACKAGE_PREFIX}-python3-stevedore" + "${MINGW_PACKAGE_PREFIX}-python2-stevedore" + "${MINGW_PACKAGE_PREFIX}-python2-unicodecsv" + "${MINGW_PACKAGE_PREFIX}-python3-yaml" + "${MINGW_PACKAGE_PREFIX}-python2-yaml") +#checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-testrepository" +# "${MINGW_PACKAGE_PREFIX}-python2-testrepository" +# "${MINGW_PACKAGE_PREFIX}-python3-mock" +# "${MINGW_PACKAGE_PREFIX}-python2-mock" +# "${MINGW_PACKAGE_PREFIX}-python3-sphinx" +# "${MINGW_PACKAGE_PREFIX}-python2-sphinx" +# "${MINGW_PACKAGE_PREFIX}-python3-oslosphinx" +# "${MINGW_PACKAGE_PREFIX}-python2-oslosphinx" +# "${MINGW_PACKAGE_PREFIX}-python3-testscenarios" +# "${MINGW_PACKAGE_PREFIX}-python2-testscenarios") +options=('staticlibs' 'strip' '!debug') +source=("${_realname}-$pkgver.tar.gz::https://github.com/openstack/cliff/archive/$pkgver.tar.gz") +sha512sums=('af0f34900897133ab7bb00142d95af20fcd124a3627f5ffc0ed82c34d86bf16afcfacfcafa600d7eba2580689b51deac8b6496e15990c2a33df95f7dcecf04f1') + +# 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 + export PBR_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}" +# PYTHON=${MINGW_PREFIX}/bin/python${pver} +# ${MINGW_PREFIX}/bin/python${pver} setup.py testr +# done +#} + +package_python3-cliff() { + depends=("${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-cmd2" + "${MINGW_PACKAGE_PREFIX}-python3-prettytable" + "${MINGW_PACKAGE_PREFIX}-python3-pyparsing" + "${MINGW_PACKAGE_PREFIX}-python3-stevedore" + "${MINGW_PACKAGE_PREFIX}-python3-yaml") + + 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" +} + +package_python2-cliff() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-cmd2" + "${MINGW_PACKAGE_PREFIX}-python2-prettytable" + "${MINGW_PACKAGE_PREFIX}-python2-pyparsing" + "${MINGW_PACKAGE_PREFIX}-python2-stevedore" + "${MINGW_PACKAGE_PREFIX}-python2-unicodecsv" + "${MINGW_PACKAGE_PREFIX}-python2-yaml") + + 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" +} + +package_mingw-w64-i686-python2-cliff() { + package_python2-cliff +} + +package_mingw-w64-i686-python3-cliff() { + package_python3-cliff +} + +package_mingw-w64-x86_64-python2-cliff() { + package_python2-cliff +} + +package_mingw-w64-x86_64-python3-cliff() { + package_python3-cliff +} diff --git a/mingw-w64-python-ddt/PKGBUILD b/mingw-w64-python-ddt/PKGBUILD new file mode 100644 index 0000000000..3bda7a1351 --- /dev/null +++ b/mingw-w64-python-ddt/PKGBUILD @@ -0,0 +1,115 @@ +# Maintainer: J. Peter Mugaas + +_realname=ddt +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=1.2.0 +pkgrel=1 +pkgdesc="Data-Driven/Decorated Tests (mingw-w64)" +arch=('any') +url='https://github.com/txels/ddt' +license=('MIT') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") +options=('staticlibs' 'strip' '!debug') +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-nose" + "${MINGW_PACKAGE_PREFIX}-python2-nose" + "${MINGW_PACKAGE_PREFIX}-python3-mock" + "${MINGW_PACKAGE_PREFIX}-python2-mock" + "${MINGW_PACKAGE_PREFIX}-python3-yaml" + "${MINGW_PACKAGE_PREFIX}-python2-yaml") +source=("${_realname}-$pkgver.tar.gz"::"https://github.com/txels/ddt/archive/$pkgver.tar.gz") +sha512sums=('1d5c8d0a496e4cfab154fa009a877926d21c8947d4e8833d97a0ce75b2b2cc615084a695a8cc765178c44765f3ba22e16f437ba623a240ae1e674e8eb486e4ad') + +# 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/nosetests${pver} + done +} + +package_python3-ddt() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + 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.md "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE.md" +} + +package_python2-ddt() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + 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.md "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE.md" +} + +package_mingw-w64-i686-python2-ddt() { + package_python2-ddt +} + +package_mingw-w64-i686-python3-ddt() { + package_python3-ddt +} + +package_mingw-w64-x86_64-python2-ddt() { + package_python2-ddt +} + +package_mingw-w64-x86_64-python3-ddt() { + package_python3-ddt +} diff --git a/mingw-w64-python-debtcollector/PKGBUILD b/mingw-w64-python-debtcollector/PKGBUILD new file mode 100644 index 0000000000..5dc18e1e27 --- /dev/null +++ b/mingw-w64-python-debtcollector/PKGBUILD @@ -0,0 +1,118 @@ +# Maintainer: J. Peter Mugaas + +_realname=debtcollector +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=1.20.0 +pkgrel=1 +pkgdesc="A collection of Python deprecation patterns and strategies that help you collect your technical debt in a non-destructive manner. (mingw-w64)" +arch=('any') +url='http://docs.openstack.org/developer/debtcollector' +license=('Apache') +options=('staticlibs' 'strip' '!debug') +makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-babel" + "${MINGW_PACKAGE_PREFIX}-python2-babel" + "${MINGW_PACKAGE_PREFIX}-python3-wrapt" + "${MINGW_PACKAGE_PREFIX}-python2-wrapt" + "${MINGW_PACKAGE_PREFIX}-python2-funcsigs") +#checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-oslotest" +# "${MINGW_PACKAGE_PREFIX}-python2-oslotest") +source=("$pkgbase-$pkgver.tar.gz::https://github.com/openstack/debtcollector/archive/$pkgver.tar.gz") +sha512sums=('d3237ec7b3c889ea17ce0950a9df773436963fdc54fa5509b06c48fe9e52e480d8a5545eef11af2a2b3289a0af3d9e79661bc8621f30ec32af2eb25653963980') + +# 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}" + 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 + # for python-pbr + export PBR_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 check + done +} + +package_python3-debtcollector() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-babel" + "${MINGW_PACKAGE_PREFIX}-python3-wrapt") + + 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 +} + +package_python2-debtcollector() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-babel" + "${MINGW_PACKAGE_PREFIX}-python2-wrapt") + + 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 +} + +package_mingw-w64-i686-python2-debtcollector() { + package_python2-debtcollector +} + +package_mingw-w64-i686-python3-debtcollector() { + package_python3-debtcollector +} + +package_mingw-w64-x86_64-python2-debtcollector() { + package_python2-debtcollector +} + +package_mingw-w64-x86_64-python3-debtcollector() { + package_python3-debtcollector +} diff --git a/mingw-w64-python-decorator/PKGBUILD b/mingw-w64-python-decorator/PKGBUILD index d86db29279..287f486460 100644 --- a/mingw-w64-python-decorator/PKGBUILD +++ b/mingw-w64-python-decorator/PKGBUILD @@ -1,48 +1,93 @@ -# Maintainer: Ryuta Suzuki +# Maintainer: J. Peter Mugaas _realname=decorator pkgbase=mingw-w64-python-${_realname} -pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}" "${MINGW_PACKAGE_PREFIX}-python2-${_realname}") -pkgver=4.3.0 -pkgrel=2 -pkgdesc="Better living through Python with decorators (mingw-w64)" +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=4.3.1 +pkgrel=1 +pkgdesc="Python Decorator module (mingw-w64)" arch=('any') +url='https://github.com/micheles/decorator' license=('BSD') -url="https://github.com/micheles/decorator" -makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools" - "${MINGW_PACKAGE_PREFIX}-python2-setuptools" - 'git') -source=("${_realname}-${pkgver}.tar.gz::https://github.com/micheles/${_realname}/archive/${pkgver}.tar.gz") -sha256sums=('049deb70d6348f665372a1c622a9fcc4e227a0c4976fe0cfd0df89594c149c4e') +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/micheles/decorator/archive/$pkgver.tar.gz" + 'LICENSE.txt') +sha512sums=('3335e45506d79851214ac6ac77f38dd1a5a8bcbc09af0fba50368c953661681a320377d72884b3e65666256b2277c26816100320a8ff38505559e6b67bc26c29' + '0a06dfb3f470b8d3b056bd4e4776df715876d04d0acc86dec536fa7cff0214ba5255833923558d1778db730d080960f31d5e12f939e761530823b6e70646b5c2') -prepare() { - cp -a ${_realname}-${pkgver}{,-py2} +# Helper macros to help make tasks easier # +apply_patch_with_msg() { + for _patch in "$@" + do + msg2 "Applying $_patch" + patch -Nbp1 -i "${srcdir}/$_patch" + done } -build() { - cd ${srcdir}/${_realname}-${pkgver} - python3 setup.py build +del_file_exists() { + for _fname in "$@" + do + if [ -f $_fname ]; then + rm -rf $_fname + fi + done +} +# =========================================== # - cd ${srcdir}/${_realname}-${pkgver}-py2 - python2 setup.py build +prepare() { + cd "${srcdir}" + 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-decorator() { depends=("${MINGW_PACKAGE_PREFIX}-python3") - cd ${_realname}-${pkgver} + cd "${srcdir}/python3-build-${CARCH}" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python3 setup.py install --root=${pkgdir} --prefix=${MINGW_PREFIX} --optimize=1 - install -D -m644 LICENSE.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 --skip-build + + install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE.txt" } package_python2-decorator() { depends=("${MINGW_PACKAGE_PREFIX}-python2") - cd ${_realname}-${pkgver}-py2 + cd "${srcdir}/python2-build-${CARCH}" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python2 setup.py install --root=${pkgdir} --prefix=${MINGW_PREFIX} --optimize=1 - install -D -m644 LICENSE.txt ${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE + ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 --skip-build + + install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE.txt" } package_mingw-w64-i686-python2-decorator() { @@ -60,5 +105,3 @@ package_mingw-w64-x86_64-python2-decorator() { package_mingw-w64-x86_64-python3-decorator() { package_python3-decorator } - -# vim:set ts=2 sw=2 et: diff --git a/mingw-w64-python-editor/PKGBUILD b/mingw-w64-python-editor/PKGBUILD new file mode 100644 index 0000000000..c61d022da1 --- /dev/null +++ b/mingw-w64-python-editor/PKGBUILD @@ -0,0 +1,110 @@ +# Maintainer: Some One +#This value is here because some python package names have capital letters +#while there is a strong preference for lowercase letters in ArchLinux and +#MSYS packages. + +_realname=editor +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=1.0.3 +pkgrel=1 +pkgdesc="Programmatically open an editor, capture the result (mingw-w64)" +arch=('any') +url='https://github.com/fmoo/python-editor' +license=('Apache') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") +options=('staticlibs' 'strip' '!debug') +source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/fmoo/python-editor/archive/${pkgver}.tar.gz) +sha256sums=('e627a2160bdf5e435dcde964cf38bae39c02cdd8da2ccf5fac313b2ca453e2a3') + +# 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}" + for builddir in python{2,3}-build-${CARCH}; do + rm -rf ${builddir} | true + cp -r "python-${_realname}-${pkgver}" "${builddir}" + done + sed 's|python|python3|' -i python3-build-${CARCH}/editor.py + sed 's|python|python2|' -i python2-build-${CARCH}/editor.py + # 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 check + done +} + +package_python3-editor() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + 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 README.md "${pkgdir}${MINGW_PREFIX}/share/doc/python3-${_realname}/README.md" +} + +package_python2-editor() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + 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 README.md "${pkgdir}${MINGW_PREFIX}/share/doc/python2-${_realname}/README.md" +} + +package_mingw-w64-i686-python2-editor() { + package_python2-editor +} + +package_mingw-w64-i686-python3-editor() { + package_python3-editor +} + +package_mingw-w64-x86_64-python2-editor() { + package_python2-editor +} + +package_mingw-w64-x86_64-python3-editor() { + package_python3-editor +} diff --git a/mingw-w64-python-eventlet/PKGBUILD b/mingw-w64-python-eventlet/PKGBUILD new file mode 100644 index 0000000000..74dff2ab8b --- /dev/null +++ b/mingw-w64-python-eventlet/PKGBUILD @@ -0,0 +1,156 @@ +# Maintainer: J. Peter Mugaas + +_realname=eventlet +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.24.1 +pkgrel=1 +pkgdesc="Highly concurrent networking library (mingw-w64)" +arch=('any') +url='http://eventlet.net/' +license=('MIT') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-greenlet" + "${MINGW_PACKAGE_PREFIX}-python3-sphinx" + "${MINGW_PACKAGE_PREFIX}-python3-monotonic" + "${MINGW_PACKAGE_PREFIX}-python2-greenlet" + "${MINGW_PACKAGE_PREFIX}-python2-sphinx" + "${MINGW_PACKAGE_PREFIX}-python2-monotonic") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-psycopg2" + "${MINGW_PACKAGE_PREFIX}-python3-nose" + "${MINGW_PACKAGE_PREFIX}-python3-pyopenssl" + "${MINGW_PACKAGE_PREFIX}-python3-httplib2" + "${MINGW_PACKAGE_PREFIX}-python3-mock" + "${MINGW_PACKAGE_PREFIX}-python3-pyzmq" + "${MINGW_PACKAGE_PREFIX}-python3-dnspython" + "${MINGW_PACKAGE_PREFIX}-python2-psycopg2" + "${MINGW_PACKAGE_PREFIX}-python2-nose" + "${MINGW_PACKAGE_PREFIX}-python2-pyopenssl" + "${MINGW_PACKAGE_PREFIX}-python2-httplib2" + "${MINGW_PACKAGE_PREFIX}-python2-mock" + "${MINGW_PACKAGE_PREFIX}-python2-pyzmq" + "${MINGW_PACKAGE_PREFIX}-python2-dnspython" + "${MINGW_PACKAGE_PREFIX}-python2-subprocess32") +options=('staticlibs' 'strip' '!debug') +source=(${_realname}-${pkgver}.tar.gz::https://github.com/eventlet/eventlet/archive/v${pkgver}.tar.gz + ${_realname}-python37-fix.patch::https://github.com/eventlet/eventlet/pull/506.patch) +sha512sums=('f5df2b64d025de136bb6c4615633d3865c460b4916a4070d65113198da42d692cea9f689a57b79a4b5539dc545cdab7d52023cfae7b3d9140c11909b4784a205' + '7f13bfc830eee11275c70e538bd55dc1dfe71482b82e44908beef421182e9046873f6eb23722b3e76455db833cc3175d6ab486e89ac6ad434f28ca30ee299636') + + +# 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}" + patch -d ${_realname}-${pkgver} -Np1 < ${_realname}-python37-fix.patch + sed -r 's|(check_idle_cpu_usage\(.*,) .*\)|\1 0.8\)|g' \ + -i ${_realname}-${pkgver}/tests/*_test.py + for builddir in python{2,3}-build-${CARCH}; do + rm -rf ${builddir} | true + cp -r "${_realname}-${pkgver}" "${builddir}" + done + sed 's|python|python2|' -i python2-build-${CARCH}/examples/* + # 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 +# SPHINXBUILD=${MINGW_PREFIX}/bin/sphinx-build.exe make -C doc text + done +} + +check() { + msg "Python ${pver} test for ${CARCH}" + cd "${srcdir}/python3-build-${CARCH}" + ${MINGW_PREFIX}/bin/nosetests -sv tests || warning "tests failed" + + msg "Python ${pver} test for ${CARCH}" + cd "${srcdir}/python3-build-${CARCH}" + ${MINGW_PREFIX}/bin/nosetests2 -sv tests || warning "tests failed" +} + +package_python3-eventlet() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-greenlet" + "${MINGW_PACKAGE_PREFIX}-python3-monotonic") + optdepends=("${MINGW_PACKAGE_PREFIX}-python3-psycopg2: non-blocking PostgreSQL support" + "${MINGW_PACKAGE_PREFIX}-python3-pyopenssl: non-blocking SSL support" + "${MINGW_PACKAGE_PREFIX}-python3-httplib2: non-blocking HTTP support" + "${MINGW_PACKAGE_PREFIX}-python3-pyzmq: non-blocking ZeroMQ support" + "${MINGW_PACKAGE_PREFIX}-python3-dnspython: non-blocking DNS support") + + 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" +# install -d "${pkgdir}${MINGW_PREFIX}/share/doc/python3-${_realname}" +# cp -r _build/text "${pkgdir}${MINGW_PREFIX}/share/doc/python3-${_realname}" +# cp -r examples "${pkgdir}${MINGW_PREFIX}/share/doc/python3-${_realname}" +} + +package_python2-eventlet() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-greenlet" + "${MINGW_PACKAGE_PREFIX}-python2-monotonic") + optdepends=("${MINGW_PACKAGE_PREFIX}-python2-psycopg2: non-blocking PostgreSQL support" + "${MINGW_PACKAGE_PREFIX}-python2-pyopenssl: non-blocking SSL support" + "${MINGW_PACKAGE_PREFIX}-python2-httplib2: non-blocking HTTP support" + "${MINGW_PACKAGE_PREFIX}-python2-pyzmq: non-blocking ZeroMQ support" + "${MINGW_PACKAGE_PREFIX}-python2-dnspython: non-blocking DNS support") + + 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" +# install -d "${pkgdir}${MINGW_PREFIX}/share/doc/python2-${_realname}" +# cp -r _build/text "${pkgdir}${MINGW_PREFIX}/share/doc/python2-${_realname}" +# cp -r examples "${pkgdir}${MINGW_PREFIX}/share/doc/python2-${_realname}" +} + +package_mingw-w64-i686-python2-eventlet() { + package_python2-eventlet +} + +package_mingw-w64-i686-python3-eventlet() { + package_python3-eventlet +} + +package_mingw-w64-x86_64-python2-eventlet() { + package_python2-eventlet +} + +package_mingw-w64-x86_64-python3-eventlet() { + package_python3-eventlet +} diff --git a/mingw-w64-python-execnet/PKGBUILD b/mingw-w64-python-execnet/PKGBUILD new file mode 100644 index 0000000000..81ebc865e5 --- /dev/null +++ b/mingw-w64-python-execnet/PKGBUILD @@ -0,0 +1,117 @@ +# Maintainer: J. Peter Mugaas . + +_realname=execnet +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=1.5.0 +pkgrel=1 +pkgdesc="Rapid multi-Python deployment (mingw-w64)" +arch=('any') +url='http://execnet.readthedocs.io/en/latest' +license=('MIT') +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/pytest-dev/execnet/archive/v$pkgver.tar.gz" + fix-metadata.patch) +sha512sums=('ca2b571fafdf8f68b3cc7a04ee326e3255828d4cde28ead65d0cef325569c3a6dee09359e525152248038de65326ffc6b75c8362f53aa5c0b3f736eb596cb2d9' + '38a15c3c076ea99a8c9b87b39649a5518ed930a50a4768a3b40818236e883fed6fa0ed5e9bdfdbd43dc1c62b5d281187818b98c24b486889c392ba7a05044fb5') + +# 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 \ + fix-metadata.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 + export PBR_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() { + msg2 "Python 3 test for ${CARCH}" + cd "${srcdir}/python3-build-${CARCH}" + local _cyp="$(cygpath -m $(pwd))" + PYTHONPATH="${_cyp}/build/lib;${PYTHONPATH}" ${MINGW_PREFIX}/bin/py.test testing || true + + msg2 "Python 2 test for ${CARCH}" + cd "${srcdir}/python2-build-${CARCH}" + local _cyp="$(cygpath -m $(pwd))" + PYTHONPATH="${_cyp}/build/lib;${PYTHONPATH}" ${MINGW_PREFIX}/bin/py.test2 testing || true +} + +package_python3-execnet() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" "${MINGW_PACKAGE_PREFIX}-python3-apipkg" ) + + 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}/COPYING" +} + +package_python2-execnet() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-python2-apipkg" ) + + 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}/COPYING" + +} + +package_mingw-w64-i686-python2-execnet() { + package_python2-execnet +} + +package_mingw-w64-i686-python3-execnet() { + package_python3-execnet +} + +package_mingw-w64-x86_64-python2-execnet() { + package_python2-execnet +} + +package_mingw-w64-x86_64-python3-execnet() { + package_python3-execnet +} diff --git a/mingw-w64-python-execnet/fix-metadata.patch b/mingw-w64-python-execnet/fix-metadata.patch new file mode 100644 index 0000000000..bb53df8355 --- /dev/null +++ b/mingw-w64-python-execnet/fix-metadata.patch @@ -0,0 +1,18 @@ +--- execnet-1.5.0/setup.py.orig 2018-08-25 16:41:48.834044000 -0400 ++++ execnet-1.5.0/setup.py 2018-08-25 16:45:44.708323700 -0400 +@@ -27,11 +27,15 @@ def main(): + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', ++ 'Programming Language :: Python :: 3.5', ++ 'Programming Language :: Python :: 3.6', ++ 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: Implementation :: PyPy', + ], + packages=['execnet', 'execnet.script'], + install_requires=['apipkg>=1.4'], + setup_requires=['setuptools_scm'], ++ python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', + ) + + diff --git a/mingw-w64-python-fasteners/PKGBUILD b/mingw-w64-python-fasteners/PKGBUILD new file mode 100644 index 0000000000..0eea5286ef --- /dev/null +++ b/mingw-w64-python-fasteners/PKGBUILD @@ -0,0 +1,103 @@ +# Maintainer: J. Peter Mugaas + +_realname=fasteners +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.14.1 +pkgrel=1 +pkgdesc="A python package that provides useful locks. (mingw-w64)" +arch=('any') +url='https://github.com/harlowja/fasteners' +license=('Apache') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python3-monotonic" + "${MINGW_PACKAGE_PREFIX}-python2-monotonic") +options=('staticlibs' 'strip' '!debug') +source=("${_realname}-${_pkgver}.tar.gz"::"https://github.com/harlowja/fasteners/archive/$pkgver.tar.gz") +sha512sums=('954d692b7f43563ba1413854c8dec2f5ff98757346c55aaa5f39e9aa777fb746bf4f9506beab6cfa149d5646db4b3de58d35bcef95e3128096c3346c9fd8015c') + +# 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}" + 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 +} + +package_python3-fasteners() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python3-monotonic") + + 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 +} + +package_python2-fasteners() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python2-monotonic") + + 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" +} + +package_mingw-w64-i686-python2-fasteners() { + package_python2-fasteners +} + +package_mingw-w64-i686-python3-fasteners() { + package_python3-fasteners +} + +package_mingw-w64-x86_64-python2-fasteners() { + package_python2-fasteners +} + +package_mingw-w64-x86_64-python3-fasteners() { + package_python3-fasteners +} diff --git a/mingw-w64-python-hacking/PKGBUILD b/mingw-w64-python-hacking/PKGBUILD new file mode 100644 index 0000000000..2f97bbed1d --- /dev/null +++ b/mingw-w64-python-hacking/PKGBUILD @@ -0,0 +1,110 @@ +# Maintainer: J. Peter Mugaas + +_realname=hacking +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=1.1.0 +pkgrel=1 +pkgdesc="OpenStack Hacking Guideline Enforcement (mingw-w64)" +arch=('any') +url='http://docs.openstack.org/developer/hacking' +license=('Apache') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") +options=('staticlibs' 'strip' '!debug') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/openstack-dev/hacking/archive/$pkgver.tar.gz") +sha512sums=('25e8fc8585b0de2c9f746a31539d2ee0b6b18685f17cac149bf8cf372d9c31d1f10ac93087d6bcc69b4d1a15b4b3c99cecbe15fe95e903c3de72aba21af32827') + +# 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}" + + sed -e 's/flake8<2.7.0,/flake8/' -e 's/==/>=/' -i hacking-$pkgver/requirements.txt + + 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 + # set version for python-pbr + export PBR_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 testr || warning "Tests failed" + done +} + +package_python3-hacking() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + 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" +} + +package_python2-hacking() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + 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" +} + +package_mingw-w64-i686-python2-hacking() { + package_python2-hacking +} + +package_mingw-w64-i686-python3-hacking() { + package_python3-hacking +} + +package_mingw-w64-x86_64-python2-hacking() { + package_python2-hacking +} + +package_mingw-w64-x86_64-python3-hacking() { + package_python3-hacking +} diff --git a/mingw-w64-python-jsonschema/PKGBUILD b/mingw-w64-python-jsonschema/PKGBUILD index 743e9d0bfa..bf986a26ea 100644 --- a/mingw-w64-python-jsonschema/PKGBUILD +++ b/mingw-w64-python-jsonschema/PKGBUILD @@ -4,13 +4,14 @@ _realname=jsonschema pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") pkgver=2.6.0 -pkgrel=3 +pkgrel=4 pkgdesc="An implementation of JSON Schema validation for Python (mingw-w64)" arch=('any') url="https://pypi.python.org/pypi/jsonschema" license=('MIT') makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" - "${MINGW_PACKAGE_PREFIX}-python3-setuptools") + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-functools32") _dtoken="58/b9/171dbb07e18c6346090a37f03c7e74410a1a56123f847efed59af260a298" source=("https://pypi.python.org/packages/${_dtoken}/${_realname}-${pkgver}.tar.gz") sha256sums=('6ff5f3180870836cae40f06fa10419f557208175f13ad7bc26caa77beb1f6e02') @@ -29,6 +30,7 @@ all_build() { package_python3-jsonschema() { local interpreter=python3 depends=("${MINGW_PACKAGE_PREFIX}-python3") + install=${_realname}3-${CARCH}.install all_build ${interpreter} @@ -42,21 +44,37 @@ package_python3-jsonschema() { package_python2-jsonschema() { local interpreter=python2 - depends=("${MINGW_PACKAGE_PREFIX}-python2") + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-functools32") + install=${_realname}2-${CARCH}.install all_build ${interpreter} install -D -m644 json/LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE - cd "${pkgdir}${MINGW_PREFIX}"/bin - for _f in *; do - mv ${_f} ${_f/%.*/}2${_f/${_f/%.*/}/} +# 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 - - local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) - for _ff in ${pkgdir}${MINGW_PREFIX}/bin/*.py; do - sed -e "s|${_mingw_prefix}|${MINGW_PREFIX}|g" -i ${_ff} + +# 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 jsonschema; 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-jsonschema() { diff --git a/mingw-w64-python-jsonschema/jsonschema2-i686.install b/mingw-w64-python-jsonschema/jsonschema2-i686.install new file mode 100644 index 0000000000..6552a6ef17 --- /dev/null +++ b/mingw-w64-python-jsonschema/jsonschema2-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it + for _it in jsonschema2; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-jsonschema/jsonschema2-x86_64.install b/mingw-w64-python-jsonschema/jsonschema2-x86_64.install new file mode 100644 index 0000000000..455d640d26 --- /dev/null +++ b/mingw-w64-python-jsonschema/jsonschema2-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in jsonschema2; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-jsonschema/jsonschema3-i686.install b/mingw-w64-python-jsonschema/jsonschema3-i686.install new file mode 100644 index 0000000000..b371b3f88f --- /dev/null +++ b/mingw-w64-python-jsonschema/jsonschema3-i686.install @@ -0,0 +1,17 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it +# "somepackage" should be replaced with the name of your .EXE w/o 2 and .exe ext +# Like this: +# For "myexe.exe", it would be "myexe" . + for _it in jsonschema; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-jsonschema/jsonschema3-x86_64.install b/mingw-w64-python-jsonschema/jsonschema3-x86_64.install new file mode 100644 index 0000000000..a1ee65af1e --- /dev/null +++ b/mingw-w64-python-jsonschema/jsonschema3-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in jsonschema; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-matplotlib/PKGBUILD b/mingw-w64-python-matplotlib/PKGBUILD index 3ee173cc52..8e4eeaafde 100644 --- a/mingw-w64-python-matplotlib/PKGBUILD +++ b/mingw-w64-python-matplotlib/PKGBUILD @@ -30,6 +30,7 @@ makedepends=( "${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" @@ -110,6 +111,7 @@ package_python2-matplotlib() { "${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" diff --git a/mingw-w64-python-monotonic/PKGBUILD b/mingw-w64-python-monotonic/PKGBUILD new file mode 100644 index 0000000000..56c6c1a19b --- /dev/null +++ b/mingw-w64-python-monotonic/PKGBUILD @@ -0,0 +1,101 @@ +# Maintainer: J. Peter Mugaas + +_realname=monotonic +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=1.5 +pkgrel=1 +pkgdesc="An implementation of time.monotonic() for Python 2 & Python 3 (mingw-w64)" +arch=('any') +url='https://github.com/atdt/monotonic' +license=('Apache') +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/atdt/monotonic/archive/$pkgver.tar.gz") +sha256sums=('d58dc86a7b0d714702be02df906d2712901efef6a16b3aafc95aaa9174e27771') + +# 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}" + 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 check + done +} + +package_python3-monotonic() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + 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 +} + +package_python2-monotonic() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + 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 +} + +package_mingw-w64-i686-python2-monotonic() { + package_python2-monotonic +} + +package_mingw-w64-i686-python3-monotonic() { + package_python3-monotonic +} + +package_mingw-w64-x86_64-python2-monotonic() { + package_python2-monotonic +} + +package_mingw-w64-x86_64-python3-monotonic() { + package_python3-monotonic +} diff --git a/mingw-w64-python-mox3/PKGBUILD b/mingw-w64-python-mox3/PKGBUILD new file mode 100644 index 0000000000..2f33388d09 --- /dev/null +++ b/mingw-w64-python-mox3/PKGBUILD @@ -0,0 +1,113 @@ +# Maintainer: J. Peter Mugaas . + +_realname=mox3 +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.26.0 +pkgrel=1 +pkgdesc="Mock object framework for Python (mingw-w64)" +arch=('any') +url='http://docs.openstack.org/developer/mox3' +license=('Apache') +makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-fixtures" + "${MINGW_PACKAGE_PREFIX}-python2-fixtures") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python-oslotest" + "${MINGW_PACKAGE_PREFIX}-python2-oslotest") +options=('staticlibs' 'strip' '!debug') +source=("${_realname}-$pkgver.tar.gz::https://github.com/openstack/mox3/archive/$pkgver.tar.gz") +sha512sums=('9d02b02fcdcf5167013054552c854642408fe4664db9d0586813fa108dc6c6ae9e737caaca695fe8c831219b258ad1e8e32825166ddf05007e02605d9a61c205') + +# 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}" + 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 + # seet version for pbr + export PBR_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() { + msg "Python 3 test for ${CARCH}" + cd "${srcdir}/python3-build-${CARCH}" + ${MINGW_PREFIX}/bin/stestr run + + msg "Python 2 test for ${CARCH}" + cd "${srcdir}/python2-build-${CARCH}" + PYTHON=python2 ${MINGW_PREFIX}/bin/stestr2 run +} + +package_python3-mox3() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-fixtures") + + 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 +} + +package_python2-mox3() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-fixtures") + + 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 +} + +package_mingw-w64-i686-python2-mox3() { + package_python2-mox3 +} + +package_mingw-w64-i686-python3-mox3() { + package_python3-mox3 +} + +package_mingw-w64-x86_64-python2-mox3() { + package_python2-mox3 +} + +package_mingw-w64-x86_64-python3-mox3() { + package_python3-mox3 +} diff --git a/mingw-w64-python-msgpack/PKGBUILD b/mingw-w64-python-msgpack/PKGBUILD new file mode 100644 index 0000000000..192791e9a4 --- /dev/null +++ b/mingw-w64-python-msgpack/PKGBUILD @@ -0,0 +1,107 @@ +# Maintainer: J. Peter Mugaas + +_realname=msgpack +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.5.6 +pkgrel=1 +pkgdesc="MessagePack serializer implementation for Python (mingw-w64)" +arch=('any') +url='https://github.com/msgpack/msgpack-python' +license=('Apache') +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}-python-$pkgver.tar.gz"::"https://github.com/msgpack/msgpack-python/archive/$pkgver.tar.gz") +sha256sums=('ee2cf2d5752031b70c3d5520c34d9c9c719f12fbe570d3980de3c1d6080f1f6f') + +# 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}" + for builddir in python{2,3}-build-${CARCH}; do + rm -rf ${builddir} | true + cp -r "msgpack-python-${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 + find "${srcdir}/python2-build-${CARCH}" -type f -exec \ + sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \; + find "${srcdir}/python3-build-${CARCH}" -type f -exec \ + sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python3,' {} \; +} + +check() { + msg "Python 3 test for ${CARCH}" + cd "${srcdir}/python3-build-${CARCH}" + PYTHONPATH=$PWD ${MINGW_PREFIX}/bin/py.test test + msg "Python 2 test for ${CARCH}" + cd "${srcdir}/python2-build-${CARCH}" + PYTHONPATH=$PWD ${MINGW_PREFIX}/bin/py.test2 test +} + +package_python3-msgpack() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + 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 +} + +package_python2-msgpack() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + 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 +} + +package_mingw-w64-i686-python2-msgpack() { + package_python2-msgpack +} + +package_mingw-w64-i686-python3-msgpack() { + package_python3-msgpack +} + +package_mingw-w64-x86_64-python2-msgpack() { + package_python2-msgpack +} + +package_mingw-w64-x86_64-python3-msgpack() { + package_python3-msgpack +} diff --git a/mingw-w64-python-netaddr/PKGBUILD b/mingw-w64-python-netaddr/PKGBUILD new file mode 100644 index 0000000000..e739d51fbb --- /dev/null +++ b/mingw-w64-python-netaddr/PKGBUILD @@ -0,0 +1,164 @@ +# Maintainer: J. Peter Mugaas . + +_realname=netaddr +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.7.19 +pkgrel=1 +pkgdesc="Pure Python network address representation and manipulation library (mingw-w64)" +arch=('any') +url='https://github.com/drkjam/netaddr' +license=('BSD') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-sphinx" + "${MINGW_PACKAGE_PREFIX}-python2-sphinx" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest" + "${MINGW_PACKAGE_PREFIX}-python2-pytest") +options=('staticlibs' 'strip' '!debug') +source=(${_realname}-${pkgver}.tar.gz::https://github.com/drkjam/${_realname}/archive/${_realname}-${pkgver}.tar.gz + fix-${pkgver}-python3.patch + pep479-return-instead-of-raise-StopIteration.patch) +sha512sums=('f07fb4de08aef4925dbc429b4ee93b25855273f083405d4e763c2fbc996ee35b09b87b10117040b073d45ac9f51512083116883ff48216e68aa1e429f83d5278' + '8db4e6cbaf03b95092561dfcf881616920da2ab45f205d8bd29f1f6e9e7681a7d591c0a52dbdb772a41cac0b42d643c2dafcad22a659524a35cb6b06dd98d38d' + 'ff4b46184cc98c360ba377a72ead48a64fd78477080c7061652f79dc44d7b6803111cee885502b7d98e08d66d440e7b9afd65faa97674b2c487a2ba78e684e9d') + + +# 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}-${_realname}-${pkgver}" + sed -r 's|#!/usr/bin/env python||g' -i netaddr/eui/ieee.py netaddr/ip/iana.py + apply_patch_with_msg "fix-${pkgver}-python3.patch" \ + "pep479-return-instead-of-raise-StopIteration.patch" + popd + for builddir in python{2,3}-build-${CARCH}; do + rm -rf ${builddir} | true + cp -r "${_realname}-${_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 + cd docs + make text +# make man + done +} + +check() { + msg "Python 2 test for ${CARCH}" + cd "${srcdir}/python2-build-${CARCH}" + LC_ALL='en_US.UTF-8' ${MINGW_PREFIX}/bin/py.test2 + msg "Python 3 test for ${CARCH}" + cd "${srcdir}/python3-build-${CARCH}" + LC_ALL='en_US.UTF-8' ${MINGW_PREFIX}/bin/py.test +} + +package_python3-netaddr() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + optdepends=("${MINGW_PACKAGE_PREFIX}-python3-ipython: netaddr interractive command support") + + #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 -Dm 644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" + install -Dm 644 README.md "${pkgdir}${MINGW_PREFIX}/share/doc/python3-${_realname}/README.md" + install -Dm 644 docs/build/text/* -t "${pkgdir}${MINGW_PREFIX}/share/doc/python3-${_realname}/" +# install -Dm 644 docs/build/man/netaddr.1 "${pkgdir}${MINGW_PREFIX}/share/man/man1/netaddr.1" + +# 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/*; do + sed -e "s|/usr/bin/env |${MINGW_PREFIX}/bin/|g" \ + -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_f} + done +#### end section #### +} + +package_python2-netaddr() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + optdepends=("${MINGW_PACKAGE_PREFIX}-python3-ipython: netaddr interractive command supprt") + 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 -Dm 644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" + install -Dm 644 README.md "${pkgdir}${MINGW_PREFIX}/share/doc/python2-${_realname}/README.md" + install -Dm 644 docs/build/text/* -t "${pkgdir}${MINGW_PREFIX}/share/doc/python2-${_realname}/" +# install -Dm 644 docs/build/man/netaddr.1 "${pkgdir}${MINGW_PREFIX}/share/man/man1/netaddr.1" + +# 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/*; do + sed -e "s|python[^3]|python|" \ + -e "s|/usr/bin/env |${MINGW_PREFIX}/bin/|g" \ + -e "s|${PREFIX_WIN}|${MINGW_PREFIX}/|g" -i ${_f} + done + + for f in netaddr; do + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2} + done +#### end section #### +} + +package_mingw-w64-i686-python2-netaddr() { + package_python2-netaddr +} + +package_mingw-w64-i686-python3-netaddr() { + package_python3-netaddr +} + +package_mingw-w64-x86_64-python2-netaddr() { + package_python2-netaddr +} + +package_mingw-w64-x86_64-python3-netaddr() { + package_python3-netaddr +} diff --git a/mingw-w64-python-netaddr/fix-0.7.19-python3.patch b/mingw-w64-python-netaddr/fix-0.7.19-python3.patch new file mode 100644 index 0000000000..489d1d1776 --- /dev/null +++ b/mingw-w64-python-netaddr/fix-0.7.19-python3.patch @@ -0,0 +1,50 @@ +From 2ab73f10be7069c9412e853d2d0caf29bd624012 Mon Sep 17 00:00:00 2001 +From: David Moss +Date: Mon, 16 Jan 2017 22:17:16 +0000 +Subject: [PATCH] - fixed broken tests in issue #149 (python 3 regression in + 0.7.19) - only affects test suite + +--- + netaddr/tests/eui/test_ieee_parsers.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/netaddr/tests/eui/test_ieee_parsers.py b/netaddr/tests/eui/test_ieee_parsers.py +index 7877f09..81f1faa 100644 +--- a/netaddr/tests/eui/test_ieee_parsers.py ++++ b/netaddr/tests/eui/test_ieee_parsers.py +@@ -12,7 +12,7 @@ + def test_oui_parser_py2(): + from cStringIO import StringIO + outfile = StringIO() +- with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt')) as infile: ++ with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt'), 'rb') as infile: + iab_parser = OUIIndexParser(infile) + iab_parser.attach(FileIndexer(outfile)) + iab_parser.parse() +@@ -23,7 +23,7 @@ def test_oui_parser_py2(): + def test_iab_parser_py2(): + from cStringIO import StringIO + outfile = StringIO() +- with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt')) as infile: ++ with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt'), 'rb') as infile: + iab_parser = IABIndexParser(infile) + iab_parser.attach(FileIndexer(outfile)) + iab_parser.parse() +@@ -34,7 +34,7 @@ def test_iab_parser_py2(): + def test_oui_parser_py3(): + from io import StringIO + outfile = StringIO() +- with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt')) as infile: ++ with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt'), 'rb') as infile: + iab_parser = OUIIndexParser(infile) + iab_parser.attach(FileIndexer(outfile)) + iab_parser.parse() +@@ -45,7 +45,7 @@ def test_oui_parser_py3(): + def test_iab_parser_py3(): + from io import StringIO + outfile = StringIO() +- with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt')) as infile: ++ with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt'), 'rb') as infile: + iab_parser = IABIndexParser(infile) + iab_parser.attach(FileIndexer(outfile)) + iab_parser.parse() diff --git a/mingw-w64-python-netaddr/netaddr2-i686.install b/mingw-w64-python-netaddr/netaddr2-i686.install new file mode 100644 index 0000000000..3c3bccc383 --- /dev/null +++ b/mingw-w64-python-netaddr/netaddr2-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it + for _it in netaddr2; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-netaddr/netaddr2-x86_64.install b/mingw-w64-python-netaddr/netaddr2-x86_64.install new file mode 100644 index 0000000000..b7da18ee21 --- /dev/null +++ b/mingw-w64-python-netaddr/netaddr2-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in netaddr2; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-netaddr/netaddr3-i686.install b/mingw-w64-python-netaddr/netaddr3-i686.install new file mode 100644 index 0000000000..415ded5ca3 --- /dev/null +++ b/mingw-w64-python-netaddr/netaddr3-i686.install @@ -0,0 +1,17 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it +# "somepackage" should be replaced with the name of your .EXE w/o 2 and .exe ext +# Like this: +# For "myexe.exe", it would be "myexe" . + for _it in netaddr; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-netaddr/netaddr3-x86_64.install b/mingw-w64-python-netaddr/netaddr3-x86_64.install new file mode 100644 index 0000000000..0d042e2951 --- /dev/null +++ b/mingw-w64-python-netaddr/netaddr3-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in netaddr; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-netaddr/pep479-return-instead-of-raise-StopIteration.patch b/mingw-w64-python-netaddr/pep479-return-instead-of-raise-StopIteration.patch new file mode 100644 index 0000000000..969bdf7244 --- /dev/null +++ b/mingw-w64-python-netaddr/pep479-return-instead-of-raise-StopIteration.patch @@ -0,0 +1,23 @@ +From 292e2fd4b52409eab05149b0d63e0291bec3786a Mon Sep 17 00:00:00 2001 +From: Sergey Kozlov +Date: Mon, 11 Dec 2017 17:04:20 +0100 +Subject: [PATCH] PEP 479: 'return' instead of 'raise StopIteration'. + +Fro details please visit https://www.python.org/dev/peps/pep-0479/ +--- + netaddr/ip/__init__.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/netaddr/ip/__init__.py b/netaddr/ip/__init__.py +index 489badf..ecf72d0 100644 +--- a/netaddr/ip/__init__.py ++++ b/netaddr/ip/__init__.py +@@ -1258,7 +1258,7 @@ def subnet(self, prefixlen, count=None, fmt=None): + + if not self.prefixlen <= prefixlen: + # Don't return anything. +- raise StopIteration ++ return + + # Calculate number of subnets to be returned. + width = self._module.width diff --git a/mingw-w64-python-netifaces/PKGBUILD b/mingw-w64-python-netifaces/PKGBUILD new file mode 100644 index 0000000000..e700ecbb91 --- /dev/null +++ b/mingw-w64-python-netifaces/PKGBUILD @@ -0,0 +1,111 @@ +# Maintainer: J. Peter Mugaas + +_realname=netifaces +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.10.7 +pkgrel=1 +pkgdesc="Portable module to access network interface information in Python (mingw-w64)" +arch=('any') +url='http://alastairs-place.net/netifaces/' +license=('MIT') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") +options=('staticlibs' 'strip' '!debug') +source=("https://pypi.io/packages/source/n/netifaces/netifaces-${pkgver}.tar.gz") +sha512sums=('d97433345a29ae540e40d5fe9e50c10e8b30197bb0b798f55c82236f20dc6f463604ed202b361cdfcb5e0c95998c87acc781a808c0198ec0479089e13a7fdbed') + +# 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 check + done +} + +package_python3-netifaces() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + 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 license, that is inside the readme file + install -Dm644 README.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE" +} + +package_python2-netifaces() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + 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 license, that is inside the readme file + install -Dm644 README.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE" +} + +package_mingw-w64-i686-python2-netifaces() { + package_python2-netifaces +} + +package_mingw-w64-i686-python3-netifaces() { + package_python3-netifaces +} + +package_mingw-w64-x86_64-python2-netifaces() { + package_python2-netifaces +} + +package_mingw-w64-x86_64-python3-netifaces() { + package_python3-netifaces +} diff --git a/mingw-w64-python-nose/PKGBUILD b/mingw-w64-python-nose/PKGBUILD index 1ce2f938da..6d1be17aea 100644 --- a/mingw-w64-python-nose/PKGBUILD +++ b/mingw-w64-python-nose/PKGBUILD @@ -5,7 +5,7 @@ _realname=nose pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") pkgver=1.3.7 -pkgrel=7 +pkgrel=8 pkgdesc="A discovery-based unittest extension (mingw-w64)" arch=('any') license=('LGPL-2.1') @@ -39,7 +39,14 @@ package_python3-nose() { 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}" -O1 + ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 + + 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 f in nosetests; do mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,3}.exe @@ -50,28 +57,25 @@ package_python3-nose() { mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,3}-script.py done -# rm -f ${pkgdir}${MINGW_PREFIX}/bin/nosetests{.exe,-script.py,.exe.manifest} - # fix python command in files - for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do - sed -e "s|${_mingw_prefix}|${MINGW_PREFIX}|g" -i ${_f} - done rm -rf "${pkgdir}${MINGW_PREFIX}/share" } package_python2-nose() { depends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools") - local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) 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}" -O1 +### 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|${_mingw_prefix}|${MINGW_PREFIX}|g" -i ${_f} + sed -e "s|/usr/bin/env |${MINGW_PREFIX}|g" \ + -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_f} done - #Create an alias so we could do nose tests in a loop with python major versions. + for f in nosetests; do cp "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2}.exe if [ -f "${pkgdir}${MINGW_PREFIX}"/bin/${f}.exe.manifest ]; then diff --git a/mingw-w64-python-oslo-concurrency/PKGBUILD b/mingw-w64-python-oslo-concurrency/PKGBUILD new file mode 100644 index 0000000000..d1c62074de --- /dev/null +++ b/mingw-w64-python-oslo-concurrency/PKGBUILD @@ -0,0 +1,183 @@ +# Maintainer: J. Peter Mugaas + +_realname=oslo-concurrency +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=3.27.0 +pkgrel=1 +pkgdesc="OpenStack library for all concurrency-related code (mingw-w64)" +arch=('any') +url='https://pypi.python.org/pypi/oslo.concurrency/3.27.0' +license=('Apache') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-config" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-config" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-utils" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-utils" + "${MINGW_PACKAGE_PREFIX}-python3-fasteners" + "${MINGW_PACKAGE_PREFIX}-python2-fasteners" + "${MINGW_PACKAGE_PREFIX}-python2-enum34") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-mock" + "${MINGW_PACKAGE_PREFIX}-python2-mock" + "${MINGW_PACKAGE_PREFIX}-python3-oslotest" + "${MINGW_PACKAGE_PREFIX}-python2-oslotest" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-config" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-config" + "${MINGW_PACKAGE_PREFIX}-python3-eventlet" + "${MINGW_PACKAGE_PREFIX}-python2-eventlet" + "${MINGW_PACKAGE_PREFIX}-python3-testrepository" + "${MINGW_PACKAGE_PREFIX}-python2-testrepository") +options=('staticlibs' 'strip' '!debug') +source=("${pkgver}-$pkgver.tar.gz::https://github.com/openstack/oslo.concurrency/archive/$pkgver.tar.gz") +sha512sums=('9b17243e18e3550c8251de02d37e650feea390dcd70573b2fe0a74af66ccaea199e3cc4b53f2b8e3d774d825118ef6f67cd23842b2f683f51ef1d6d4d39fe175') + +# 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}" + for builddir in python{2,3}-build-${CARCH}; do + rm -rf ${builddir} | true + cp -r "oslo.concurrency-${pkgver}" "${builddir}" + done + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver + + export PBR_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 testr || warning "Tests failed" + done +} + +package_python3-oslo-concurrency() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-config" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-utils" + "${MINGW_PACKAGE_PREFIX}-python3-fasteners") + #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-oslo-concurrency() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-config" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-utils" + "${MINGW_PACKAGE_PREFIX}-python2-fasteners" + "${MINGW_PACKAGE_PREFIX}-python2-enum34") + #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 lockutils-wrapper; 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-oslo-concurrency() { + package_python2-oslo-concurrency +} + +package_mingw-w64-i686-python3-oslo-concurrency() { + package_python3-oslo-concurrency +} + +package_mingw-w64-x86_64-python2-oslo-concurrency() { + package_python2-oslo-concurrency +} + +package_mingw-w64-x86_64-python3-oslo-concurrency() { + package_python3-oslo-concurrency +} diff --git a/mingw-w64-python-oslo-concurrency/oslo-concurrency2-i686.install b/mingw-w64-python-oslo-concurrency/oslo-concurrency2-i686.install new file mode 100644 index 0000000000..3b74cda445 --- /dev/null +++ b/mingw-w64-python-oslo-concurrency/oslo-concurrency2-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it + for _it in lockutils-wrapper2; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-oslo-concurrency/oslo-concurrency2-x86_64.install b/mingw-w64-python-oslo-concurrency/oslo-concurrency2-x86_64.install new file mode 100644 index 0000000000..b49bdc096e --- /dev/null +++ b/mingw-w64-python-oslo-concurrency/oslo-concurrency2-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in lockutils-wrapper2; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-oslo-concurrency/oslo-concurrency3-i686.install b/mingw-w64-python-oslo-concurrency/oslo-concurrency3-i686.install new file mode 100644 index 0000000000..8af5cf6239 --- /dev/null +++ b/mingw-w64-python-oslo-concurrency/oslo-concurrency3-i686.install @@ -0,0 +1,17 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it +# "somepackage" should be replaced with the name of your .EXE w/o 2 and .exe ext +# Like this: +# For "myexe.exe", it would be "myexe" . + for _it in lockutils-wrapper; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-oslo-concurrency/oslo-concurrency3-x86_64.install b/mingw-w64-python-oslo-concurrency/oslo-concurrency3-x86_64.install new file mode 100644 index 0000000000..a06ce6f97b --- /dev/null +++ b/mingw-w64-python-oslo-concurrency/oslo-concurrency3-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in lockutils-wrapper; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-oslo-config/PKGBUILD b/mingw-w64-python-oslo-config/PKGBUILD new file mode 100644 index 0000000000..a84ea59c43 --- /dev/null +++ b/mingw-w64-python-oslo-config/PKGBUILD @@ -0,0 +1,189 @@ +# Maintainer: J. Peter Mugaas + +_realname=oslo-config +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=6.4.0 +pkgrel=1 +pkgdesc="parsing command line arguments and .ini style configuration files (mingw-w64)" +arch=('any') +url="https://pypi.python.org/pypi/oslo.config/$pkgver" +license=('Apache') +makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-netaddr" + "${MINGW_PACKAGE_PREFIX}-python2-netaddr" + "${MINGW_PACKAGE_PREFIX}-python3-stevedore" + "${MINGW_PACKAGE_PREFIX}-python2-stevedore" + "${MINGW_PACKAGE_PREFIX}-python3-debtcollector" + "${MINGW_PACKAGE_PREFIX}-python2-debtcollector" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python3-rfc3986" + "${MINGW_PACKAGE_PREFIX}-python2-rfc3986" + "${MINGW_PACKAGE_PREFIX}-python3-yaml" + "${MINGW_PACKAGE_PREFIX}-python2-yaml" + "${MINGW_PACKAGE_PREFIX}-python2-enum34") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-oslotest" + "${MINGW_PACKAGE_PREFIX}-python2-oslotest" + "${MINGW_PACKAGE_PREFIX}-python3-sphinx" + "${MINGW_PACKAGE_PREFIX}-python2-sphinx" + "${MINGW_PACKAGE_PREFIX}-python3-testrepository" + "${MINGW_PACKAGE_PREFIX}-python2-testrepository" + "${MINGW_PACKAGE_PREFIX}-python3-requests-mock" + "${MINGW_PACKAGE_PREFIX}-python2-requests-mock" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-log" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-log") +options=('staticlibs' 'strip' '!debug') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/openstack/oslo.config/archive/$pkgver.tar.gz") +sha512sums=('ed3160a6fa743a13dc8549ae3bf2d4c51e6aeb1a5221a3772332ba206f65a9f78a7404464f8703d2b0630cb91643459c86c12b1fc239b4479374fb98c2cdeb45') + +# 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}" + sed -i '/argparse/d' oslo.config-$pkgver/requirements.txt + + for builddir in python{2,3}-build-${CARCH}; do + rm -rf ${builddir} | true + cp -r "oslo.config-${pkgver}" "${builddir}" + done +# find python2-build-${CARCH} -name \*.py -exec sed -i '1s/python$/&2/' {} + +# find python3-build-${CARCH} -name \*.py -exec sed -i '1s/python$/&2/' {} + + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver + + export PBR_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 testr + done +} + +package_python3-oslo-config() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python3-netaddr" + "${MINGW_PACKAGE_PREFIX}-python3-stevedore" + "${MINGW_PACKAGE_PREFIX}-python3-debtcollector" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python3-rfc3986" + "${MINGW_PACKAGE_PREFIX}-python3-yaml") + #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-oslo-config() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python2-netaddr" + "${MINGW_PACKAGE_PREFIX}-python2-stevedore" + "${MINGW_PACKAGE_PREFIX}-python2-debtcollector" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python2-rfc3986" + "${MINGW_PACKAGE_PREFIX}-python2-yaml" + "${MINGW_PACKAGE_PREFIX}-python2-enum34") + #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 oslo-config-generator; 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-oslo-config() { + package_python2-oslo-config +} + +package_mingw-w64-i686-python3-oslo-config() { + package_python3-oslo-config +} + +package_mingw-w64-x86_64-python2-oslo-config() { + package_python2-oslo-config +} + +package_mingw-w64-x86_64-python3-oslo-config() { + package_python3-oslo-config +} diff --git a/mingw-w64-python-oslo-config/oslo-config2-i686.install b/mingw-w64-python-oslo-config/oslo-config2-i686.install new file mode 100644 index 0000000000..c8b817908e --- /dev/null +++ b/mingw-w64-python-oslo-config/oslo-config2-i686.install @@ -0,0 +1,17 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it +# "somepackage" should be replaced with the name of your .EXE w/o 2 and .exe ext +# Like this: +# For "myexe2.exe", it would be "myexe2" . + for _it in oslo-config-generator2; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-oslo-config/oslo-config2-x86_64.install b/mingw-w64-python-oslo-config/oslo-config2-x86_64.install new file mode 100644 index 0000000000..fe88d92f6b --- /dev/null +++ b/mingw-w64-python-oslo-config/oslo-config2-x86_64.install @@ -0,0 +1,17 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it +# "somepackage" should be replaced with the name of your .EXE w/o 2 and .exe ext +# Like this: +# For "myexe2.exe", it would be "myexe2" . + for _it in oslo-config-generator2; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-oslo-config/oslo-config3-i686.install b/mingw-w64-python-oslo-config/oslo-config3-i686.install new file mode 100644 index 0000000000..86551af97c --- /dev/null +++ b/mingw-w64-python-oslo-config/oslo-config3-i686.install @@ -0,0 +1,17 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it +# "somepackage" should be replaced with the name of your .EXE w/o 2 and .exe ext +# Like this: +# For "myexe.exe", it would be "myexe" . + for _it in oslo-config-generator; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-oslo-config/oslo-config3-x86_64.install b/mingw-w64-python-oslo-config/oslo-config3-x86_64.install new file mode 100644 index 0000000000..2d44b0c9d0 --- /dev/null +++ b/mingw-w64-python-oslo-config/oslo-config3-x86_64.install @@ -0,0 +1,17 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it +# "somepackage" should be replaced with the name of your .EXE w/o 2 and .exe ext +# Like this: +# For "myexe.exe", it would be "myexe" . + for _it in oslo-config-generator; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-oslo-context/PKGBUILD b/mingw-w64-python-oslo-context/PKGBUILD new file mode 100644 index 0000000000..da85531e8e --- /dev/null +++ b/mingw-w64-python-oslo-context/PKGBUILD @@ -0,0 +1,123 @@ +# Maintainer: J. Peter Mugaas + +_realname=oslo-context +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=2.21.0 +pkgrel=1 +pkgdesc="OpenStack Context library (mingw-w64)" +arch=('any') +url="https://pypi.python.org/pypi/oslo.context/$pkgver" +license=('Apache') +makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-debtcollector" + "${MINGW_PACKAGE_PREFIX}-python2-debtcollector") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-mock" + "${MINGW_PACKAGE_PREFIX}-python2-mock" + "${MINGW_PACKAGE_PREFIX}-python3-oslotest" + "${MINGW_PACKAGE_PREFIX}-python2-oslotest" + "${MINGW_PACKAGE_PREFIX}-python3-testrepository" + "${MINGW_PACKAGE_PREFIX}-python2-testrepository") +options=('staticlibs' 'strip' '!debug') +source=("${_realname}-$pkgver.tar.gz"::"https://github.com/openstack/oslo.context/archive/$pkgver.tar.gz") +sha512sums=('af8943894134bcf7ce533f91a4dffe5d7347225fe4b58506d18b702df580073575a50e93fda9a632d445beb0f23a2dda42b7c58c1be5d786ab1420afe93b05dd') + +# 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 "oslo.context-${pkgver}" "${builddir}" + done + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver + # Set version for python-pbr + export PBR_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}" + PYTHON=python${pver} ${MINGW_PREFIX}/bin/python${pver} setup.py testr || warning "Tests failed" + done +} + +package_python3-oslo-context() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-debtcollector") + + 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" +} + +package_python2-oslo-context() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-debtcollector") + + 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" +} + +package_mingw-w64-i686-python2-oslo-context() { + package_python2-oslo-context +} + +package_mingw-w64-i686-python3-oslo-context() { + package_python3-oslo-context +} + +package_mingw-w64-x86_64-python2-oslo-context() { + package_python2-oslo-context +} + +package_mingw-w64-x86_64-python3-oslo-context() { + package_python3-oslo-context +} diff --git a/mingw-w64-python-oslo-db/PKGBUILD b/mingw-w64-python-oslo-db/PKGBUILD new file mode 100644 index 0000000000..60fed57be5 --- /dev/null +++ b/mingw-w64-python-oslo-db/PKGBUILD @@ -0,0 +1,162 @@ +# Maintainer: Some One +#This value is here because some python package names have capital letters +#while there is a strong preference for lowercase letters in ArchLinux and +#MSYS packages. + +_realname=oslo-db +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=4.40.0 +pkgrel=1 +pkgdesc="OpenStack Database Pattern Library (mingw-w64)" +arch=('any') +url='https://pypi.python.org/pypi/oslo.db/4.40.0' +license=('LICENSE') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-alembic" + "${MINGW_PACKAGE_PREFIX}-python2-alembic" + "${MINGW_PACKAGE_PREFIX}-python3-debtcollector" + "${MINGW_PACKAGE_PREFIX}-python2-debtcollector" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-config" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-config" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-utils" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-utils" + "${MINGW_PACKAGE_PREFIX}-python3-sqlalchemy" + "${MINGW_PACKAGE_PREFIX}-python2-sqlalchemy" + "${MINGW_PACKAGE_PREFIX}-python3-sqlalchemy-migrate" + "${MINGW_PACKAGE_PREFIX}-python2-sqlalchemy-migrate" + "${MINGW_PACKAGE_PREFIX}-python3-stevedore" + "${MINGW_PACKAGE_PREFIX}-python2-stevedore") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-mock" + "${MINGW_PACKAGE_PREFIX}-python2-mock" + "${MINGW_PACKAGE_PREFIX}-python3-testrepository" + "${MINGW_PACKAGE_PREFIX}-python2-testrepository" + "${MINGW_PACKAGE_PREFIX}-python3-testresources" + "${MINGW_PACKAGE_PREFIX}-python2-testresources" + "${MINGW_PACKAGE_PREFIX}-python3-oslotest" + "${MINGW_PACKAGE_PREFIX}-python2-oslotest" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-context" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-context" + "${MINGW_PACKAGE_PREFIX}-python2-unittest2") +options=('staticlibs' 'strip' '!debug') +source=("${_realname}-$pkgver.tar.gz"::"https://github.com/openstack/oslo.db/archive/$pkgver.tar.gz") +sha512sums=('47bde2fea3f7603e0052fe4ab649f93887f68f6425057e7e732092ed1f72a0b9917afbf9eab1bce92a40e6292fa64562ee117074744619126a794237627fb0b5') + +# 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 "oslo.db-${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 "oslo.db-${pkgver}" "${builddir}" + done + sed -i 's/import unittest2/import unittest as unittest2/' python3-build-${CARCH}/oslo_db/tests/sqlalchemy/test_async_eventlet.py + + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver + # set version for PBR + export PBR_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}" + PYTHON=python${pver} ${MINGW_PREFIX}/bin/python${pver} setup.py testr || warning "tests failed" + done +} + +package_python3-oslo-db() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-alembic" + "${MINGW_PACKAGE_PREFIX}-python3-debtcollector" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-config" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-utils" + "${MINGW_PACKAGE_PREFIX}-python3-sqlalchemy" + "${MINGW_PACKAGE_PREFIX}-python3-sqlalchemy-migrate" + "${MINGW_PACKAGE_PREFIX}-python3-stevedore") + + 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 + +} + +package_python2-oslo-db() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-alembic" + "${MINGW_PACKAGE_PREFIX}-python2-debtcollector" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-config" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-utils" + "${MINGW_PACKAGE_PREFIX}-python2-sqlalchemy" + "${MINGW_PACKAGE_PREFIX}-python2-sqlalchemy-migrate" + "${MINGW_PACKAGE_PREFIX}-python2-stevedore") + + 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 +} + +package_mingw-w64-i686-python2-oslo-db() { + package_python2-oslo-db +} + +package_mingw-w64-i686-python3-oslo-db() { + package_python3-oslo-db +} + +package_mingw-w64-x86_64-python2-oslo-db() { + package_python2-oslo-db +} + +package_mingw-w64-x86_64-python3-oslo-db() { + package_python3-oslo-db +} diff --git a/mingw-w64-python-oslo-i18n/PKGBUILD b/mingw-w64-python-oslo-i18n/PKGBUILD new file mode 100644 index 0000000000..770ab64919 --- /dev/null +++ b/mingw-w64-python-oslo-i18n/PKGBUILD @@ -0,0 +1,119 @@ +# Maintainer: J. Peter Mugaas + +_realname=oslo-i18n +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=3.21.0 +pkgrel=1 +pkgdesc="Oslo i18n library (mingw-w64)" +arch=('any') +url='https://pypi.python.org/pypi/oslo.i18n/3.21.0' +license=('Apache') +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/openstack/oslo.i18n/archive/$pkgver.tar.gz") +sha512sums=('e6335b700280bc4b6f6484a08b006735b4a178236d62f3e857fe1d59bd60fc03627282d5ec748a1ba09a4b44a58d29e0b2523cf01fddcc328b50e3f0685347e7') + +# 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 "oslo.i18n-${pkgver}" "${builddir}" + done + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver + # Set version for python_pbr + export PBR_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 check + + cd "${srcdir}/python3-build-${CARCH}" +# ${MINGW_PREFIX}/bin/stestr run + + cd "${srcdir}/python2-build-${CARCH}" +# PYTHON=python2 ${MINGW_PREFIX}/bin/stestr2 run + done +} + +package_python3-oslo-i18n() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-babel") + + 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 +} + +package_python2-oslo-i18n() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-babel") + + 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 +} + +package_mingw-w64-i686-python2-oslo-i18n() { + package_python2-oslo-i18n +} + +package_mingw-w64-i686-python3-oslo-i18n() { + package_python3-oslo-i18n +} + +package_mingw-w64-x86_64-python2-oslo-i18n() { + package_python2-oslo-i18n +} + +package_mingw-w64-x86_64-python3-oslo-i18n() { + package_python3-oslo-i18n +} diff --git a/mingw-w64-python-oslo-log/PKGBUILD b/mingw-w64-python-oslo-log/PKGBUILD new file mode 100644 index 0000000000..b4e0b54e7c --- /dev/null +++ b/mingw-w64-python-oslo-log/PKGBUILD @@ -0,0 +1,180 @@ +# Maintainer: J. Peter Mugaas + +_realname=oslo-log +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=3.39.0 +pkgrel=1 +pkgdesc="Oslo Logging Library (mingw-w64)" +arch=('any') +url='https://pypi.python.org/pypi/oslo.log/3.39.0' +license=('Apache') +makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-config" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-config" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-context" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-context" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-utils" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-utils" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-serialization" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-serialization" + "${MINGW_PACKAGE_PREFIX}-python3-debtcollector" + "${MINGW_PACKAGE_PREFIX}-python2-debtcollector" + "${MINGW_PACKAGE_PREFIX}-python3-dateutil" + "${MINGW_PACKAGE_PREFIX}-python2-dateutil" + "${MINGW_PACKAGE_PREFIX}-python3-monotonic" + "${MINGW_PACKAGE_PREFIX}-python2-monotonic") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-mock" + "${MINGW_PACKAGE_PREFIX}-python2-mock" + "${MINGW_PACKAGE_PREFIX}-python3-oslotest" + "${MINGW_PACKAGE_PREFIX}-python2-oslotest" + "${MINGW_PACKAGE_PREFIX}-python3-testrepository" + "${MINGW_PACKAGE_PREFIX}-python2-testrepository") +options=('staticlibs' 'strip' '!debug') +source=("${_realname}-$pkgver.tar.gz"::"https://github.com/openstack/oslo.log/archive/$pkgver.tar.gz") +sha512sums=('ce8451d857ce3e85dbb61fccad6a9a96cc5e99d0fdc34f7d1126d04fade65dace1c78104996caf485d381b375a6799a51bcc760da351cf0176b30d3c79d7c506') + +# 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}" + sed -i 's/unittest2/unittest/g' oslo.log-$pkgver/oslo_log/tests/unit/*.py + for builddir in python{2,3}-build-${CARCH}; do + rm -rf ${builddir} | true + cp -r "oslo.log-${pkgver}" "${builddir}" + done + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver + + export PBR_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 testr || warning "Tests failed" + done +} + +package_python3-oslo-log() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-config" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-context" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-utils" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-serialization" + "${MINGW_PACKAGE_PREFIX}-python3-debtcollector" + "${MINGW_PACKAGE_PREFIX}-python3-dateutil" + "${MINGW_PACKAGE_PREFIX}-python3-monotonic") + install=${_realname}2-${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 +# 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-oslo-log() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-config" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-context" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-utils" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-serialization" + "${MINGW_PACKAGE_PREFIX}-python2-debtcollector" + "${MINGW_PACKAGE_PREFIX}-python2-dateutil" + "${MINGW_PACKAGE_PREFIX}-python2-monotonic") + 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 +# 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 convert-json; 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-oslo-log() { + package_python2-oslo-log +} + +package_mingw-w64-i686-python3-oslo-log() { + package_python3-oslo-log +} + +package_mingw-w64-x86_64-python2-oslo-log() { + package_python2-oslo-log +} + +package_mingw-w64-x86_64-python3-oslo-log() { + package_python3-oslo-log +} diff --git a/mingw-w64-python-oslo-log/oslo-log2-i686.install b/mingw-w64-python-oslo-log/oslo-log2-i686.install new file mode 100644 index 0000000000..e559127b2d --- /dev/null +++ b/mingw-w64-python-oslo-log/oslo-log2-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it + for _it in convert-json2; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-oslo-log/oslo-log2-x86_64.install b/mingw-w64-python-oslo-log/oslo-log2-x86_64.install new file mode 100644 index 0000000000..5e9cd7b813 --- /dev/null +++ b/mingw-w64-python-oslo-log/oslo-log2-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in convert-json2; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-oslo-log/oslo-log3-i686.install b/mingw-w64-python-oslo-log/oslo-log3-i686.install new file mode 100644 index 0000000000..57d0604e65 --- /dev/null +++ b/mingw-w64-python-oslo-log/oslo-log3-i686.install @@ -0,0 +1,17 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it +# "somepackage" should be replaced with the name of your .EXE w/o 2 and .exe ext +# Like this: +# For "myexe.exe", it would be "myexe" . + for _it in convert-json; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-oslo-log/oslo-log3-x86_64.install b/mingw-w64-python-oslo-log/oslo-log3-x86_64.install new file mode 100644 index 0000000000..cc327f970f --- /dev/null +++ b/mingw-w64-python-oslo-log/oslo-log3-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in convert-json; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-oslo-serialization/PKGBUILD b/mingw-w64-python-oslo-serialization/PKGBUILD new file mode 100644 index 0000000000..23d445b214 --- /dev/null +++ b/mingw-w64-python-oslo-serialization/PKGBUILD @@ -0,0 +1,131 @@ +# Maintainer: J. Peter Mugaas + +_realname=oslo-serialization +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=2.27.0 +pkgrel=1 +pkgdesc="Oslo Serialization library (mingw-w64)" +arch=('any') +url='http://docs.openstack.org/developer/oslo.serialization' +license=('Apache') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-babel" + "${MINGW_PACKAGE_PREFIX}-python2-babel" + "${MINGW_PACKAGE_PREFIX}-python3-msgpack" + "${MINGW_PACKAGE_PREFIX}-python2-msgpack" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-utils" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-utils" + "${MINGW_PACKAGE_PREFIX}-python3-pytz" + "${MINGW_PACKAGE_PREFIX}-python2-pytz") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-oslotest" + "${MINGW_PACKAGE_PREFIX}-python2-oslotest" + "${MINGW_PACKAGE_PREFIX}-python2-ipaddress" + "${MINGW_PACKAGE_PREFIX}-python3-testrepository" + "${MINGW_PACKAGE_PREFIX}-python2-testrepository") +options=('staticlibs' 'strip' '!debug') +source=("${_realname}-$pkgver.tar.gz"::"https://github.com/openstack/oslo.serialization/archive/$pkgver.tar.gz") +sha512sums=('46cec3ad6b2bf256484539d38cb38dc71c234e8101be08416ea8c6253f388014904faf81254d768fc27f6611bf0e9e03f580c0c7dc9187a2db3debf9075ecee1') + +# 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}" + for builddir in python{2,3}-build-${CARCH}; do + rm -rf ${builddir} | true + cp -r "oslo.serialization-${pkgver}" "${builddir}" + done + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver + # set version for pbr + export PBR_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 testr || warning "Tests failed" + done +} + +package_python3-oslo-serialization() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-babel" + "${MINGW_PACKAGE_PREFIX}-python3-msgpack" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-utils" + "${MINGW_PACKAGE_PREFIX}-python3-pytz") + + 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 + +} + +package_python2-oslo-serialization() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-babel" + "${MINGW_PACKAGE_PREFIX}-python2-msgpack" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-utils" + "${MINGW_PACKAGE_PREFIX}-python2-pytz") + + 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 +} + +package_mingw-w64-i686-python2-oslo-serialization() { + package_python2-oslo-serialization +} + +package_mingw-w64-i686-python3-oslo-serialization() { + package_python3-oslo-serialization +} + +package_mingw-w64-x86_64-python2-oslo-serialization() { + package_python2-oslo-serialization +} + +package_mingw-w64-x86_64-python3-oslo-serialization() { + package_python3-oslo-serialization +} diff --git a/mingw-w64-python-oslo-utils/PKGBUILD b/mingw-w64-python-oslo-utils/PKGBUILD new file mode 100644 index 0000000000..648a5e39d4 --- /dev/null +++ b/mingw-w64-python-oslo-utils/PKGBUILD @@ -0,0 +1,139 @@ +# Maintainer: J. Peter Mugaas + +_realname=oslo-utils +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=3.36.4 +pkgrel=1 +pkgdesc="Oslo Utility library (mingw-w64)" +arch=('any') +url='https://www.oslo-utils.org/' +license=('Apache') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") +makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-funcsigs" + "${MINGW_PACKAGE_PREFIX}-python3-iso8601" + "${MINGW_PACKAGE_PREFIX}-python2-iso8601" + "${MINGW_PACKAGE_PREFIX}-python3-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python2-oslo-i18n" + "${MINGW_PACKAGE_PREFIX}-python2-monotonic" + "${MINGW_PACKAGE_PREFIX}-python3-pytz" + "${MINGW_PACKAGE_PREFIX}-python2-pytz" + "${MINGW_PACKAGE_PREFIX}-python3-netaddr" + "${MINGW_PACKAGE_PREFIX}-python2-netaddr" + "${MINGW_PACKAGE_PREFIX}-python3-netifaces" + "${MINGW_PACKAGE_PREFIX}-python2-netifaces" + "${MINGW_PACKAGE_PREFIX}-python3-debtcollector" + "${MINGW_PACKAGE_PREFIX}-python2-debtcollector") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-oslotest" + "${MINGW_PACKAGE_PREFIX}-python2-oslotest" + "${MINGW_PACKAGE_PREFIX}-python3-ddt" + "${MINGW_PACKAGE_PREFIX}-python2-ddt" + "${MINGW_PACKAGE_PREFIX}-python3-testrepository" + "${MINGW_PACKAGE_PREFIX}-python2-testrepository") +source=("${_realname}-$pkgver.tar.gz"::"https://github.com/openstack/oslo.utils/archive/$pkgver.tar.gz") +sha512sums=('750e90af12e79c51f2f6f86d830659ad4a63b7b9862467b48d6d3d633aaa4da0c167a8e624a2a4f62298a821dbd853d1bd4b709eeb9a9cd78b613a7eeb5c55cd') + +# 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 "oslo.utils-${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 "oslo.utils-${pkgver}" "${builddir}" + done + # Use python 3's standard monotonic function + sed -i '/monotonic/d' python3-build-${CARCH}/requirements.txt + sed -i 's/from monotonic import monotonic/from time import monotonic/' python3-build-${CARCH}/oslo_utils/timeutils.py + + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver + export PBR_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() { + msg "Python 3 build for ${CARCH}" + cd "${srcdir}/python3-build-${CARCH}" + ${MINGW_PREFIX}/bin/stestr run + + msg "Python 2 build for ${CARCH}" + cd "${srcdir}/python2-build-${CARCH}" + PYTHON=python2 ${MINGW_PREFIX}/bin/stestr2 run +} + +package_python3-oslo-utils() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + 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" +} + +package_python2-oslo-utils() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + 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" +} + +package_mingw-w64-i686-python2-oslo-utils() { + package_python2-oslo-utils +} + +package_mingw-w64-i686-python3-oslo-utils() { + package_python3-oslo-utils +} + +package_mingw-w64-x86_64-python2-oslo-utils() { + package_python2-oslo-utils +} + +package_mingw-w64-x86_64-python3-oslo-utils() { + package_python3-oslo-utils +} diff --git a/mingw-w64-python-oslosphinx/PKGBUILD b/mingw-w64-python-oslosphinx/PKGBUILD new file mode 100644 index 0000000000..6e497deed7 --- /dev/null +++ b/mingw-w64-python-oslosphinx/PKGBUILD @@ -0,0 +1,123 @@ +# Maintainer: Some One +#This value is here because some python package names have capital letters +#while there is a strong preference for lowercase letters in ArchLinux and +#MSYS packages. + +_realname=oslosphinx +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=4.10.0 +pkgrel=1 +pkgdesc="Some package (mingw-w64)" +arch=('any') +url='https://github.com/openstack/oslosphinx' +license=('Apache') +makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-requests" + "${MINGW_PACKAGE_PREFIX}-python2-requests" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python2-six") +options=('staticlibs' 'strip' '!debug') +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-sphinx" + "${MINGW_PACKAGE_PREFIX}-python2-sphinx") +source=("${_realname}-$pkgver.tar.gz"::"https://github.com/openstack/oslosphinx/archive/$pkgver.tar.gz") +sha512sums=('4710dd45185a0493f49179f7faccbc95ee9fbd7ca32a678432ee2cbef96e1852cc3a5a8f7a668e6157454ec9b409356d496dabf905dc2582b587219e074c0bce') + +# 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 + export PBR_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 check + done +} + +package_python3-oslosphinx() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python3-requests") + + 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" +} + +package_python2-oslosphinx() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python2-requests") + + 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" +} + +package_mingw-w64-i686-python2-oslosphinx() { + package_python2-oslosphinx +} + +package_mingw-w64-i686-python3-oslosphinx() { + package_python3-oslosphinx +} + +package_mingw-w64-x86_64-python2-oslosphinx() { + package_python2-oslosphinx +} + +package_mingw-w64-x86_64-python3-oslosphinx() { + package_python3-oslosphinx +} diff --git a/mingw-w64-python-oslotest/PKGBUILD b/mingw-w64-python-oslotest/PKGBUILD new file mode 100644 index 0000000000..54187808c5 --- /dev/null +++ b/mingw-w64-python-oslotest/PKGBUILD @@ -0,0 +1,169 @@ +# Maintainer: J. Peter Mugaas . + +_realname=oslotest +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=3.6.0 +pkgrel=1 +pkgdesc="Oslo test framework (mingw-w64)" +arch=('any') +url='https://github.com/openstack/oslotest' +license=('Apache') +validpgpkeys=('gpg_KEY') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") +options=('staticlibs' 'strip' '!debug') +makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-fixtures" + "${MINGW_PACKAGE_PREFIX}-python2-fixtures" + "${MINGW_PACKAGE_PREFIX}-python3-subunit" + "${MINGW_PACKAGE_PREFIX}-python2-subunit" + "${MINGW_PACKAGE_PREFIX}-python3-stestr" + "${MINGW_PACKAGE_PREFIX}-python2-stestr" + "${MINGW_PACKAGE_PREFIX}-python3-testscenarios" + "${MINGW_PACKAGE_PREFIX}-python2-testscenarios" + "${MINGW_PACKAGE_PREFIX}-python3-testtools" + "${MINGW_PACKAGE_PREFIX}-python2-testtools" + "${MINGW_PACKAGE_PREFIX}-python3-mock" + "${MINGW_PACKAGE_PREFIX}-python2-mock" + "${MINGW_PACKAGE_PREFIX}-python3-mox3" + "${MINGW_PACKAGE_PREFIX}-python2-mox3" +# "${MINGW_PACKAGE_PREFIX}-python3-os-client-config" +# "${MINGW_PACKAGE_PREFIX}-python2-os-client-config" + "${MINGW_PACKAGE_PREFIX}-python3-debtcollector" + "${MINGW_PACKAGE_PREFIX}-python2-debtcollector") +source=("${_realname}-$pkgver.tar.gz"::"https://github.com/openstack/oslotest/archive/$pkgver.tar.gz") +sha512sums=('9dce5ddce5801e28944cba108ffb97c17ad92159cbbbc21466559d895dd37ca90674c30f814566c431c3917ba6208c38e0faee981267667cdf999f99e3f89562') + + +# 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}" + 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 + + export PBR_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 check +# done + msg "Python 3 test for ${CARCH}" + cd "${srcdir}/python${pver}-build-${CARCH}" + PYTHON=python3 ${MINGW_PREFIX}/bin/stestr run + + msg "Python 3 test for ${CARCH}" + cd "${srcdir}/python${pver}-build-${CARCH}" + PYTHON=python2 ${MINGW_PREFIX}/bin/stestr2 run +} + +package_python3-oslotest() { + 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 + sed -e "s|/usr/bin/env |${MINGW_PREFIX}|g" \ + -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ + -i "${pkgdir}${MINGW_PREFIX}/bin/oslo_run_pre_release_tests" +#### end section #### +} + +package_python2-oslotest() { + 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 + sed -e "s|/usr/bin/env |${MINGW_PREFIX}|g" \ + -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ + -i "${pkgdir}${MINGW_PREFIX}/bin/oslo_run_pre_release_tests" + for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*; do + mv ${_f}{,2} + done + +} + +package_mingw-w64-i686-python2-oslotest() { + package_python2-oslotest +} + +package_mingw-w64-i686-python3-oslotest() { + package_python3-oslotest +} + +package_mingw-w64-x86_64-python2-oslotest() { + package_python2-oslotest +} + +package_mingw-w64-x86_64-python3-oslotest() { + package_python3-oslotest +} diff --git a/mingw-w64-python-oslotest/oslotest2-i686.install b/mingw-w64-python-oslotest/oslotest2-i686.install new file mode 100644 index 0000000000..799d260fec --- /dev/null +++ b/mingw-w64-python-oslotest/oslotest2-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it + for _it in oslo_run_pre_release_tests2; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-oslotest/oslotest2-x86_64.install b/mingw-w64-python-oslotest/oslotest2-x86_64.install new file mode 100644 index 0000000000..dbf6d13b4e --- /dev/null +++ b/mingw-w64-python-oslotest/oslotest2-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in oslo_run_pre_release_tests2; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-oslotest/oslotest3-i686.install b/mingw-w64-python-oslotest/oslotest3-i686.install new file mode 100644 index 0000000000..c4f4c3a825 --- /dev/null +++ b/mingw-w64-python-oslotest/oslotest3-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it + for _it in oslo_run_pre_release_tests; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-oslotest/oslotest3-x86_64.install b/mingw-w64-python-oslotest/oslotest3-x86_64.install new file mode 100644 index 0000000000..48b8f415c5 --- /dev/null +++ b/mingw-w64-python-oslotest/oslotest3-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in oslo_run_pre_release_tests; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-pyperclip/PKGBUILD b/mingw-w64-python-pyperclip/PKGBUILD new file mode 100644 index 0000000000..bac2bdcff8 --- /dev/null +++ b/mingw-w64-python-pyperclip/PKGBUILD @@ -0,0 +1,110 @@ +# Maintainer: J. Peter Mugaas + +_realname=pyperclip +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=1.6.4 +_commit=16b1f5b7ece36a08adc5ddec1ef6b1b0aa9de77f +pkgrel=1 +pkgdesc="A cross-platform clipboard module for Python (mingw-w64)" +arch=('any') +url='https://github.com/asweigart/pyperclip' +license=('BSD') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest" + "${MINGW_PACKAGE_PREFIX}-python2-pytest") +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/asweigart/pyperclip/archive/$_commit.tar.gz") +sha512sums=('2e8213503d83e9e4e676eefd2336cfa2d92b8c7e28c4d0100361ae9814d1378f70c2b6e9112fb29ed68aa7af95b7fc0784f2c927304bde175b21cbfdc94f8bd6') + +# 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}" + for builddir in python{2,3}-build-${CARCH}; do + rm -rf ${builddir} | true + cp -r "${_realname}-${_commit}" "${builddir}" + done + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver + export PBR_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() { + msg "Python 3 test for ${CARCH}" + cd "${srcdir}/python3-build-${CARCH}" + PYTHONPATH="$PWD/build/lib;$PYTHONPATH" py.test + + msg "Python ${pver} test for ${CARCH}" + cd "${srcdir}/python2-build-${CARCH}" + PYTHONPATH="$PWD/build/lib;$PYTHONPATH" py.test2 || warning "https://github.com/asweigart/pyperclip/issues/129" +} + +package_python3-pyperclip() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + 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.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE.txt" +} + +package_python2-pyperclip() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + 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.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/LICENSE.txt" +} + +package_mingw-w64-i686-python2-pyperclip() { + package_python2-pyperclip +} + +package_mingw-w64-i686-python3-pyperclip() { + package_python3-pyperclip +} + +package_mingw-w64-x86_64-python2-pyperclip() { + package_python2-pyperclip +} + +package_mingw-w64-x86_64-python3-pyperclip() { + package_python3-pyperclip +} diff --git a/mingw-w64-python-pyreadline/PKGBUILD b/mingw-w64-python-pyreadline/PKGBUILD new file mode 100644 index 0000000000..9b93b27d28 --- /dev/null +++ b/mingw-w64-python-pyreadline/PKGBUILD @@ -0,0 +1,106 @@ +# Maintainer: J. Peter Mugaas + +_realname=pyreadline +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=2.1 +pkgrel=1 +pkgdesc="A python implementation of GNU readline. (mingw-w64)" +arch=('any') +url='http://ipython.org/pyreadline.html' +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=('https://files.pythonhosted.org/packages/bc/7c/d724ef1ec3ab2125f38a1d53285745445ec4a8f19b9bb0761b4064316679/pyreadline-2.1.zip') +sha256sums=('4530592fc2e85b25b1a9f79664433da09237c1a270e4d78ea5aa3a2c7229e2d1') + +# 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 + export PBR_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 check + done +} + +package_python3-pyreadline() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + 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 +} + +package_python2-pyreadline() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + 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 +} + +package_mingw-w64-i686-python2-pyreadline() { + package_python2-pyreadline +} + +package_mingw-w64-i686-python3-pyreadline() { + package_python3-pyreadline +} + +package_mingw-w64-x86_64-python2-pyreadline() { + package_python2-pyreadline +} + +package_mingw-w64-x86_64-python3-pyreadline() { + package_python3-pyreadline +} diff --git a/mingw-w64-python-pytest-forked/PKGBUILD b/mingw-w64-python-pytest-forked/PKGBUILD new file mode 100644 index 0000000000..5f0c7ec3c2 --- /dev/null +++ b/mingw-w64-python-pytest-forked/PKGBUILD @@ -0,0 +1,116 @@ +# Maintainer: J. Peter Mugaas + +_realname=pytest-forked +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.2 +pkgrel=1 +pkgdesc="run tests in isolated forked subprocesses (mingw-w64)" +arch=('any') +url='https://github.com/pytest-dev/pytest-forked' +license=('MIT') +validpgpkeys=('gpg_KEY') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-pytest" + "${MINGW_PACKAGE_PREFIX}-python2-pytest" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools-scm" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools-scm") +options=('staticlibs' 'strip' '!debug') +source=("${_realname}-$pkgver.tar.gz"::"https://github.com/pytest-dev/pytest-forked/archive/v$pkgver.tar.gz") +sha256sums=('e2cfee894ae5582cc3bb3806704c9e4fcf62051108033710a820b9c7230acbfe') + +# 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 check + done +} + +package_python3-pytest-forked() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-pytest") + + 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" +} + +package_python2-pytest-forked() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-pytest") + + 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" +} + +package_mingw-w64-i686-python2-pytest-forked() { + package_python2-pytest-forked +} + +package_mingw-w64-i686-python3-pytest-forked() { + package_python3-pytest-forked +} + +package_mingw-w64-x86_64-python2-pytest-forked() { + package_python2-pytest-forked +} + +package_mingw-w64-x86_64-python3-pytest-forked() { + package_python3-pytest-forked +} diff --git a/mingw-w64-python-rfc3986/PKGBUILD b/mingw-w64-python-rfc3986/PKGBUILD new file mode 100644 index 0000000000..bec981dd01 --- /dev/null +++ b/mingw-w64-python-rfc3986/PKGBUILD @@ -0,0 +1,103 @@ +# Maintainer: J. Peter Mugaas + +_realname=rfc3986 +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=1.1.0 +pkgrel=1 +pkgdesc="Validating URI References per RFC 3986 (mingw-w64)" +arch=('any') +url='https://rfc3986.readthedocs.org/' +license=('Apache') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest-runner" + "${MINGW_PACKAGE_PREFIX}-python2-pytest-runner") +source=("https://pypi.io/packages/source/r/rfc3986/rfc3986-$pkgver.tar.gz") +sha512sums=('5e43ca7df586011900d2f01edfb20388598f77218e5a63904557bec0f1d0cb0a35f4980014de9c943ecc43a5a7ab3f7b815fbcfc9318e494c24a14fed2d1fac6') + +# 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}" + 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 pytest + done +} + +package_python3-rfc3986() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + 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 + +} + +package_python2-rfc3986() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + 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 +} + +package_mingw-w64-i686-python2-rfc3986() { + package_python2-rfc3986 +} + +package_mingw-w64-i686-python3-rfc3986() { + package_python3-rfc3986 +} + +package_mingw-w64-x86_64-python2-rfc3986() { + package_python2-rfc3986 +} + +package_mingw-w64-x86_64-python3-rfc3986() { + package_python3-rfc3986 +} diff --git a/mingw-w64-python-sphinx/PKGBUILD b/mingw-w64-python-sphinx/PKGBUILD index 2f12794bbb..eb6aeb229d 100644 --- a/mingw-w64-python-sphinx/PKGBUILD +++ b/mingw-w64-python-sphinx/PKGBUILD @@ -5,7 +5,7 @@ _pyname=Sphinx _realname=sphinx pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=1.7.7 +pkgver=1.7.8 pkgrel=1 pkgdesc="Python documentation generator (mingw-w64)" arch=('any') @@ -51,7 +51,7 @@ checkdepends=( ) #_dtoken="40/45/d4a68a1f8dc669714f48d251afb4352036f87be5e9873cd27e57b9c141f0" source=("${_realname}-${pkgver}.tar.gz"::"https://pypi.org/packages/source/S/${_pyname}/${_pyname}-${pkgver}.tar.gz") -sha256sums=('71531900af3f68625a29c4e00381bee8f85255219a3d500a3e255076a45b735e') +sha256sums=('a07050845cc9a2f4026a6035cc8ed795a5ce7be6528bbc82032385c10807dfe7') prepare() { # source duplication is required because makefile modify source code @@ -104,16 +104,16 @@ package_python3-sphinx() { #optdepends=("${MINGW_PACKAGE_PREFIX}-texlive-latexextra: for generation of PDF documentation") optdepends=("${MINGW_PACKAGE_PREFIX}-imagemagick: ext.imageconverter") - local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) - 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}" -O1 #rm -f ${pkgdir}${MINGW_PREFIX}/bin/sphinx{.exe,-script.py,.exe.manifest} + local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) # fix python command in files for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do - sed -e "s|${_mingw_prefix}|${MINGW_PREFIX}|g" -i ${_f} + sed -e "s|/usr/bin/env |${MINGW_PREFIX}|g" \ + -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_f} done } @@ -142,15 +142,15 @@ package_python2-sphinx() { #optdepends=("${MINGW_PACKAGE_PREFIX}-texlive-latexextra: for generation of PDF documentation") optdepends=("${MINGW_PACKAGE_PREFIX}-imagemagick: ext.imageconverter") - local _mingw_prefix=$(cygpath -am ${MINGW_PREFIX}) - 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}" -O1 + local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) # fix python command in files for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do - sed -e "s|${_mingw_prefix}|${MINGW_PREFIX}|g" -i ${_f} + sed -e "s|/usr/bin/env |${MINGW_PREFIX}|g" \ + -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_f} done } diff --git a/mingw-w64-python-sqlalchemy-migrate/PKGBUILD b/mingw-w64-python-sqlalchemy-migrate/PKGBUILD new file mode 100644 index 0000000000..18ec63f008 --- /dev/null +++ b/mingw-w64-python-sqlalchemy-migrate/PKGBUILD @@ -0,0 +1,183 @@ +# Maintainer: J. Peter Mugaas + +_realname=sqlalchemy-migrate +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.11.0 +pkgrel=1 +pkgdesc="Database schema migration for SQLAlchemy (mingw-w64)" +arch=('any') +url='https://pypi.python.org/pypi/sqlalchemy-migrate/0.11.0' +license=('Apache') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-sqlalchemy" + "${MINGW_PACKAGE_PREFIX}-python2-sqlalchemy" + "${MINGW_PACKAGE_PREFIX}-python3-decorator" + "${MINGW_PACKAGE_PREFIX}-python2-decorator" + "${MINGW_PACKAGE_PREFIX}-python3-sqlparse" + "${MINGW_PACKAGE_PREFIX}-python2-sqlparse" + "${MINGW_PACKAGE_PREFIX}-python3-tempita" + "${MINGW_PACKAGE_PREFIX}-python2-tempita") +#checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-mock" +# "${MINGW_PACKAGE_PREFIX}-python2-mock" +# "${MINGW_PACKAGE_PREFIX}-python3-testrepository" +# "${MINGW_PACKAGE_PREFIX}-python2-testrepository" +# "${MINGW_PACKAGE_PREFIX}-python3-scripttest" +# "${MINGW_PACKAGE_PREFIX}-python2-scripttest" +# "${MINGW_PACKAGE_PREFIX}-python3-ibm-db-sa" +# "${MINGW_PACKAGE_PREFIX}-python2-ibm-db-sa" +# "${MINGW_PACKAGE_PREFIX}-mysql-python" +# "${MINGW_PACKAGE_PREFIX}-python2-psycopg2") +options=('staticlibs' 'strip' '!debug') +source=("${_realname}-$pkgver.tar.gz"::"https://github.com/openstack/sqlalchemy-migrate/archive/$pkgver.tar.gz") +sha512sums=('07c18d2f197f2bda2caa41672f7e3e278397f3b30d3cf3297200df89a051e9e46147dc1c95e20398ed575e7f3c1dd4c56f9e525ab47a960344f51d276e70639f') + +# 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 + + export PBR_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 testr || warning "Tests failed" +# done +#} + +package_python3-sqlalchemy-migrate() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-sqlalchemy" + "${MINGW_PACKAGE_PREFIX}-python3-decorator" + "${MINGW_PACKAGE_PREFIX}-python3-sqlparse" + "${MINGW_PACKAGE_PREFIX}-python3-tempita") + + #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 + +# 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-sqlalchemy-migrate() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-sqlalchemy" + "${MINGW_PACKAGE_PREFIX}-python2-decorator" + "${MINGW_PACKAGE_PREFIX}-python2-sqlparse" + "${MINGW_PACKAGE_PREFIX}-python2-tempita") + + #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 + +# 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 migrate migrate-repository; 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-sqlalchemy-migrate() { + package_python2-sqlalchemy-migrate +} + +package_mingw-w64-i686-python3-sqlalchemy-migrate() { + package_python3-sqlalchemy-migrate +} + +package_mingw-w64-x86_64-python2-sqlalchemy-migrate() { + package_python2-sqlalchemy-migrate +} + +package_mingw-w64-x86_64-python3-sqlalchemy-migrate() { + package_python3-sqlalchemy-migrate +} diff --git a/mingw-w64-python-sqlalchemy-migrate/sqlalchemy-migrate2-i686.install b/mingw-w64-python-sqlalchemy-migrate/sqlalchemy-migrate2-i686.install new file mode 100644 index 0000000000..032f859134 --- /dev/null +++ b/mingw-w64-python-sqlalchemy-migrate/sqlalchemy-migrate2-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it + for _it in migrate2 migrate-repository2; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-sqlalchemy-migrate/sqlalchemy-migrate2-x86_64.install b/mingw-w64-python-sqlalchemy-migrate/sqlalchemy-migrate2-x86_64.install new file mode 100644 index 0000000000..3c91612336 --- /dev/null +++ b/mingw-w64-python-sqlalchemy-migrate/sqlalchemy-migrate2-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in migrate2 migrate-repository2; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-sqlalchemy-migrate/sqlalchemy-migrate3-i686.install b/mingw-w64-python-sqlalchemy-migrate/sqlalchemy-migrate3-i686.install new file mode 100644 index 0000000000..3a8899905a --- /dev/null +++ b/mingw-w64-python-sqlalchemy-migrate/sqlalchemy-migrate3-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it + for _it in migrate migrate-repository; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-sqlalchemy-migrate/sqlalchemy-migrate3-x86_64.install b/mingw-w64-python-sqlalchemy-migrate/sqlalchemy-migrate3-x86_64.install new file mode 100644 index 0000000000..2fe168f407 --- /dev/null +++ b/mingw-w64-python-sqlalchemy-migrate/sqlalchemy-migrate3-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in migrate migrate-repository; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-sqlalchemy/PKGBUILD b/mingw-w64-python-sqlalchemy/PKGBUILD index 825ac27610..61307749fa 100644 --- a/mingw-w64-python-sqlalchemy/PKGBUILD +++ b/mingw-w64-python-sqlalchemy/PKGBUILD @@ -13,13 +13,16 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-python2" "${MINGW_PACKAGE_PREFIX}-python3" "${MINGW_PACKAGE_PREFIX}-python3-setuptools" "${MINGW_PACKAGE_PREFIX}-python2-setuptools") -#checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest-runner" "${MINGW_PACKAGE_PREFIX}-python2-pytest-runner: -# "${MINGW_PACKAGE_PREFIX}-python3-pytest-xdist" "${MINGW_PACKAGE_PREFIX}-python2-pytest-xdist" -# "${MINGW_PACKAGE_PREFIX}-python-mock" "${MINGW_PACKAGE_PREFIX}-python2-mock") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest-runner" + "${MINGW_PACKAGE_PREFIX}-python2-pytest-runner" + "${MINGW_PACKAGE_PREFIX}-python3-pytest-xdist" + "${MINGW_PACKAGE_PREFIX}-python2-pytest-xdist" + "${MINGW_PACKAGE_PREFIX}-python3-mock" + "${MINGW_PACKAGE_PREFIX}-python2-mock") options=('staticlibs' 'strip' '!debug') +source=("https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-$pkgver.tar.gz"{,.asc}) validpgpkeys=('83AF7ACE251C13E6BB7DEFBD330239C1C4DAFEE1') -source=("https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-${pkgver}.tar.gz"{,.asc}) -sha256sums=('ef6569ad403520ee13e180e1bfd6ed71a0254192a934ec1dbd3dbf48f4aa9524' +sha512sums=('dfe60cdf4923239d9ca16ee2ee8618ebe3fe2553c35d393f27c51aec16bcba3a6692e7f045e8206a41ad7cfbf71380d607cb27cbc9a6320faedbcd3a37517604' 'SKIP') # Helper macros to help make tasks easier # @@ -62,13 +65,13 @@ 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 pytest -# 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 pytest + done +} package_python3-sqlalchemy() { depends=("${MINGW_PACKAGE_PREFIX}-python3") diff --git a/mingw-w64-python-sqlparse/PKGBUILD b/mingw-w64-python-sqlparse/PKGBUILD new file mode 100644 index 0000000000..7ab464cf71 --- /dev/null +++ b/mingw-w64-python-sqlparse/PKGBUILD @@ -0,0 +1,151 @@ +# Maintainer: J. Peter Mugaas + +_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 +} diff --git a/mingw-w64-python-sqlparse/sqlparse2-i686.install b/mingw-w64-python-sqlparse/sqlparse2-i686.install new file mode 100644 index 0000000000..cd09ace6ec --- /dev/null +++ b/mingw-w64-python-sqlparse/sqlparse2-i686.install @@ -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 +} diff --git a/mingw-w64-python-sqlparse/sqlparse2-x86_64.install b/mingw-w64-python-sqlparse/sqlparse2-x86_64.install new file mode 100644 index 0000000000..d97a4817f4 --- /dev/null +++ b/mingw-w64-python-sqlparse/sqlparse2-x86_64.install @@ -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 +} diff --git a/mingw-w64-python-sqlparse/sqlparse3-i686.install b/mingw-w64-python-sqlparse/sqlparse3-i686.install new file mode 100644 index 0000000000..56913b28ff --- /dev/null +++ b/mingw-w64-python-sqlparse/sqlparse3-i686.install @@ -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 +} diff --git a/mingw-w64-python-sqlparse/sqlparse3-x86_64.install b/mingw-w64-python-sqlparse/sqlparse3-x86_64.install new file mode 100644 index 0000000000..6d61de50a2 --- /dev/null +++ b/mingw-w64-python-sqlparse/sqlparse3-x86_64.install @@ -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 +} diff --git a/mingw-w64-python-stestr/PKGBUILD b/mingw-w64-python-stestr/PKGBUILD new file mode 100644 index 0000000000..f6c8f3e38f --- /dev/null +++ b/mingw-w64-python-stestr/PKGBUILD @@ -0,0 +1,161 @@ +# Maintainer: J. Peter Mugaas + +_realname=stestr +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=2.1.1 +pkgrel=1 +pkgdesc="A test runner runner similar to testrepository (mingw-w64)" +arch=('any') +url='http://stestr.readthedocs.io/en/latest/' +license=('Apache') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") +#makedepends=('python-future' 'python2-future' 'python-pbr' 'python2-pbr' 'python-cliff' +# 'python2-cliff' 'python-subunit' 'python2-subunit' 'python-fixtures' 'python2-fixtures' +# 'python-testtools' 'python2-testtools' 'python-yaml' 'python2-yaml' 'python-voluptuous' +# 'python2-voluptuous') +#checkdepends=('python-hacking' 'python2-hacking' 'python-sphinx' 'python2-sphinx' 'python-mock' +# 'python2-mock' 'python-subunit2sql' 'python2-subunit2sql' 'python-coverage' +# 'python2-coverage' 'python-ddt' 'python2-ddt') +options=('staticlibs' 'strip' '!debug') +source=("https://pypi.io/packages/source/s/stestr/stestr-$pkgver.tar.gz") +sha512sums=('02299027c006c04f0b3047ac8543ab3a10fd857b048d1c0d9ee18d3a69eb2ee9c275db166e115fd54b58ac30ff742b8fd82650c1ab8b94b9376b86717adfea2b') + +# 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}" +# export PYTHONPATH="$PWD/tmp_install/usr/lib/python3.7/site-packages" +# export PATH="$PWD/tmp_install/usr/bin:$PATH" +# stestr run || warning "Tests failed" + +# done +#} + +package_python3-stestr() { + 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-stestr() { + 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 stestr; 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-stestr() { + package_python2-stestr +} + +package_mingw-w64-i686-python3-stestr() { + package_python3-stestr +} + +package_mingw-w64-x86_64-python2-stestr() { + package_python2-stestr +} + +package_mingw-w64-x86_64-python3-stestr() { + package_python3-stestr +} diff --git a/mingw-w64-python-stestr/stestr2-i686.install b/mingw-w64-python-stestr/stestr2-i686.install new file mode 100644 index 0000000000..d44e947ecc --- /dev/null +++ b/mingw-w64-python-stestr/stestr2-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it + for _it in stestr2; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-stestr/stestr2-x86_64.install b/mingw-w64-python-stestr/stestr2-x86_64.install new file mode 100644 index 0000000000..65f94e004f --- /dev/null +++ b/mingw-w64-python-stestr/stestr2-x86_64.install @@ -0,0 +1,17 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it +# "somepackage" should be replaced with the name of your .EXE w/o 2 and .exe ext +# Like this: +# For "myexe2.exe", it would be "myexe2" . + for _it in stestr2; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-stestr/stestr3-i686.install b/mingw-w64-python-stestr/stestr3-i686.install new file mode 100644 index 0000000000..a1cb00dcee --- /dev/null +++ b/mingw-w64-python-stestr/stestr3-i686.install @@ -0,0 +1,17 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it +# "somepackage" should be replaced with the name of your .EXE w/o 2 and .exe ext +# Like this: +# For "myexe.exe", it would be "myexe" . + for _it in stestr; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-stestr/stestr3-x86_64.install b/mingw-w64-python-stestr/stestr3-x86_64.install new file mode 100644 index 0000000000..0319b9088a --- /dev/null +++ b/mingw-w64-python-stestr/stestr3-x86_64.install @@ -0,0 +1,17 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it +# "somepackage" should be replaced with the name of your .EXE w/o 2 and .exe ext +# Like this: +# For "myexe.exe", it would be "myexe" . + for _it in stestr; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-stevedore/PKGBUILD b/mingw-w64-python-stevedore/PKGBUILD new file mode 100644 index 0000000000..71007d1f56 --- /dev/null +++ b/mingw-w64-python-stevedore/PKGBUILD @@ -0,0 +1,109 @@ +# Maintainer: J. Peter Mugaas + +_realname=stevedore +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=1.29.0 +pkgrel=1 +pkgdesc="Manage dynamic plugins for Python applications (mingw-w64)" +arch=('any') +url='https://github.com/openstack/stevedore' +license=('Apache') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python2-six" + "${MINGW_PACKAGE_PREFIX}-python3-six" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") +options=('staticlibs' 'strip' '!debug') +source=(https://pypi.org/packages/source/s/stevedore/stevedore-$pkgver.tar.gz) +sha256sums=('1e153545aca7a6a49d8337acca4f41c212fbfa60bf864ecd056df0cafb9627e8') + +# 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}" + # Remove dependency on pbr; it's not a runtime dependency + sed -i '/pbr/d' requirements.txt + 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 check + done +} + +package_python3-stevedore() { + depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-six") + + 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 +} + +package_python2-stevedore() { + depends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python2-six") + + 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 +} + +package_mingw-w64-i686-python2-stevedore() { + package_python2-stevedore +} + +package_mingw-w64-i686-python3-stevedore() { + package_python3-stevedore +} + +package_mingw-w64-x86_64-python2-stevedore() { + package_python2-stevedore +} + +package_mingw-w64-x86_64-python3-stevedore() { + package_python3-stevedore +} diff --git a/mingw-w64-python-tempita/PKGBUILD b/mingw-w64-python-tempita/PKGBUILD new file mode 100644 index 0000000000..9132be618a --- /dev/null +++ b/mingw-w64-python-tempita/PKGBUILD @@ -0,0 +1,107 @@ +# Maintainer: Some One +#This value is here because some python package names have capital letters +#while there is a strong preference for lowercase letters in ArchLinux and +#MSYS packages. + +_realname=tempita +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.5.3dev20170202 +_commit=47414a7c6e46a9a9afe78f0bce2ea299fa84d10d +pkgrel=1 +pkgdesc="A lightweight unicode templating language (mingw-w64)" +arch=('any') +url='https://github.com/gjhiggins/tempita' +license=('custom:MIT') +validpgpkeys=('gpg_KEY') +makedepends=('git' + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") +options=('staticlibs' 'strip' '!debug') +source=("${_realname}::git://github.com/gjhiggins/tempita.git#commit=${_commit}") +sha256sums=('SKIP') + +# 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}" + for builddir in python{2,3}-build-${CARCH}; do + rm -rf ${builddir} | true + cp -r "${_realname}" "${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-tempita() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + 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 +} + +package_python2-tempita() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + 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 +} + +package_mingw-w64-i686-python2-tempita() { + package_python2-tempita +} + +package_mingw-w64-i686-python3-tempita() { + package_python3-tempita +} + +package_mingw-w64-x86_64-python2-tempita() { + package_python2-tempita +} + +package_mingw-w64-x86_64-python3-tempita() { + package_python3-tempita +} diff --git a/mingw-w64-python-testrepository/PKGBUILD b/mingw-w64-python-testrepository/PKGBUILD new file mode 100644 index 0000000000..6aba50d2cf --- /dev/null +++ b/mingw-w64-python-testrepository/PKGBUILD @@ -0,0 +1,153 @@ +# Maintainer: J. Peter Mugaas + +_realname=testrepository +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.0.20 +pkgrel=1 +pkgdesc="A repository of test results. (mingw-w64)" +arch=('any') +license=('Apache' 'BSD') +url="https://launchpad.net/testrepository" +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-fixtures" + "${MINGW_PACKAGE_PREFIX}-python2-fixtures" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-subunit" + "${MINGW_PACKAGE_PREFIX}-python2-subunit" + "${MINGW_PACKAGE_PREFIX}-python3-testtools" + "${MINGW_PACKAGE_PREFIX}-python2-testtools") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-testresources" + "${MINGW_PACKAGE_PREFIX}-python2-testresources" + "${MINGW_PACKAGE_PREFIX}-python3-pytz" + "${MINGW_PACKAGE_PREFIX}-python2-pytz" + "${MINGW_PACKAGE_PREFIX}-python3-testscenarios" + "${MINGW_PACKAGE_PREFIX}-python2-testscenarios") +options=('staticlibs' 'strip' '!debug') +source=("https://pypi.python.org/packages/source/t/testrepository/testrepository-$pkgver.tar.gz") +sha512sums=('df14500e2b27b6f39d9d4c4f42961efd63dfe25186e561eb1678952a8ab9311f17c36b78819fea33e0ac879c47a33d45c31ff58be017609c8a6157905ee712d6') + + +# 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}" +# apply_patch_with_msg 0001-A-really-important-fix.patch \ +# 0002-A-less-important-fix.patch + 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}" + + msg " init - Python ${pver} test for ${CARCH}" + PYTHON=python${pver} ${MINGW_PREFIX}/bin/python${pver} ./testr init + msg " run - Python ${pver} test for ${CARCH}" + PYTHON=python${pver} ${MINGW_PREFIX}/bin/python${pver} ./testr --parallel || warning "Tests failed" + done +} + +package_python3-testrepository() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + install=${_realname}2-${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}/COPYING" + +# 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}) + for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*; do + sed -e "s|/usr/bin/env |${MINGW_PREFIX}|g" \ + -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_f} + done +#### end section #### +} + +package_python2-testrepository() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + 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}/COPYING" + +# 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}) + for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*; 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 testr; do + mv "${pkgdir}${MINGW_PREFIX}"/bin/${f}{,2} + done +#### end section #### +} + +package_mingw-w64-i686-python2-testrepository() { + package_python2-testrepository +} + +package_mingw-w64-i686-python3-testrepository() { + package_python3-testrepository +} + +package_mingw-w64-x86_64-python2-testrepository() { + package_python2-testrepository +} + +package_mingw-w64-x86_64-python3-testrepository() { + package_python3-testrepository +} diff --git a/mingw-w64-python-testrepository/testrepository2-i686.install b/mingw-w64-python-testrepository/testrepository2-i686.install new file mode 100644 index 0000000000..bd1c738f51 --- /dev/null +++ b/mingw-w64-python-testrepository/testrepository2-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it + for _it in testr2; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-testrepository/testrepository2-x86_64.install b/mingw-w64-python-testrepository/testrepository2-x86_64.install new file mode 100644 index 0000000000..fe8e282801 --- /dev/null +++ b/mingw-w64-python-testrepository/testrepository2-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in testr2; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-testrepository/testrepository3-i686.install b/mingw-w64-python-testrepository/testrepository3-i686.install new file mode 100644 index 0000000000..8bcc5004d5 --- /dev/null +++ b/mingw-w64-python-testrepository/testrepository3-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it + for _it in testr; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-testrepository/testrepository3-x86_64.install b/mingw-w64-python-testrepository/testrepository3-x86_64.install new file mode 100644 index 0000000000..e2d02cf48a --- /dev/null +++ b/mingw-w64-python-testrepository/testrepository3-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in testr; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it} + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-testresources/PKGBUILD b/mingw-w64-python-testresources/PKGBUILD new file mode 100644 index 0000000000..1735c4d20d --- /dev/null +++ b/mingw-w64-python-testresources/PKGBUILD @@ -0,0 +1,109 @@ +# Maintainer: J. Peter Mugaas + +_realname=testresources +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=2.0.1 +pkgrel=1 +pkgdesc="Testresources, a pyunit extension for managing expensive test resources (mingw-w64)" +arch=('any') +url='https://launchpad.net/testresources' +license=('Apache' 'BSD') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-pbr" + "${MINGW_PACKAGE_PREFIX}-python2-pbr" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools" + "${MINGW_PACKAGE_PREFIX}-python3-testtools" + "${MINGW_PACKAGE_PREFIX}-python2-testtools") +options=('staticlibs' 'strip' '!debug') +source=("https://pypi.io/packages/source/t/testresources/testresources-$pkgver.tar.gz") +sha512sums=('0b23432b019400fe378e957d14a91083eef7fe1130a494b567a5274d69e4e8e09ab75861e5453c3f217507e144cf179c908f84dd1a807992d4bee0b8d32cb0f4') + +# 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}" + 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} -m testtools.run discover + done +} + +package_python3-testresources() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + 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 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/COPYING" +} + +package_python2-testresources() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + 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 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}/COPYING" +} + +package_mingw-w64-i686-python2-testresources() { + package_python2-testresources +} + +package_mingw-w64-i686-python3-testresources() { + package_python3-testresources +} + +package_mingw-w64-x86_64-python2-testresources() { + package_python2-testresources +} + +package_mingw-w64-x86_64-python3-testresources() { + package_python3-testresources +} diff --git a/mingw-w64-python-voluptuous/PKGBUILD b/mingw-w64-python-voluptuous/PKGBUILD new file mode 100644 index 0000000000..b7d3689279 --- /dev/null +++ b/mingw-w64-python-voluptuous/PKGBUILD @@ -0,0 +1,117 @@ +# Maintainer: J. Peter Mugaas + +_realname=voluptuous +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgver=0.11.5 +pkgrel=1 +pkgdesc="A Python data validation library (mingw-w64)" +arch=('any') +url='https://www.voluptuous.org/' +license=('BSD') +makedepends=("${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-setuptools" + "${MINGW_PACKAGE_PREFIX}-python2-setuptools") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-nose" + "${MINGW_PACKAGE_PREFIX}-python2-nose") +options=('staticlibs' 'strip' '!debug') +source=("https://pypi.io/packages/source/v/voluptuous/voluptuous-$pkgver.tar.gz") +sha512sums=('8893434e8e73ebf3682da1970d1d720444de452937ac9123fab53413c88a21d04ad3eb490902d829aa60be6804ff68b8bcf57a1c45807751c3d50be63e9b2551') + +# 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}" + # https://github.com/alecthomas/voluptuous/issues/333 + rm -r voluptuous-$pkgver/*.egg-info + # https://github.com/alecthomas/voluptuous/pull/332 + sed -e "s/'w'/'wb'/" -e "s/.encode('utf-8')//" -e "s/f.write(long_description)/f.write(long_description.encode('utf-8'))/" -i voluptuous-$pkgver/setup.py + + # Python 3.7 + sed -i '/raise StopIteration/d' voluptuous-$pkgver/voluptuous/schema_builder.py + + 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 nosetests +# done + cd "${srcdir}/python3-build-${CARCH}" + ${MINGW_PREFIX}/bin/python3 setup.py nosetests +} + +package_python3-voluptuous() { + depends=("${MINGW_PACKAGE_PREFIX}-python3") + + 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 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/COPYING" +} + +package_python2-voluptuous() { + depends=("${MINGW_PACKAGE_PREFIX}-python2") + + 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 COPYING "$pkgdir${MINGW_PREFIX}"/share/licenses/$pkgname/COPYING +} + +package_mingw-w64-i686-python2-voluptuous() { + package_python2-voluptuous +} + +package_mingw-w64-i686-python3-voluptuous() { + package_python3-voluptuous +} + +package_mingw-w64-x86_64-python2-voluptuous() { + package_python2-voluptuous +} + +package_mingw-w64-x86_64-python3-voluptuous() { + package_python3-voluptuous +} diff --git a/mingw-w64-python2-cmd2/PKGBUILD b/mingw-w64-python2-cmd2/PKGBUILD new file mode 100644 index 0000000000..e9859a8f63 --- /dev/null +++ b/mingw-w64-python2-cmd2/PKGBUILD @@ -0,0 +1,85 @@ +# Maintainer: J. Peter Mugaas + +# The 0.8.6 series supports Python 3 but we have an updated version. +# that only supports Python 3. This is just for Python 2 tools +# and legacy support for the old version. The devleopers will +# dicontinue support for the 0.x8 on August 31, 2018 + +_realname=cmd2 +pkgbase=mingw-w64-python2-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-python2-${_realname}" +pkgver=0.8.6 +pkgrel=1 +pkgdesc="Extra features for standard library's cmd module (mingw-w64)" +arch=('any') +url='https://github.com/python-cmd2/cmd2' +license=('MIT') +depends=("${MINGW_PACKAGE_PREFIX}-python2-pyparsing" + "${MINGW_PACKAGE_PREFIX}-python2-pyperclip" + "${MINGW_PACKAGE_PREFIX}-python2-colorama" + "${MINGW_PACKAGE_PREFIX}-python2-contextlib2" + "${MINGW_PACKAGE_PREFIX}-python2-enum34" + "${MINGW_PACKAGE_PREFIX}-python2-wcwidth" + "${MINGW_PACKAGE_PREFIX}-python2-subprocess32") +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python2-pytest-runner" +# "${MINGW_PACKAGE_PREFIX}-python2-pytest-xdist" + "${MINGW_PACKAGE_PREFIX}-python2-mock") +# 'vi') +options=('staticlibs' 'strip' '!debug') +source=("${_realname}-$pkgver.tar.gz"::"https://github.com/python-cmd2/cmd2/archive/$pkgver.tar.gz") +sha512sums=('c28eb016fff3652b5cc1a45417e1b76b061849bd5c48afbaca8b9706d93b9b9f235fa6e2616da76741505eba96943b77e51d3fdb9fd50db620b52a6d75e4cceb') + +# 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}" + rm -rf python3-build-${CARCH} || true + cp -r "${_realname}-${pkgver}" "python2-build-${CARCH}" + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver + export PBR_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() { + msg "Python 2 build for ${CARCH}" + cd "${srcdir}/python2-build-${CARCH}" + ${MINGW_PREFIX}/bin/python2 setup.py build +} + +check() { + msg "Python 2 test for ${CARCH}" + cd "${srcdir}/python2-build-${CARCH}" + ${MINGW_PREFIX}/bin/python2 setup.py pytest || true +} + +package() { + 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" +} + diff --git a/mingw-w64-python2-functools32/PKGBUILD b/mingw-w64-python2-functools32/PKGBUILD new file mode 100644 index 0000000000..89e5e0c3f5 --- /dev/null +++ b/mingw-w64-python2-functools32/PKGBUILD @@ -0,0 +1,67 @@ +# Maintainer: J. Peter Mugaas + +_realname=functools32 +pkgbase=mingw-w64-python2-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-python2-${_realname}" +_pkgver=3.2.3-2 +pkgver=${_pkgver//-/_} +pkgrel=1 +pkgdesc="Backport of the functools module from Python 3.2.3 for use on 2.7 and PyPy (mingw-w64)" +arch=('any') +url='https://github.com/MiCHiLU/python-functools32' +license=('custom') +validpgpkeys=('gpg_KEY') +depends=("${MINGW_PACKAGE_PREFIX}-python2") +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools") +options=('staticlibs' 'strip' '!debug') +source=("https://pypi.python.org/packages/source/f/functools32/functools32-$_pkgver.tar.gz") +sha256sums=('f6253dfbe0538ad2e387bd8fdfd9293c925d63553f5813c4e587745416501e6d') + +# 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}" + 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() { + msg "Python 2 build for ${CARCH}" + cd "${srcdir}/python2-build-${CARCH}" + ${MINGW_PREFIX}/bin/python2 setup.py build +} + +package() { + 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" +} + diff --git a/mingw-w64-python2-subprocess32/PKGBUILD b/mingw-w64-python2-subprocess32/PKGBUILD new file mode 100644 index 0000000000..21070d47f1 --- /dev/null +++ b/mingw-w64-python2-subprocess32/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: J. Peter Mugaas + +_realname=subprocess32 +pkgbase=mingw-w64-python-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-python2-${_realname}" +_gitname=python-${_realname} +pkgver=3.5.2 +pkgrel=1 +pkgdesc='Backport of the Python 3 subprocess module (mingw-w64)' +url='https://github.com/google/python-subprocess32' +arch=('any') +license=('custom') +depends=("${MINGW_PACKAGE_PREFIX}-python2") +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools") +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/google/python-subprocess32/archive/${pkgver}.tar.gz") +sha512sums=('7fe9120b37a8c460434101149cf427b115ba825d6fba9a95d07ff8c5b1c01f0ec5561dfaf01b2cba580d553acdbb7a37b7be2f9febc0ee449a80ed0c36a334ad') + +build() { + cd ${_gitname}-${pkgver} + ${MINGW_PREFIX}/bin/python2 setup.py build +} + +check() { + cd ${_gitname}-${pkgver} + local PYTHONVERSION="$(${MINGW_PREFIX}/bin/python2 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')" + PYTHONPATH="build/lib.linux-${CARCH}-${PYTHONVERSION}" \ + ${MINGW_PREFIX}/bin/python2 test_subprocess32.py +} + +package() { + cd ${_gitname}-${pkgver} + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python2 setup.py install -O1 --root="${pkgdir}" --prefix=${MINGW_PREFIX} --skip-build + install -Dm 644 LICENSE -t "${pkgdir}${MINGW_PREFIX}/share/licenses/python2-${_realname}" + install -Dm 644 README.md ChangeLog -t "${pkgdir}${MINGW_PREFIX}/share/doc/python2-${_realname}" +} + +# vim: ts=2 sw=2 et: diff --git a/mingw-w64-python2-unicodecsv/PKGBUILD b/mingw-w64-python2-unicodecsv/PKGBUILD new file mode 100644 index 0000000000..eee99468e2 --- /dev/null +++ b/mingw-w64-python2-unicodecsv/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: J. Peter Mugaas + +_realname=unicodecsv +pkgbase=mingw-w64-python2-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-python2-${_realname}" +pkgver=0.14.1 +pkgrel=3 +pkgdesc="Python2's stdlib csv module is nice, but it doesn't support unicode. This module is a drop-in replacement which *does*. (mingw-w64)" +arch=('any') +url="https://github.com/jdunck/python-unicodecsv" +license=('BSD') +depends=("${MINGW_PACKAGE_PREFIX}-python2") +makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools") +source=("${_realname}-$pkgver.tar.gz"::"https://github.com/jdunck/python-unicodecsv/archive/$pkgver.tar.gz") +sha512sums=('9135c0f3702d60d72b2544476feb9e924b8d592e06d21eca98cd10406de9ecca49bcde9e9bfa7baeb4358dddf86ad737e155355d8b927de5b93912201a8d87b0') + +prepare() { + sed -i 's/unittest2/unittest/' python-unicodecsv-$pkgver/{runtests.py,unicodecsv/test.py} + sed -i '/unittest2/d' python-unicodecsv-$pkgver/setup.py + + rm -rf python2-build-${CARCH} | true + cp -r "python-${_realname}-${pkgver}" "python2-build-${CARCH}" + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver + export PBR_VERSION=$pkgver +} + +build() { + cd "${srcdir}/python2-build-${CARCH}" + ${MINGW_PREFIX}/bin/python2 setup.py build +} + +check() { + cd "${srcdir}/python2-build-${CARCH}" + ${MINGW_PREFIX}/bin/python2 setup.py test || true +} + +package() { + 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 +} diff --git a/mingw-w64-python3-cmd2/PKGBUILD b/mingw-w64-python3-cmd2/PKGBUILD new file mode 100644 index 0000000000..1226a886ae --- /dev/null +++ b/mingw-w64-python3-cmd2/PKGBUILD @@ -0,0 +1,81 @@ +# Maintainer: J. Peter Mugaas + +#Python 2 support was discontinued in this series + +_realname=cmd2 +pkgbase=mingw-w64-python-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-python3-${_realname}" +pkgver=0.9.4 +pkgrel=1 +pkgdesc="Extra features for standard library's cmd module (mingw-w64)" +arch=('any') +url='https://github.com/python-cmd2/cmd2' +license=('MIT') +depends=("${MINGW_PACKAGE_PREFIX}-python3-attrs" + "${MINGW_PACKAGE_PREFIX}-python3-pyparsing" + "${MINGW_PACKAGE_PREFIX}-python3-pyperclip" + "${MINGW_PACKAGE_PREFIX}-python3-pyreadline" + "${MINGW_PACKAGE_PREFIX}-python3-colorama" + "${MINGW_PACKAGE_PREFIX}-python3-wcwidth") +makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest-runner" + "${MINGW_PACKAGE_PREFIX}-python3-pytest-xdist" + "${MINGW_PACKAGE_PREFIX}-python3-mock" ) +# 'vi') +options=('staticlibs' 'strip' '!debug') +source=("${_realname}-$pkgver.tar.gz::https://github.com/python-cmd2/cmd2/archive/$pkgver.tar.gz") +sha512sums=('fd4ff48aeed4184797d9741e635dd3da4cc95f6efdddb24933c7619942c46cf5408f02b3ad6765088dd2d293628bc4674011817daeed4f109494c01e3653d58c') + +# 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}" + rm -rf python3-build-${CARCH} || true + cp -r "${_realname}-${pkgver}" "python3-build-${CARCH}" + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver + export PBR_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() { + msg "Python 3 build for ${CARCH}" + cd "${srcdir}/python3-build-${CARCH}" + ${MINGW_PREFIX}/bin/python3 setup.py build +} + +check() { + msg "Python 3 test for ${CARCH}" + cd "${srcdir}/python3-build-${CARCH}" + ${MINGW_PREFIX}/bin/python3 setup.py pytest || true +} + +package() { + 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" +} +