diff options
author | Sameer Puri | 2021-03-11 22:57:37 -0500 |
---|---|---|
committer | Sameer Puri | 2021-03-11 22:57:37 -0500 |
commit | 75c4f0140249762372f718058c74db259fa0f19d (patch) | |
tree | 7a3e9ff69ebf443ecb3d74a1066fa2f0a66d1eca | |
download | aur-75c4f0140249762372f718058c74db259fa0f19d.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | LICENSE | 72 | ||||
-rw-r--r-- | PKGBUILD | 139 | ||||
-rw-r--r-- | PKGBUILD_EXTRAS | 0 |
4 files changed, 232 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9b64670e35e8 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = python-qt-reactor + pkgdesc = Twisted Qt Integration for Qt4 and Qt5 using qtpy + pkgver = 0.6 + pkgrel = 00 + url = https://github.com/frmdstryr/qt-reactor + arch = any + license = MIT + makedepends = python-pip + depends = python + depends = python-twisted + depends = python-qtpy + noextract = qt_reactor-0.6-py2.py3-none-any.whl + source = PKGBUILD_EXTRAS + source = https://files.pythonhosted.org/packages/83/77/506a082b80c43fc50509f13c1aed9b63716295f3f0f983035b8bb49f6e23/qt_reactor-0.6-py2.py3-none-any.whl + source = LICENSE + md5sums = SKIP + md5sums = 809803cf73b283a69a481781043d591d + md5sums = fee9e9036ceaa3835700c4d98b50251a + +pkgname = python-qt-reactor + diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..994683447e0e --- /dev/null +++ b/LICENSE @@ -0,0 +1,72 @@ +Copyright (c) 2001-2018 +Allen Short +Andy Gayton +Andrew Bennetts +Antoine Pitrou +Apple Computer, Inc. +Ashwini Oruganti +bakbuk +Benjamin Bruheim +Bob Ippolito +Burak Nehbit +Canonical Limited +Christopher Armstrong +Christopher R. Wood +David Reid +Donovan Preston +Elvis Stansvik +Eric Mangold +Eyal Lotem +Glenn Tarbox +Google Inc. +Hybrid Logic Ltd. +Hynek Schlawack +Itamar Turner-Trauring +James Knight +Jason A. Mobarak +Jean-Paul Calderone +Jessica McKellar +Jonathan Jacobs +Jonathan Lange +Jonathan D. Simms +Jürgen Hermann +Julian Berman +Kevin Horn +Kevin Turner +Kyle Altendorf +Laurens Van Houtven +Mary Gardiner +Matthew Lefkowitz +Massachusetts Institute of Technology +Moshe Zadka +Paul Swartz +Pavel Pergamenshchik +Ralph Meijer +Richard Wall +Sean Riley +Software Freedom Conservancy +Tarashish Mishra +Travis B. Hartwell +Thijs Triemstra +Thomas Herve +Timothy Allen +Tom Prince + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f6cd05aa9146 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,139 @@ +# Maintainer: Unknown Packager + +export PIP_CONFIG_FILE=/dev/null +export PIP_DISABLE_PIP_VERSION_CHECK=true + +pkgname=python-qt-reactor +epoch= +pkgver=0.6 +pkgrel=00 +pkgdesc='Twisted Qt Integration for Qt4 and Qt5 using qtpy' +arch=(any) +url=https://github.com/frmdstryr/qt-reactor +license=(MIT) +depends=(python python-twisted python-qtpy) +## EXTRA_DEPENDS ## +makedepends=(python-pip) +checkdepends=() +provides=() +conflicts=(${provides%=*}) # No quotes, to avoid an empty entry. +source=(PKGBUILD_EXTRAS) +md5sums=(SKIP) +noextract=() +source+=(https://files.pythonhosted.org/packages/83/77/506a082b80c43fc50509f13c1aed9b63716295f3f0f983035b8bb49f6e23/qt_reactor-0.6-py2.py3-none-any.whl) +md5sums+=(809803cf73b283a69a481781043d591d) +noextract+=(qt_reactor-0.6-py2.py3-none-any.whl) +source+=(LICENSE) +md5sums+=(fee9e9036ceaa3835700c4d98b50251a) + +_first_source() { + echo " ${source_i686[@]} ${source_x86_64[@]} ${source[@]}" | + tr ' ' '\n' | grep -Pv '^(PKGBUILD_EXTRAS)?$' | head -1 +} + +_vcs="$(grep -Po '^[a-z]+(?=\+)' <<< "$(_first_source)")" +if [[ "$_vcs" ]]; then + makedepends+=("$(pkgfile --quiet /usr/bin/$_vcs)") + provides+=("${pkgname%-$_vcs}") + conflicts+=("${pkgname%-$_vcs}") +fi + +_is_wheel() { + [[ $(_first_source) =~ \.whl$ ]] +} + +if [[ _is_wheel && + $(basename "$(_first_source)" | rev | cut -d- -f1 | rev) =~ ^manylinux ]]; then + options=(!strip) # https://github.com/pypa/manylinux/issues/119 +fi + +_dist_name() { + find "$srcdir" -mindepth 1 -maxdepth 1 -type d -printf '%f +' | + grep -v '^_tmpenv$' +} + +if [[ $(_first_source) =~ ^git+ ]]; then + _pkgver() { + ( set -o pipefail + cd "$srcdir/$(_dist_name)" + git describe --long --tags 2>/dev/null | + sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" \ + "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) + } + + pkgver() { _pkgver; } +fi + +_build() { + if _is_wheel; then return; fi + cd "$srcdir" + # See Arch Wiki/PKGBUILD/license. + # Get the first filename that matches. + local test_name + if [[ ${license[0]} =~ ^(BSD|MIT|ZLIB|Python)$ ]]; then + for test_name in LICENSE LICENSE.txt license.txt COPYING COPYING.md COPYING.rst COPYING.txt COPYRIGHT; do + if cp "$srcdir/$(_dist_name)/$test_name" "$srcdir/LICENSE" 2>/dev/null; then + break + fi + done + fi + # Use the latest version of pip, as Arch's version is historically out of + # date(!) and newer versions do fix bugs (sometimes). + python -mvenv --clear --system-site-packages _tmpenv + _tmpenv/bin/pip --quiet install -U pip + # Build the wheel (which we allow to fail) only after fetching the license. + # In order to isolate from ~/.pydistutils.cfg, we need to set $HOME to a + # temporary directory, and thus first $XDG_CACHE_HOME back to its real + # location, so that pip inserts the wheel in the wheel cache. We cannot + # use --global-option=--no-user-cfg instead because that fully disables + # wheels, causing a from-source build of build dependencies such as + # numpy/scipy. + XDG_CACHE_HOME="${XDG_CACHE_HOME:-"$HOME/.cache"}" HOME=_tmpenv \ + _tmpenv/bin/pip wheel -v --no-deps --wheel-dir="$srcdir" \ + "./$(_dist_name)" || true +} + +build() { _build; } + +_check() { + # Define check(), possibly using _check as a helper, to run the tests. + # You may need to call `python setup.py build_ext -i` first. + if _is_wheel; then return; fi + cd "$srcdir/$(_dist_name)" + /usr/bin/python setup.py -q test +} + +_package() { + cd "$srcdir" + # pypa/pip#3063: pip always checks for a globally installed version. + python -mvenv --clear --system-site-packages _tmpenv + _tmpenv/bin/pip install --prefix="$pkgdir/usr" \ + --no-deps --ignore-installed --no-warn-script-location \ + "$(ls ./*.whl 2>/dev/null || echo ./"$(_dist_name)")" + if [[ -d "$pkgdir/usr/bin" ]]; then # Fix entry points. + for f in "$pkgdir/usr/bin/"*; do + if [[ $(head -n1 "$f") = "#!$(readlink -f _tmpenv)/bin/python" ]]; then + sed -i '1c#!/usr/bin/python' "$f" + fi + done + fi + if [[ -d "$pkgdir/usr/etc" ]]; then + mv "$pkgdir/usr/etc" "$pkgdir/etc" + fi + if [[ -f LICENSE ]]; then + install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + fi +} + +package() { _package; } + +. "$(dirname "$BASH_SOURCE")/PKGBUILD_EXTRAS" + +# Remove makedepends already in depends (which may have been listed for the +# first build, but autodetected on the second. +makedepends=($(printf '%s\n' "${makedepends[@]}" | + grep -Pwv "^($(IFS='|'; echo "${depends[*]}"))$")) +: # Apparently ending with makedepends assignment sometimes fails. diff --git a/PKGBUILD_EXTRAS b/PKGBUILD_EXTRAS new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/PKGBUILD_EXTRAS |