* add python-botocore

This commit is contained in:
Alexander Baldeck 2024-11-21 21:18:03 +01:00
parent d88349d5ec
commit 21ea3010b8
7 changed files with 112 additions and 103 deletions

View File

@ -1,33 +0,0 @@
diff --git a/arch/powerpc/boot/util.S b/arch/powerpc/boot/util.S
index f11f0589a669f1..d03cdb7606dcfe 100644
--- a/arch/powerpc/boot/util.S
+++ b/arch/powerpc/boot/util.S
@@ -18,7 +18,7 @@
.text
-/* udelay (on non-601 processors) needs to know the period of the
+/* udelay needs to know the period of the
* timebase in nanoseconds. This used to be hardcoded to be 60ns
* (period of 66MHz/4). Now a variable is used that is initialized to
* 60 for backward compatibility, but it can be overridden as necessary
@@ -37,19 +37,6 @@ timebase_period_ns:
*/
.globl udelay
udelay:
- mfspr r4,SPRN_PVR
- srwi r4,r4,16
- cmpwi 0,r4,1 /* 601 ? */
- bne .Ludelay_not_601
-00: li r0,86 /* Instructions / microsecond? */
- mtctr r0
-10: addi r0,r0,0 /* NOP */
- bdnz 10b
- subic. r3,r3,1
- bne 00b
- blr
-
-.Ludelay_not_601:
mulli r4,r3,1000 /* nanoseconds */
/* Change r4 to be the number of ticks using:
* (nanoseconds + (timebase_period_ns - 1 )) / timebase_period_ns

View File

@ -0,0 +1,28 @@
pkgbase = python-botocore
pkgdesc = A low-level interface to a growing number of Amazon Web Services
pkgver = 1.35.36
pkgrel = 1
url = https://github.com/boto/botocore
arch = any
license = Apache
checkdepends = python-pytest
checkdepends = python-pytest-xdist
checkdepends = python-jsonschema
checkdepends = procps-ng
makedepends = python-build
makedepends = python-installer
makedepends = python-setuptools
makedepends = python-wheel
makedepends = python-awscrt
depends = python
depends = python-certifi
depends = python-dateutil
depends = python-jmespath
depends = python-urllib3
optdepends = python-awscrt
source = python-botocore-1.35.36.tar.gz::https://github.com/boto/botocore/archive/1.35.36.tar.gz
source = tests-keep-env.diff
sha256sums = edda097ff15cda87d2a33935bba119a1214dc5eff6cd76b6924049ba2de8537a
sha256sums = 15c588d3f4cfcc0ef26fc4ff367eb6dc12dc2f303e299cbe397288089ee52a11
pkgname = python-botocore

View File

@ -0,0 +1,8 @@
[python-botocore]
source = "pypi"
pypi = "botocore"
# Custom attributes used by https://gitlab.com/yan12125/aur/
__custom_attributes__.group = "aws"
__custom_attributes__.extras = ["crt"]
__custom_attributes__.non_nvchecker = true

View File

@ -0,0 +1,61 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org>
# Contributor: Jonathan Steel <jsteel at archlinux.org>
# Contributor: Chris Severance aur.severach AatT spamgourmet.com
# Contributor: Ainola
# Contributor: Chris Fordham
pkgname=python-botocore
# https://raw.githubusercontent.com/boto/botocore/develop/CHANGELOG.rst
pkgver=1.35.36
pkgrel=1
pkgdesc='A low-level interface to a growing number of Amazon Web Services'
arch=('any')
url="https://github.com/boto/botocore"
license=('Apache')
depends=('python' 'python-certifi' 'python-dateutil' 'python-jmespath' 'python-urllib3')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel' 'python-awscrt')
# Tests need the 'ps' binary
checkdepends=('python-pytest' 'python-pytest-xdist' 'python-jsonschema' 'procps-ng')
optdepends=(
'python-awscrt'
)
source=($pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz
tests-keep-env.diff)
sha256sums=('edda097ff15cda87d2a33935bba119a1214dc5eff6cd76b6924049ba2de8537a'
'15c588d3f4cfcc0ef26fc4ff367eb6dc12dc2f303e299cbe397288089ee52a11')
prepare() {
cd botocore-$pkgver
# https://github.com/boto/botocore/pull/2791
patch -Np1 -i ../tests-keep-env.diff
}
build() {
cd botocore-$pkgver
python -m build --wheel --no-isolation
}
check() {
cd botocore-$pkgver
export AWS_SECRET_ACCESS_KEY=fake_key
export AWS_ACCESS_KEY_ID=fake_id
export PYTHONPATH="$PWD"
export PYTEST_XDIST_AUTO_NUM_WORKERS=$(echo "$MAKEFLAGS" | grep -oP '\-j\s*\K[0-9]+')
pytest_args=()
if [ -n "$PYTEST_XDIST_AUTO_NUM_WORKERS" ]; then
pytest_args+=(-n auto)
fi
# Many integration tests need real credentials
pytest tests "${pytest_args[@]}" --ignore=tests/integration
}
package() {
cd botocore-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

View File

@ -0,0 +1,15 @@
--- a/tests/__init__.py 2022-10-17 14:59:15.734686304 +0800
+++ b/tests/__init__.py 2022-10-17 14:59:20.814593222 +0800
@@ -165,9 +165,10 @@
def setUp(self):
self.driver = ClientDriver()
- env = None
+ env = os.environ.copy()
if self.INJECT_DUMMY_CREDS:
- env = {'AWS_ACCESS_KEY_ID': 'foo', 'AWS_SECRET_ACCESS_KEY': 'bar'}
+ env['AWS_ACCESS_KEY_ID'] = 'foo'
+ env['AWS_SECRET_ACCESS_KEY'] = 'bar'
self.driver.start(env=env)
def cmd(self, *args):

View File

@ -1,58 +0,0 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Maintainer: Josip Ponjavic <josipponjavic at gmail dot com>
# Contributor: Balló György <ballogyor+arch at gmail dot com>
pkgname=signon-ui
pkgver=0.17+20171022
pkgrel=3.4
_commit=4368bb77d9d1abc2978af514225ba4a42c29a646
pkgdesc='UI component responsible for handling the user interactions which can happen during the login process of an online account'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url='https://launchpad.net/online-accounts-signon-ui'
license=(GPL)
depends=(libaccounts-qt5 signond libnotify)
depends_powerpc=(qt5-webkit)
depends_powerpc64=(qt5-webkit)
depends_powerpc64le=(qt5-webkit)
depends_riscv64=(qt5-webkit)
depends_x86_64=(qt5-webengine)
makedepends=(git)
# when no qt5-webengine is available revert to before it was mandated
case "${CARCH}" in
powerpc*|riscv64) _commit=79d6d672564012af31cf20f3515ffd64edc787a2 ;;
esac
source=("git+https://gitlab.com/accounts-sso/signon-ui.git#commit=${_commit}"
fake-user-agent.patch)
sha256sums=('SKIP'
'5eb7782c6472e51a8107a25324d1d30052bac5d8e9050907cd957c89568fa577')
options=(debug)
prepare() {
cd $pkgname
# Do not install tests
sed -e 's|src \\|src|' -e '/tests/d' -i signon-ui.pro
case "${CARCH}" in
x86_64)
# Fake user ID to bypass Google blacklist
patch -p1 -i ../fake-user-agent.patch
;;
esac
}
build() {
cd $pkgname
qmake-qt5 PREFIX=/usr LIBDIR=/usr/lib
make
}
package() {
cd $pkgname
make INSTALL_ROOT="$pkgdir" install
}

View File

@ -1,12 +0,0 @@
diff --git a/src/qml/WebView.qml b/src/qml/WebView.qml
index 33462b8..b720111 100644
--- a/src/qml/WebView.qml
+++ b/src/qml/WebView.qml
@@ -25,6 +25,7 @@ WebEngineView {
profile: WebEngineProfile {
cachePath: rootDir
persistentStoragePath: rootDir
+ httpUserAgent: "Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/77.0"
}
ProgressBar {