user/authentik: new aport
This commit is contained in:
parent
572ae5b8a9
commit
cf1c67b3aa
52 changed files with 2256 additions and 2 deletions
222
user/authentik/APKBUILD
Normal file
222
user/authentik/APKBUILD
Normal file
|
@ -0,0 +1,222 @@
|
|||
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
|
||||
# Contributor: Leo <thinkabit.ukim@gmail.com>
|
||||
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
|
||||
pkgname=authentik
|
||||
pkgver=2022.12.2
|
||||
pkgrel=0
|
||||
pkgdesc="An open-source Identity Provider focused on flexibility and versatility"
|
||||
url="https://github.com/goauthentik/authentik"
|
||||
arch="all"
|
||||
license="MIT"
|
||||
depends="
|
||||
postgresql
|
||||
py3-aiohttp
|
||||
py3-aiosignal
|
||||
py3-amqp
|
||||
py3-anyio
|
||||
py3-asgiref
|
||||
py3-asn1
|
||||
py3-asn1crypto
|
||||
py3-async-timeout
|
||||
py3-attrs
|
||||
py3-autobahn
|
||||
py3-automat
|
||||
py3-bcrypt
|
||||
py3-billiard
|
||||
py3-cachetools
|
||||
py3-cbor2
|
||||
py3-celery
|
||||
py3-certifi
|
||||
py3-cffi
|
||||
py3-charset-normalizer
|
||||
py3-click
|
||||
py3-click-didyoumean
|
||||
py3-click-plugins
|
||||
py3-click-repl
|
||||
py3-codespell
|
||||
py3-colorama
|
||||
py3-constantly
|
||||
py3-cparser
|
||||
py3-cryptography
|
||||
py3-dacite
|
||||
py3-daphne
|
||||
py3-daphne
|
||||
py3-dateutil
|
||||
py3-deepmerge
|
||||
py3-defusedxml
|
||||
py3-deprecated
|
||||
py3-django
|
||||
py3-django-channels
|
||||
py3-django-channels-redis
|
||||
py3-django-drf-spectacular
|
||||
py3-django-filter
|
||||
py3-django-guardian
|
||||
py3-django-model-utils
|
||||
py3-django-otp
|
||||
py3-django-prometheus
|
||||
py3-django-redis
|
||||
py3-django-rest-framework
|
||||
py3-django-rest-framework-guardian
|
||||
py3-docker
|
||||
py3-dotenv
|
||||
py3-dumb-init
|
||||
py3-duo-client
|
||||
py3-facebook-sdk
|
||||
py3-flower
|
||||
py3-frozenlist
|
||||
py3-geoip2
|
||||
py3-google-auth
|
||||
py3-gunicorn
|
||||
py3-h11
|
||||
py3-httptools
|
||||
py3-humanize
|
||||
py3-hyperlink
|
||||
py3-idna
|
||||
py3-incremental
|
||||
py3-inflection
|
||||
py3-jsonschema
|
||||
py3-jwt
|
||||
py3-kombu
|
||||
py3-kubernetes
|
||||
py3-ldap3
|
||||
py3-lxml
|
||||
py3-maxminddb
|
||||
py3-msgpack
|
||||
py3-multidict
|
||||
py3-oauthlib
|
||||
py3-opencontainers
|
||||
py3-openssl
|
||||
py3-packaging<=21.3-r2
|
||||
py3-paramiko
|
||||
py3-parsing
|
||||
py3-prometheus-client
|
||||
py3-prompt_toolkit
|
||||
py3-psycopg2
|
||||
py3-pycryptodome
|
||||
py3-pydantic
|
||||
py3-pynacl
|
||||
py3-pyrsistent
|
||||
py3-python-jwt
|
||||
py3-redis
|
||||
py3-requests
|
||||
py3-requests-oauthlib
|
||||
py3-rsa
|
||||
py3-sentry-sdk
|
||||
py3-service_identity
|
||||
py3-setuptools
|
||||
py3-six
|
||||
py3-sniffio
|
||||
py3-sqlparse
|
||||
py3-structlog
|
||||
py3-swagger-spec-validator
|
||||
py3-tornado
|
||||
py3-twilio
|
||||
py3-twisted
|
||||
py3-txaio
|
||||
py3-typing-extensions
|
||||
py3-tz
|
||||
py3-ua-parser
|
||||
py3-uritemplate
|
||||
py3-urllib3
|
||||
py3-uvloop
|
||||
py3-vine
|
||||
py3-watchdog
|
||||
py3-watchfiles
|
||||
py3-wcwidth
|
||||
py3-webauthn
|
||||
py3-websocket-client
|
||||
py3-websockets
|
||||
py3-wrapt
|
||||
py3-wsproto
|
||||
py3-xmlsec
|
||||
py3-yaml
|
||||
py3-yarl
|
||||
py3-zope-interface
|
||||
py3-zxcvbn
|
||||
redis
|
||||
uvicorn
|
||||
"
|
||||
makedepends="go npm"
|
||||
# checkdepends scooped up by poetry due to number
|
||||
checkdepends="poetry py3-coverage"
|
||||
# tests disabled for now
|
||||
options="!check chmod-clean"
|
||||
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-install"
|
||||
source="
|
||||
$pkgname-$pkgver.tar.gz::https://github.com/goauthentik/authentik/archive/refs/tags/version/$pkgver.tar.gz
|
||||
authentik.openrc
|
||||
authentik-worker.openrc
|
||||
root-settings-csrf_trusted_origins.patch
|
||||
"
|
||||
builddir="$srcdir/"authentik-version-$pkgver
|
||||
subpackages="$pkgname-openrc $pkgname-doc"
|
||||
|
||||
export GOPATH=$srcdir/go
|
||||
export GOCACHE=$srcdir/go-build
|
||||
export GOTMPDIR=$srcdir
|
||||
|
||||
build() {
|
||||
msg "Building authentik-ldap"
|
||||
go build -o ldap cmd/ldap/server.go
|
||||
msg "Building authentik-proxy"
|
||||
go build -o proxy cmd/proxy/server.go
|
||||
msg "Building authentik-server"
|
||||
go build -o server cmd/server/main.go
|
||||
|
||||
msg "Building authentik-web"
|
||||
cd web
|
||||
npm ci --no-audit
|
||||
npm run build
|
||||
cd ..
|
||||
|
||||
msg "Building website"
|
||||
cd website
|
||||
npm ci --no-audit
|
||||
npm run build
|
||||
}
|
||||
|
||||
check() {
|
||||
poetry install --only dev
|
||||
make test
|
||||
}
|
||||
|
||||
package() {
|
||||
msg "Packaging $pkgname"
|
||||
mkdir -p "$pkgdir"/usr/share/webapps/authentik/web
|
||||
mkdir -p "$pkgdir"/usr/share/webapps/authentik/website
|
||||
mkdir -p "$pkgdir"/usr/share/doc
|
||||
mkdir -p "$pkgdir"/usr/bin
|
||||
cp -dr "$builddir"/authentik "$pkgdir"/usr/share/webapps/authentik
|
||||
cp -dr "$builddir"/web/dist "$pkgdir"/usr/share/webapps/authentik/web/dist
|
||||
cp -dr "$builddir"/web/authentik "$pkgdir"/usr/share/webapps/authentik/web/authentik
|
||||
cp -dr "$builddir"/website/build "$pkgdir"/usr/share/doc/authentik
|
||||
cp -dr "$builddir"/xml "$pkgdir"/usr/share/webapps/authentik/xml
|
||||
cp -dr "$builddir"/tests "$pkgdir"/usr/share/webapps/authentik/tests
|
||||
cp -dr "$builddir"/lifecycle "$pkgdir"/usr/share/webapps/authentik/lifecycle
|
||||
cp -dr "$builddir"/locale "$pkgdir"/usr/share/webapps/authentik/locale
|
||||
install -Dm755 "$builddir"/manage.py "$pkgdir"/usr/share/webapps/authentik/manage.py
|
||||
install -Dm755 "$builddir"/server "$pkgdir"/usr/share/webapps/authentik/server
|
||||
ln -s "/etc/authentik/config.yml" "$pkgdir"/usr/share/webapps/authentik/local.env.yml
|
||||
|
||||
install -Dm755 "$builddir"/proxy "$pkgdir"/usr/bin/authentik-proxy
|
||||
install -Dm755 "$builddir"/ldap "$pkgdir"/usr/bin/authentik-ldap
|
||||
|
||||
install -Dm755 "$srcdir"/$pkgname.openrc \
|
||||
"$pkgdir"/etc/init.d/$pkgname
|
||||
install -Dm755 "$srcdir"/$pkgname-worker.openrc \
|
||||
"$pkgdir"/etc/init.d/$pkgname-worker
|
||||
install -Dm640 "$builddir"/authentik/lib/default.yml \
|
||||
"$pkgdir"/etc/authentik/config.yml
|
||||
sed -i 's|cert_discovery_dir.*|cert_discovery_dir: /var/lib/authentik/certs|' "$pkgdir"/etc/authentik/config.yml
|
||||
sed -i 's|blueprints_dir.*|blueprints_dir: /var/lib/authentik/blueprints|' "$pkgdir"/etc/authentik/config.yml
|
||||
sed -i 's|template_dir.*|template_dir: /var/lib/authentik/templates|' "$pkgdir"/etc/authentik/config.yml
|
||||
echo "\ncsrf:\n trusted_origins: ['auth.example.com']" >> "$pkgdir"/etc/authentik/config.yml
|
||||
echo "\nsecret_key: '@@SECRET_KEY@@'" >> "$pkgdir"/etc/authentik/config.yml
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
b0856e37c5daa48bc032e91da0a1c71938824e4c21a54d0a008d32f16ab4a76c0f0c6cac6a0460aebae44a97653851a3fad764fa0955f7e43429603c61edb550 authentik-2022.12.2.tar.gz
|
||||
4defb4fe3a4230f4aa517fbecd5e5b8bcef2a64e1b40615660ae9eec33597310a09df5e126f4d39ce7764bd1716c0a7040637699135c103cbc1879593c6c06f1 authentik.openrc
|
||||
5d7f28bf5a9f358a0fc3634b2bac6d070c276c3f8181d26fa7e94a17503a4d54556bf7c3207ccd6cb924b81754ed965795d5e2a8aa1af409fd9e32d390ec4cf5 authentik-worker.openrc
|
||||
483befe5e2c90c4f37d5b3ef95ebb99a4208927ee0481e948117a79e36cce110ed53eaa0a9a816cf30ba4c0691b504c9c08d2f9dd7a7bc465a618af260aa1145 root-settings-csrf_trusted_origins.patch
|
||||
"
|
32
user/authentik/authentik-worker.openrc
Normal file
32
user/authentik/authentik-worker.openrc
Normal file
|
@ -0,0 +1,32 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
name="$RC_SVCNAME"
|
||||
cfgfile="/etc/conf.d/$RC_SVCNAME.conf"
|
||||
pidfile="/run/$RC_SVCNAME.pid"
|
||||
working_directory="/usr/share/webapps/authentik"
|
||||
command="celery"
|
||||
command_args="-A authentik.root.celery worker -Ofair --max-tasks-per-child=1 --autoscale 3,1 -E -B -s /tmp/celerybeat-schedule -Q authentik,authentik_scheduled,authentik_events"
|
||||
command_user="authentik"
|
||||
command_group="authentik"
|
||||
start_stop_daemon_args=""
|
||||
command_background="yes"
|
||||
output_log="/var/log/authentik/$RC_SVCNAME.log"
|
||||
error_log="/var/log/authentik/$RC_SVCNAME.err"
|
||||
|
||||
depend() {
|
||||
need redis
|
||||
need postgresql
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
cd "$working_directory"
|
||||
checkpath --directory --owner $command_user:$command_group --mode 0775 \
|
||||
/var/log/authentik \
|
||||
/var/lib/authentik/certs \
|
||||
/var/lib/authentik/blueprints
|
||||
}
|
||||
|
||||
stop_pre() {
|
||||
ebegin "Killing child processes"
|
||||
kill $(ps -o pid= --ppid $(cat $pidfile)) || true
|
||||
}
|
30
user/authentik/authentik.openrc
Normal file
30
user/authentik/authentik.openrc
Normal file
|
@ -0,0 +1,30 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
name="$RC_SVCNAME"
|
||||
cfgfile="/etc/conf.d/$RC_SVCNAME.conf"
|
||||
pidfile="/run/$RC_SVCNAME.pid"
|
||||
working_directory="/usr/share/webapps/authentik"
|
||||
command="/usr/share/webapps/authentik/server"
|
||||
command_user="authentik"
|
||||
command_group="authentik"
|
||||
start_stop_daemon_args=""
|
||||
command_background="yes"
|
||||
output_log="/var/log/authentik/$RC_SVCNAME.log"
|
||||
error_log="/var/log/authentik/$RC_SVCNAME.err"
|
||||
|
||||
depend() {
|
||||
need redis
|
||||
need postgresql
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
cd "$working_directory"
|
||||
checkpath --directory --owner $command_user:$command_group --mode 0775 \
|
||||
/var/log/authentik \
|
||||
/var/lib/authentik/certs
|
||||
}
|
||||
|
||||
stop_pre() {
|
||||
ebegin "Killing child processes"
|
||||
kill $(ps -o pid= --ppid $(cat $pidfile)) || true
|
||||
}
|
39
user/authentik/authentik.post-install
Executable file
39
user/authentik/authentik.post-install
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
group=authentik
|
||||
config_file='/etc/authentik/config.yml'
|
||||
|
||||
setcap 'cap_net_bind_service=+ep' /usr/share/webapps/authentik/server
|
||||
|
||||
if [ $(grep '@@SECRET_KEY@@' "$config_file") ]; then
|
||||
echo "* Generating random secret in $config_file" >&2
|
||||
|
||||
sed -i "s|@@SECRET_KEY@@|$(pwgen -s 50 1 )" "$config_file"
|
||||
chown root:$group "$config_file"
|
||||
chmod 0640 "$config_file"
|
||||
fi
|
||||
|
||||
if [ "${0##*.}" = 'post-upgrade' ]; then
|
||||
cat >&2 <<-EOF
|
||||
*
|
||||
* To finish Authentik upgrade run:
|
||||
*
|
||||
* authentik-manage migrate
|
||||
*
|
||||
EOF
|
||||
else
|
||||
cat >&2 <<-EOF
|
||||
*
|
||||
* 1. Adjust settings in /etc/authentik/config.yml.
|
||||
*
|
||||
* 2. Create database for Authentik:
|
||||
*
|
||||
* psql -c "CREATE ROLE authentik PASSWORD 'top-secret' INHERIT LOGIN;"
|
||||
* psql -c "CREATE DATABASE authentik OWNER authentik ENCODING 'UTF-8';"
|
||||
*
|
||||
* 3. Run "authentik-manage migrate"
|
||||
* 4. Setup admin user at https://<your server>/if/flow/initial-setup/
|
||||
*
|
||||
EOF
|
||||
fi
|
1
user/authentik/authentik.post-upgrade
Symbolic link
1
user/authentik/authentik.post-upgrade
Symbolic link
|
@ -0,0 +1 @@
|
|||
authentik.post-install
|
26
user/authentik/authentik.pre-install
Normal file
26
user/authentik/authentik.pre-install
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
# It's very important to set user/group correctly.
|
||||
|
||||
authentik_dir='/var/lib/authentik'
|
||||
|
||||
if ! getent group authentik 1>/dev/null; then
|
||||
echo '* Creating group authentik' 1>&2
|
||||
|
||||
addgroup -S authentik
|
||||
fi
|
||||
|
||||
if ! id authentik 2>/dev/null 1>&2; then
|
||||
echo '* Creating user authentik' 1>&2
|
||||
|
||||
adduser -DHS -G authentik -h "$authentik_dir" -s /bin/sh \
|
||||
-g "added by apk for authentik" authentik
|
||||
passwd -u authentik 1>/dev/null # unlock
|
||||
fi
|
||||
|
||||
if ! id -Gn authentik | grep -Fq redis; then
|
||||
echo '* Adding user authentik to group redis' 1>&2
|
||||
|
||||
addgroup authentik redis
|
||||
fi
|
||||
|
||||
exit 0
|
26
user/authentik/core-trigger-tasks-in-server.patch
Normal file
26
user/authentik/core-trigger-tasks-in-server.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
diff --git a/authentik/core/apps.py.orig b/authentik/core/apps.py
|
||||
index 4d45603..9cd660f 100644
|
||||
--- a/authentik/core/apps.py.orig
|
||||
+++ b/authentik/core/apps.py
|
||||
@@ -2,6 +2,7 @@
|
||||
from django.conf import settings
|
||||
|
||||
from authentik.blueprints.manager import ManagedAppConfig
|
||||
+from django.conf import settings
|
||||
|
||||
|
||||
class AuthentikCoreConfig(ManagedAppConfig):
|
||||
@@ -18,11 +19,8 @@ class AuthentikCoreConfig(ManagedAppConfig):
|
||||
self.import_module("authentik.core.signals")
|
||||
|
||||
def reconcile_debug_worker_hook(self):
|
||||
- """Dispatch startup tasks inline when debugging"""
|
||||
- if settings.DEBUG:
|
||||
- from authentik.root.celery import worker_ready_hook
|
||||
-
|
||||
- worker_ready_hook()
|
||||
+ from authentik.root.celery import worker_ready_hook
|
||||
+ worker_ready_hook()
|
||||
|
||||
def reconcile_source_inbuilt(self):
|
||||
"""Reconcile inbuilt source"""
|
12
user/authentik/root-settings-csrf_trusted_origins.patch
Normal file
12
user/authentik/root-settings-csrf_trusted_origins.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff --git a/authentik/root/settings.py.orig b/authentik/root/settings.py
|
||||
index ebfc471..ce1ef3b 100644
|
||||
--- a/authentik/root/settings.py.orig
|
||||
+++ b/authentik/root/settings.py
|
||||
@@ -56,6 +56,7 @@ AUTH_USER_MODEL = "authentik_core.User"
|
||||
|
||||
CSRF_COOKIE_NAME = "authentik_csrf"
|
||||
CSRF_HEADER_NAME = "HTTP_X_AUTHENTIK_CSRF"
|
||||
+CSRF_TRUSTED_ORIGINS = CONFIG.y("csrf.trusted_origins")
|
||||
LANGUAGE_COOKIE_NAME = "authentik_language"
|
||||
SESSION_COOKIE_NAME = "authentik_session"
|
||||
SESSION_COOKIE_DOMAIN = CONFIG.y("cookie_domain", None)
|
48
user/celery/APKBUILD
Normal file
48
user/celery/APKBUILD
Normal file
|
@ -0,0 +1,48 @@
|
|||
# Maintainer: Drew DeVault <sir@cmpwn.com>
|
||||
pkgname=celery
|
||||
pkgver=5.2.7
|
||||
pkgrel=0
|
||||
pkgdesc="An asynchronous task queue/job queue based on distributed message passing"
|
||||
url="http://www.celeryproject.org/"
|
||||
arch="noarch !s390x" # lmited by py3-kombu
|
||||
license="Apache-2.0"
|
||||
depends="py3-urllib3 py3-redis py3-vine py3-kombu py3-billiard py3-tz"
|
||||
makedepends="python3-dev py3-setuptools"
|
||||
install="$pkgname.pre-install"
|
||||
source="https://files.pythonhosted.org/packages/source/c/celery/celery-$pkgver.tar.gz
|
||||
celery.confd
|
||||
celery.initd"
|
||||
pkgusers="celery"
|
||||
pkggroups="celery"
|
||||
subpackages="$pkgname-openrc"
|
||||
provides="py3-celery=$pkgver-r$pkgrel"
|
||||
|
||||
# TODO: requires many many many dependencies
|
||||
options="!check"
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
package() {
|
||||
install -dm755 "$pkgdir/$confdir"
|
||||
install -dm755 "$pkgdir/$confdir/conf.d"
|
||||
|
||||
# install scripts
|
||||
install -m755 -D "$srcdir"/$pkgname.initd \
|
||||
"$pkgdir"/etc/init.d/$pkgname
|
||||
install -m644 -D "$srcdir"/$pkgname.confd \
|
||||
"$pkgdir"/etc/conf.d/$pkgname
|
||||
|
||||
python3 setup.py install --prefix=/usr --root="$pkgdir"
|
||||
}
|
||||
|
||||
check() {
|
||||
python3 setup.py test
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
68e3bb082f97ebe20391293cc8fa96c41c8f5ac5e8c24b2b7bd66eb104ec459bdfa49741e47486676e5daa88d7a71e3eb0d9432851aeafc74b0d4352e567e853 celery-5.2.7.tar.gz
|
||||
f9458bce0d8990de646df564bec96baa0e45867f44e41380d38520905e00c941b1ce261314bb78edaa14c591e0aa9386d24c58a61f69fb0fecc616c34a24dea1 celery.confd
|
||||
ff8c0451efa7157fd61f2335f4187bef6cbdd51856c7cfad4de02244c6c5ca7c584f9108731b52f020fee866365d9f092ded266c90d13cb34e92a7ffb63fed57 celery.initd
|
||||
"
|
4
user/celery/celery.confd
Normal file
4
user/celery/celery.confd
Normal file
|
@ -0,0 +1,4 @@
|
|||
CELERY_USER=celery
|
||||
CELERY_LOG=/var/log/celery.log
|
||||
CELERY_REDIR="1>/dev/null 2>> ${CELERY_LOG}"
|
||||
CELERY_OPTS="-A celeryapp -B --loglevel=info $CELERY_REDIR"
|
16
user/celery/celery.initd
Normal file
16
user/celery/celery.initd
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/sbin/openrc-run
|
||||
supervisor=supervise-daemon
|
||||
|
||||
description="celery queue worker"
|
||||
|
||||
: ${CELERY_USER:="celery"}
|
||||
: ${CELERY_GROUP:="$(id -gn $LS_USER)"}
|
||||
|
||||
pidfile="/run/$RC_SVCNAME.sd.pid"
|
||||
supervise_daemon_args="-u $CELERY_USER -g $CELERY_GROUP -p $pidfile"
|
||||
command=/usr/bin/celery
|
||||
command_args="${CELERY_OPTS}"
|
||||
|
||||
depends() {
|
||||
use net
|
||||
}
|
7
user/celery/celery.pre-install
Normal file
7
user/celery/celery.pre-install
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
addgroup -S celery 2>/dev/null
|
||||
adduser -S -D -H -h /usr/share/celery -s /sbin/nologin -G celery -g celery celery 2>/dev/null
|
||||
|
||||
exit 0
|
||||
|
33
user/py3-amqp/APKBUILD
Normal file
33
user/py3-amqp/APKBUILD
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Maintainer: Drew DeVault <sir@cmpwn.com>
|
||||
pkgname=py3-amqp
|
||||
pkgver=5.1.1
|
||||
pkgrel=0
|
||||
pkgdesc="an AMQP implementation"
|
||||
url="https://pypi.python.org/pypi/amqp/"
|
||||
arch="noarch"
|
||||
license="BSD-3-Clause"
|
||||
depends="py3-vine python3"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-vine py3-case py3-nose py2py3-mock"
|
||||
source="https://files.pythonhosted.org/packages/source/a/amqp/amqp-$pkgver.tar.gz"
|
||||
options="!check" # requires a running rabbitmq sever
|
||||
builddir="$srcdir"/amqp-$pkgver
|
||||
|
||||
replaces="py-amqp" # Backwards compatibility
|
||||
provides="py-amqp=$pkgver-r$pkgrel" # Backwards compatibility
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
python3 setup.py test
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 setup.py install --prefix=/usr --root="$pkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
f549a85e4f04543dd8e844edb68350ca185de9259aa896af31ae5ee5dfdfe73f904d95821c403dc797c7f3ada17ce6bff4e0fd9fcdf2abc1b33a94d079f99179 amqp-5.1.1.tar.gz
|
||||
"
|
29
user/py3-cachetools/APKBUILD
Normal file
29
user/py3-cachetools/APKBUILD
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
||||
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
||||
pkgname=py3-cachetools
|
||||
_pyname=cachetools
|
||||
pkgver=4.1.1
|
||||
pkgrel=2
|
||||
pkgdesc="Extensible memoizing collections and decorators"
|
||||
url="https://github.com/tkem/cachetools"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
depends="python3"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/tkem/cachetools/archive/v$pkgver.tar.gz"
|
||||
builddir="$srcdir/$_pyname-$pkgver"
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
python3 -m pytest .
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 setup.py install --prefix=/usr --root="$pkgdir"
|
||||
}
|
||||
|
||||
sha512sums="c5d8a304defd0d9cd767b4e00f70c8df31067003afec43459db239d9c59c582fe6454c2956f5092e15b464bf53adf33a1214c1d03bd2dca610b112b9a63b7a06 py3-cachetools-4.1.1.tar.gz"
|
39
user/py3-certifi/APKBUILD
Normal file
39
user/py3-certifi/APKBUILD
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
|
||||
# Maintainer: Dmitry Romanenko <dmitry@romanenko.in>
|
||||
pkgname=py3-certifi
|
||||
pkgver=2022.12.7
|
||||
pkgrel=1
|
||||
pkgdesc="Python3 package for providing Mozilla's CA Bundle"
|
||||
url="https://pypi.python.org/pypi/certifi"
|
||||
arch="noarch"
|
||||
license="MPL-2.0"
|
||||
depends="python3 ca-certificates-bundle"
|
||||
makedepends="py3-setuptools"
|
||||
source="https://files.pythonhosted.org/packages/source/c/certifi/certifi-$pkgver.tar.gz
|
||||
use-alpine-system-certs.patch
|
||||
"
|
||||
builddir="$srcdir/certifi-$pkgver"
|
||||
|
||||
replaces="py-certifi" # Backwards compatibility
|
||||
provides="py-certifi=$pkgver-r$pkgrel" # Backwards compatibility
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
# no tests provided
|
||||
check() {
|
||||
PYTHONPATH=build/lib python3 -m certifi
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 setup.py install --prefix=/usr --root="$pkgdir"
|
||||
|
||||
# Remove bundled certificates, we use system certificates
|
||||
rm -f "$pkgdir"/usr/lib/python3*/site-packages/certifi/cacert.pem
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
fd08b6bf138aa1b0a47909077642713d80f036e4b18de2c7f236a185521db3d6498a81a60b150124cc4bc21dd7e687badad4324a898117060c9e4ec93dfbdbe8 certifi-2022.12.7.tar.gz
|
||||
1002ff4648c79ced36c27dde110415091685d0a73f346068b38f0110a3439ce01a5db94121a709bda4b91c1a6d1d760c69f7e304aec27690cfe28ca5be725796 use-alpine-system-certs.patch
|
||||
"
|
66
user/py3-certifi/use-alpine-system-certs.patch
Normal file
66
user/py3-certifi/use-alpine-system-certs.patch
Normal file
|
@ -0,0 +1,66 @@
|
|||
NEVER EVER REMOVE THIS PATCH
|
||||
REBASE IT ON TOP OF THE VERSION YOU'RE UPGRADING
|
||||
|
||||
This makes py3-certifi use the system certificates provided by Alpine Linux
|
||||
instead of the ones provided with py3-certifi instead, this allows us to add
|
||||
this package as a dependency for other packages without worries.
|
||||
|
||||
This is based on the patch used by Debian
|
||||
|
||||
diff --git a/certifi/core.py b/certifi/core.py
|
||||
index de02898..9c0235f 100644
|
||||
--- a/certifi/core.py
|
||||
+++ b/certifi/core.py
|
||||
@@ -6,13 +6,13 @@ This module returns the installation location of cacert.pem or its contents.
|
||||
"""
|
||||
import sys
|
||||
|
||||
+ALPINE_CA_CERTS_PATH = '/etc/ssl/certs/ca-certificates.crt'
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
|
||||
from importlib.resources import as_file, files
|
||||
|
||||
- _CACERT_CTX = None
|
||||
- _CACERT_PATH = None
|
||||
+ _CACERT_PATH = ALPINE_CA_CERTS_PATH
|
||||
|
||||
def where() -> str:
|
||||
# This is slightly terrible, but we want to delay extracting the file
|
||||
@@ -45,8 +45,7 @@ elif sys.version_info >= (3, 7):
|
||||
|
||||
from importlib.resources import path as get_path, read_text
|
||||
|
||||
- _CACERT_CTX = None
|
||||
- _CACERT_PATH = None
|
||||
+ _CACERT_PATH = ALPINE_CA_CERTS_PATH
|
||||
|
||||
def where() -> str:
|
||||
# This is slightly terrible, but we want to delay extracting the
|
||||
@@ -71,10 +70,11 @@ elif sys.version_info >= (3, 7):
|
||||
_CACERT_CTX = get_path("certifi", "cacert.pem")
|
||||
_CACERT_PATH = str(_CACERT_CTX.__enter__())
|
||||
|
||||
- return _CACERT_PATH
|
||||
+ return ALPINE_CA_CERTS_PATH
|
||||
|
||||
def contents() -> str:
|
||||
- return read_text("certifi", "cacert.pem", encoding="ascii")
|
||||
+ with open(where(), "r", encoding="ascii") as data:
|
||||
+ return data.read()
|
||||
|
||||
else:
|
||||
import os
|
||||
@@ -100,9 +100,7 @@ else:
|
||||
# If we don't have importlib.resources, then we will just do the old logic
|
||||
# of assuming we're on the filesystem and munge the path directly.
|
||||
def where() -> str:
|
||||
- f = os.path.dirname(__file__)
|
||||
-
|
||||
- return os.path.join(f, "cacert.pem")
|
||||
-
|
||||
+ return ALPINE_CA_CERTS_PATH
|
||||
def contents() -> str:
|
||||
- return read_text("certifi", "cacert.pem", encoding="ascii")
|
||||
+ with open(where(), "r", encoding="ascii") as data:
|
||||
+ return data.read()
|
32
user/py3-click-didyoumean/APKBUILD
Normal file
32
user/py3-click-didyoumean/APKBUILD
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=click-didyoumean
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=0.3.0
|
||||
pkgrel=1
|
||||
arch="noarch"
|
||||
pkgdesc="Enables git-like *did-you-mean* feature in click"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="py3-click"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest py3-vine"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$PWD/src" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
781d3f0f0ce7a8cbc297cce16647dd7bc8f2cc32db9071b68e896d8f01ef08382cd83051db685535b86a77b392ed93f6f8e453ed6d1299065a24df032cd046cb py3-click-didyoumean-0.3.0.tar.gz
|
||||
"
|
37
user/py3-click-repl/APKBUILD
Normal file
37
user/py3-click-repl/APKBUILD
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=click-repl
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=0.2.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="REPL plugin for Click"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="py3-click py3-prompt_toolkit py3-six"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest"
|
||||
subpackages="$pkgname-doc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
export PYTHONPATH="build:${PYTHONPATH}"
|
||||
pytest -v || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --skip-build \
|
||||
--optimize=1 \
|
||||
--root="$pkgdir"
|
||||
install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}/"
|
||||
install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
|
||||
}
|
||||
sha512sums="
|
||||
b377e1efda7f8dd20b90f531c49dd42a372db789331f8cfcca63169be17fe429dfc66d5a1e5ef7376eacfdb41167f933ec68b63a170aae45af09b086f826edf0 py3-click-repl-0.2.0.tar.gz
|
||||
"
|
32
user/py3-dacite/APKBUILD
Normal file
32
user/py3-dacite/APKBUILD
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=dacite
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=1.7.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="This module simplifies creation of data classes (PEP 557) from dictionaries."
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="python3"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$PWD/src" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --root="$pkgdir" --optimize=1
|
||||
install -Dm644 "./LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
sha512sums="
|
||||
1bb5c0ca01810f61c45085f790f16c73e9d25942a6f4062a4f513571d5961776d0c76608044371b7c68f2b070be557eba8e1946ebc23b2f5ac303b2769ff814a py3-dacite-1.7.0.tar.gz
|
||||
"
|
34
user/py3-deepmerge/APKBUILD
Normal file
34
user/py3-deepmerge/APKBUILD
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=deepmerge
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=1.1.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="A tools to handle merging of nested data structures in python."
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="python3"
|
||||
makedepends="py3-build py3-installer py3-setuptools py3-setuptools_scm py3-toml py3-wheel"
|
||||
checkdepends="py3-pytest"
|
||||
subpackages="$pkgname-doc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python -m build --wheel --skip-dependency-check --no-isolation
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$PWD/src" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||
install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname"
|
||||
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
sha512sums="
|
||||
9facde604ee02271ad49d9a14e88fa23690c41728c3c350594533725c2e38803cc75f9345ff19bb63ceb318ea7c58a46ed0d6091682560509401206c8b4e8537 py3-deepmerge-1.1.0.tar.gz
|
||||
"
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
_pyname=channels
|
||||
pkgname="py3-django-$_pyname"
|
||||
pkgver=3.0.3
|
||||
pkgver=4.0.0
|
||||
pkgrel=0
|
||||
arch='noarch'
|
||||
pkgdesc="Developer-friendly asynchrony for Django"
|
||||
|
@ -28,5 +28,5 @@ package() {
|
|||
install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
||||
}
|
||||
sha512sums="
|
||||
cf65140d85b85261d372ff155fcc3fdb0caefa2143b33db30b709527de7104874c29cb573a25c404ea74539abe91059e3ca10d1854e0ef6ce572eef7158cdb72 py3-django-channels-3.0.3.tar.gz
|
||||
903d7e8cc95de8d2754afc665dac828cc9ee19f0938f4908a16e40b5b0e18c62bf45380311c0cc318f106e2ba4997bb5784e31c85914779bd76f69473e4636f5 py3-django-channels-4.0.0.tar.gz
|
||||
"
|
||||
|
|
32
user/py3-django-drf-spectacular/APKBUILD
Normal file
32
user/py3-django-drf-spectacular/APKBUILD
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=drf-spectacular
|
||||
pkgname="py3-django-$_pyname"
|
||||
pkgver=0.25.1
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Sane and flexible OpenAPI 3 schema generation for Django REST framework"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="BSD-3-CLAUSE"
|
||||
depends="py3-django-rest-framework py3-jsonschema py3-uritemplate py3-yaml py3-inflection py3-django-oauth-toolkit py3-jwcrypto"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest py3-pytest-django py3-pytest-cov py3-flake8 py3-mypy py3-isort"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$PWD/src" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
65ca788017ba716bc3637d0b6337a56e0059fdda7768efe20adafa767d32439bf5f0cf25d149acfbbd3808036f6a6980c47b31fa3b6d993ae8ad345e1d136db5 py3-django-drf-spectacular-0.25.1.tar.gz
|
||||
"
|
35
user/py3-django-environ/APKBUILD
Normal file
35
user/py3-django-environ/APKBUILD
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=django-environ
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=0.9.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="A package that allows you to utilize 12factor inspired environment variables to configure your Django application."
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="py3-django"
|
||||
makedepends="py3-build py3-installer py3-setuptools py3-wheel"
|
||||
checkdepends="py3-pytest"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$PWD/src" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||
install -vDm 644 AUTHORS.rst -t "$pkgdir/usr/share/doc/$pkgname/"
|
||||
install -vDm 644 CHANGELOG.rst -t "$pkgdir/usr/share/doc/$pkgname/"
|
||||
install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname/"
|
||||
install -vDm 644 LICENSE.txt -t "$pkgdir/usr/share/licenses/$pkgname/"
|
||||
}
|
||||
sha512sums="
|
||||
74c9f5553e15d7669c1361e327b601f488c676e2decf33c52df5f178f7b7f9fffaff4fc50c1dc6d1231ba6560884c137d32d5c75c990bb87e24c5de8366e77a7 py3-django-environ-0.9.0.tar.gz
|
||||
"
|
38
user/py3-django-guardian/APKBUILD
Normal file
38
user/py3-django-guardian/APKBUILD
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=django-guardian
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=2.4.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Implementation of per object permissions on top of Django’s authorization backend"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="py3-django py3-django-environ"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest py3-pytest-django"
|
||||
subpackages="$pkgname-doc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$PWD/src" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --skip-build \
|
||||
--optimize=1 \
|
||||
--root="$pkgdir"
|
||||
install -vDm 644 AUTHORS -t "$pkgdir/usr/share/doc/$pkgname"
|
||||
install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname"
|
||||
install -vDm 644 CHANGES -t "$pkgdir/usr/share/doc/$pkgname"
|
||||
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
sha512sums="
|
||||
7e65a27fbb485a047dd02466b7e36daceb4a27b5ff30ec035fa37b7d300e78e43de213606e54d0b1be2e64ae8835a55cef98788ae45ec2446e502fdd312d8ed6 py3-django-guardian-2.4.0.tar.gz
|
||||
"
|
32
user/py3-django-oauth-toolkit/APKBUILD
Normal file
32
user/py3-django-oauth-toolkit/APKBUILD
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=django-oauth-toolkit
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=2.2.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="OAuth2 Provider for Django"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="BSD-3-CLAUSE"
|
||||
depends="py3-django py3-oauthlib"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$srcdir" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
ba370404f589793df1edc35b4d71dd2c117e3253637dd1d39d2bdb083b0950b885f725cf43f56a8f472f4deec7eca5f0e05e39208eaef969a2cee6ec5bbd1a3f py3-django-oauth-toolkit-2.2.0.tar.gz
|
||||
"
|
32
user/py3-django-otp/APKBUILD
Normal file
32
user/py3-django-otp/APKBUILD
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=django-otp
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=1.1.4
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="A pluggable framework for adding two-factor authentication to Django using one-time passwords."
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="BSD-2-CLAUSE"
|
||||
depends="py3-django py3-qrcode"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-tox"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
tox -e python3 || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --skip-build --root="$pkgdir/" --optimize=1
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
sha512sums="
|
||||
24e10bbf7d8f64b0f69c8a2cfc4a818aade4579721fd1af8c792d9e8f83560b8f3bf03384472bfc759b9838a873b4936d1a721f4588f49c0418f55838c2597e7 py3-django-otp-1.1.4.tar.gz
|
||||
"
|
32
user/py3-django-prometheus/APKBUILD
Normal file
32
user/py3-django-prometheus/APKBUILD
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=django-prometheus
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=2.2.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Django middlewares to monitor your application with Prometheus.io."
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="py3-django py3-prometheus-client py3-psycopg2 py3-mysqlclient py3-memcached py3-django-redis"
|
||||
makedepends="py3-setuptools py3-pip py3-wheel"
|
||||
checkdepends="py3-pytest"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$PWD/src" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
a72c8345f220799ad0709e0e73912229267b5e01fc67ae7f647e53ccf7c7e170ad2456c81070a002dc411e840b1129d55719a7aa891b4dabe262837c8c7b3db5 py3-django-prometheus-2.2.0.tar.gz
|
||||
"
|
28
user/py3-django-redis/APKBUILD
Normal file
28
user/py3-django-redis/APKBUILD
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=django-redis
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=5.2.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Full featured redis cache backend for Django."
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="BSD-3-CLAUSE"
|
||||
depends="py3-django"
|
||||
makedepends="py3-setuptools py3-redis"
|
||||
checkdepends="py3-pytest"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$PWD/src" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --root="${pkgdir}" -O1
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
65d3dc6b1d72c8b90908cf368cb66ac2eb74bdd32d0b42c8a5288b4448bd7444b21320251262627bc950eaf0d1a1ef0c3014761b690122bea9e5e20f744dd433 py3-django-redis-5.2.0.tar.gz
|
||||
"
|
32
user/py3-django-rest-framework-guardian/APKBUILD
Normal file
32
user/py3-django-rest-framework-guardian/APKBUILD
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=djangorestframework-guardian
|
||||
pkgname="py3-django-rest-framework-guardian"
|
||||
pkgver=0.3.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="django-guardian support for Django REST Framework"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="py3-django-rest-framework"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$PWD/src" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
a6fb1993f558a5267af5b303e08632a6128fa68057d6df62c111a7a10ad1817942a1bcb9d61abf34f7580c79c93970894f81d6e8ab94158635da298e036471cc py3-django-rest-framework-guardian-0.3.0.tar.gz
|
||||
"
|
37
user/py3-docker/APKBUILD
Normal file
37
user/py3-docker/APKBUILD
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=docker
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=6.0.1
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="A Python library for the Docker Engine API."
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="Apache-2.0"
|
||||
depends="py3-packaging py3-requests py3-urllib3 py3-websocket-client py3-paramiko"
|
||||
makedepends="py3-build py3-installer py3-setuptools py3-setuptools_scm py3-wheel"
|
||||
checkdepends="py3-pytest py3-flake8 py3-coverage py3-pytest-cov py3-pytest-timeout"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
prepare() {
|
||||
sed -i 's/==.*$//' test-requirements.txt requirements.txt
|
||||
}
|
||||
|
||||
build() {
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
|
||||
python -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
check() {
|
||||
py.test --cov=docker tests/unit || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
1a598396ac96a7f63af681c8f0f8b8632b1049a3fa66fd595f8cf3460484826bdbbe83ed378412f65e2fe9ae0b36976dfddbee5c206ce36bd742c3be2ff56d94 py3-docker-6.0.1.tar.gz
|
||||
"
|
33
user/py3-dumb-init/APKBUILD
Normal file
33
user/py3-dumb-init/APKBUILD
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=dumb-init
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=1.2.5
|
||||
_pkgver=1.2.5.post1
|
||||
pkgrel=0
|
||||
arch="all"
|
||||
pkgdesc="Simple wrapper script which proxies signals to a child"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="python3"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest"
|
||||
source="$pkgname-$_pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$_pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$_pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$srcdir" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
8527ac64a4219d0bde3612b8153056b44203656aed86b1bd047b4649ee3f7e04e0c0a669841fc2f176875993d61d8d80c980a410bcd92bb8ddc9577b6980fa42 py3-dumb-init-1.2.5.post1.tar.gz
|
||||
"
|
32
user/py3-duo-client/APKBUILD
Normal file
32
user/py3-duo-client/APKBUILD
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=duo_client
|
||||
pkgname="py3-duo-client"
|
||||
pkgver=4.5.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Reference client for Duo Security APIs"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="BSD-3-CLAUSE"
|
||||
depends="py3-six"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest py3-nose2 py3-flake8 py3-mock py3-tz py3-freezegun"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$srcdir" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
ace30ae776696597e84c7922d31cd328fe942c92373b3ba90e4f3ed4a357e2dd327a6435dde5db33ed41e0f10263bdc67d110755b0e143fdfab029af15c204ee py3-duo-client-4.5.0.tar.gz
|
||||
"
|
32
user/py3-facebook-sdk/APKBUILD
Normal file
32
user/py3-facebook-sdk/APKBUILD
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=facebook-sdk
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=3.1.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Python SDK for Facebook's Graph API"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="Apache-2.0"
|
||||
depends="py3-requests"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/mobolic/facebook-sdk/archive/refs/tags/v$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$srcdir" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
90bb8242107ba37e0b3e05b91f2f8be07b359aa7c60646c1319f38a0ad910eb18b432af75515947109745539a6728b6571ceeb0239e8b94a669455d809cfab59 py3-facebook-sdk-3.1.0.tar.gz
|
||||
"
|
32
user/py3-flower/APKBUILD
Normal file
32
user/py3-flower/APKBUILD
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=flower
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=1.2.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Real-time monitor and web admin for Celery distributed task queue"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="BSD-3-CLAUSE"
|
||||
depends="py3-redis py3-humanize py3-prometheus-client py3-click"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest py3-tornado py3-celery"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$srcdir" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --root="$pkgdir" -O1
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
b0366816988a6dbc44be551d1609e33ae73a824901cc1c641a1cd661c5d58d67a2df52cf22f722c04817097cabbe5a996775f34ec8f52771442ff3d081bd1ed2 py3-flower-1.2.0.tar.gz
|
||||
"
|
58
user/py3-google-auth/APKBUILD
Normal file
58
user/py3-google-auth/APKBUILD
Normal file
|
@ -0,0 +1,58 @@
|
|||
# Contributor: Keith Maxwell <keith.maxwell@gmail.com>
|
||||
# Maintainer: Keith Maxwell <keith.maxwell@gmail.com>
|
||||
pkgname=py3-google-auth
|
||||
_pyname=google-auth
|
||||
pkgver=2.15.0
|
||||
pkgrel=1
|
||||
pkgdesc="Google authentication library for Python."
|
||||
url="https://google-auth.readthedocs.io/en/latest/"
|
||||
arch="noarch"
|
||||
license="Apache-2.0"
|
||||
depends="
|
||||
python3
|
||||
py3-cachetools
|
||||
py3-asn1-modules
|
||||
py3-rsa
|
||||
py3-setuptools
|
||||
py3-six
|
||||
"
|
||||
checkdepends="
|
||||
py3-flask
|
||||
py3-freezegun
|
||||
py3-mock
|
||||
py3-oauth2client
|
||||
py3-openssl
|
||||
py3-pytest
|
||||
py3-pytest-cov
|
||||
py3-pytest-localserver
|
||||
py3-pyu2f
|
||||
py3-requests
|
||||
py3-responses
|
||||
py3-urllib3
|
||||
py3-cryptography
|
||||
py3-certifi
|
||||
"
|
||||
case "$CARCH" in
|
||||
ppc64le) ;; # no py3-grpcio, -needs UnscaledCycleClock::Frequency()
|
||||
*) checkdepends="$checkdepends py3-grpcio" ;; # to run full suite
|
||||
esac
|
||||
|
||||
source="https://files.pythonhosted.org/packages/source/g/google-auth/google-auth-$pkgver.tar.gz
|
||||
"
|
||||
|
||||
builddir="$srcdir/$_pyname-$pkgver"
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 setup.py install --prefix=/usr --root="$pkgdir"
|
||||
}
|
||||
|
||||
check() {
|
||||
python3 -m pytest
|
||||
}
|
||||
sha512sums="
|
||||
4a564503195e4a96ac2a89bb208c37e434185439533913285ca03a3627f28e641a99224ae285ced84050fdc6073e075b1ba288e9a9c18d3e6adf70509b5ee68b google-auth-2.15.0.tar.gz
|
||||
"
|
295
user/py3-google-auth/remove-unnecessary-dependencies.patch
Normal file
295
user/py3-google-auth/remove-unnecessary-dependencies.patch
Normal file
|
@ -0,0 +1,295 @@
|
|||
From 5f08cd2208c8a6edcbf7be6511089d8a600d90d3 Mon Sep 17 00:00:00 2001
|
||||
From: Keith Maxwell <keith.maxwell@gmail.com>
|
||||
Date: Wed, 15 Apr 2020 10:30:31 +0100
|
||||
Subject: [PATCH] fix(deps): use mock from stdlib in tests
|
||||
|
||||
This change removes an unnecessary dependency in the tests.
|
||||
|
||||
The [mock package] is a backport of functionality from the Python 3.3 standard library to Python 2.7. google-auth-library-python is [not supported] on
|
||||
Python 2.7. Using `import mock` instead of `from unittest import mock` adds an unnecessary dependency, for no apparent gain.
|
||||
|
||||
[mock package]: https://pypi.org/project/mock/
|
||||
[not supported]: https://github.com/googleapis/google-auth-library-python#deprecated-python-versions
|
||||
---
|
||||
tests/compute_engine/test__metadata.py | 2 +-
|
||||
tests/compute_engine/test_credentials.py | 2 +-
|
||||
tests/conftest.py | 2 +-
|
||||
tests/crypt/test__python_rsa.py | 2 +-
|
||||
tests/oauth2/test__client.py | 2 +-
|
||||
tests/oauth2/test_credentials.py | 2 +-
|
||||
tests/oauth2/test_id_token.py | 2 +-
|
||||
tests/oauth2/test_service_account.py | 2 +-
|
||||
tests/test__cloud_sdk.py | 2 +-
|
||||
tests/test__default.py | 2 +-
|
||||
tests/test__oauth2client.py | 2 +-
|
||||
tests/test_app_engine.py | 2 +-
|
||||
tests/test_iam.py | 2 +-
|
||||
tests/test_impersonated_credentials.py | 2 +-
|
||||
tests/test_jwt.py | 2 +-
|
||||
tests/transport/test__mtls_helper.py | 2 +-
|
||||
tests/transport/test_grpc.py | 2 +-
|
||||
tests/transport/test_mtls.py | 2 +-
|
||||
tests/transport/test_requests.py | 2 +-
|
||||
tests/transport/test_urllib3.py | 2 +-
|
||||
20 files changed, 20 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/tests/compute_engine/test__metadata.py b/tests/compute_engine/test__metadata.py
|
||||
index 8b5eece7..c376dbf3 100644
|
||||
--- a/tests/compute_engine/test__metadata.py
|
||||
+++ b/tests/compute_engine/test__metadata.py
|
||||
@@ -16,7 +16,7 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
from six.moves import http_client
|
||||
from six.moves import reload_module
|
||||
diff --git a/tests/compute_engine/test_credentials.py b/tests/compute_engine/test_credentials.py
|
||||
index 98def0fc..486eb618 100644
|
||||
--- a/tests/compute_engine/test_credentials.py
|
||||
+++ b/tests/compute_engine/test_credentials.py
|
||||
@@ -14,7 +14,7 @@
|
||||
import base64
|
||||
import datetime
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
import responses
|
||||
|
||||
diff --git a/tests/conftest.py b/tests/conftest.py
|
||||
index cf8a0f9e..7b5eb1d0 100644
|
||||
--- a/tests/conftest.py
|
||||
+++ b/tests/conftest.py
|
||||
@@ -15,7 +15,7 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
|
||||
|
||||
diff --git a/tests/crypt/test__python_rsa.py b/tests/crypt/test__python_rsa.py
|
||||
index 886ee55a..f2d31159 100644
|
||||
--- a/tests/crypt/test__python_rsa.py
|
||||
+++ b/tests/crypt/test__python_rsa.py
|
||||
@@ -15,7 +15,7 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
from pyasn1_modules import pem
|
||||
import pytest
|
||||
import rsa
|
||||
diff --git a/tests/oauth2/test__client.py b/tests/oauth2/test__client.py
|
||||
index c3ae2af9..f2c22ab3 100644
|
||||
--- a/tests/oauth2/test__client.py
|
||||
+++ b/tests/oauth2/test__client.py
|
||||
@@ -16,7 +16,7 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
import six
|
||||
from six.moves import http_client
|
||||
diff --git a/tests/oauth2/test_credentials.py b/tests/oauth2/test_credentials.py
|
||||
index 76aa463c..93126e10 100644
|
||||
--- a/tests/oauth2/test_credentials.py
|
||||
+++ b/tests/oauth2/test_credentials.py
|
||||
@@ -18,7 +18,7 @@
|
||||
import pickle
|
||||
import sys
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
|
||||
from google.auth import _helpers
|
||||
diff --git a/tests/oauth2/test_id_token.py b/tests/oauth2/test_id_token.py
|
||||
index ff858078..28750cc3 100644
|
||||
--- a/tests/oauth2/test_id_token.py
|
||||
+++ b/tests/oauth2/test_id_token.py
|
||||
@@ -15,7 +15,7 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
|
||||
from google.auth import environment_vars
|
||||
diff --git a/tests/oauth2/test_service_account.py b/tests/oauth2/test_service_account.py
|
||||
index 897374a6..70460bcd 100644
|
||||
--- a/tests/oauth2/test_service_account.py
|
||||
+++ b/tests/oauth2/test_service_account.py
|
||||
@@ -16,7 +16,7 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from google.auth import _helpers
|
||||
from google.auth import crypt
|
||||
diff --git a/tests/test__cloud_sdk.py b/tests/test__cloud_sdk.py
|
||||
index 33776042..f8063fd2 100644
|
||||
--- a/tests/test__cloud_sdk.py
|
||||
+++ b/tests/test__cloud_sdk.py
|
||||
@@ -17,7 +17,7 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
|
||||
from google.auth import _cloud_sdk
|
||||
diff --git a/tests/test__default.py b/tests/test__default.py
|
||||
index 35000b04..8ef8b6cb 100644
|
||||
--- a/tests/test__default.py
|
||||
+++ b/tests/test__default.py
|
||||
@@ -15,7 +15,7 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
|
||||
from google.auth import _default
|
||||
diff --git a/tests/test__oauth2client.py b/tests/test__oauth2client.py
|
||||
index 6b1112b5..9002a40c 100644
|
||||
--- a/tests/test__oauth2client.py
|
||||
+++ b/tests/test__oauth2client.py
|
||||
@@ -16,7 +16,7 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import oauth2client.client
|
||||
import oauth2client.contrib.gce
|
||||
import oauth2client.service_account
|
||||
diff --git a/tests/test_app_engine.py b/tests/test_app_engine.py
|
||||
index 9dfdfa65..e363bad3 100644
|
||||
--- a/tests/test_app_engine.py
|
||||
+++ b/tests/test_app_engine.py
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
import datetime
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
|
||||
from google.auth import app_engine
|
||||
diff --git a/tests/test_iam.py b/tests/test_iam.py
|
||||
index c98a138f..95555925 100644
|
||||
--- a/tests/test_iam.py
|
||||
+++ b/tests/test_iam.py
|
||||
@@ -16,7 +16,7 @@
|
||||
import datetime
|
||||
import json
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
from six.moves import http_client
|
||||
|
||||
diff --git a/tests/test_impersonated_credentials.py b/tests/test_impersonated_credentials.py
|
||||
index 19e2f342..53374704 100644
|
||||
--- a/tests/test_impersonated_credentials.py
|
||||
+++ b/tests/test_impersonated_credentials.py
|
||||
@@ -16,7 +16,7 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
from six.moves import http_client
|
||||
|
||||
diff --git a/tests/test_jwt.py b/tests/test_jwt.py
|
||||
index 488aee46..5a8cb501 100644
|
||||
--- a/tests/test_jwt.py
|
||||
+++ b/tests/test_jwt.py
|
||||
@@ -17,7 +17,7 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
|
||||
from google.auth import _helpers
|
||||
diff --git a/tests/transport/test__mtls_helper.py b/tests/transport/test__mtls_helper.py
|
||||
index 04d0b56d..bfbabc18 100644
|
||||
--- a/tests/transport/test__mtls_helper.py
|
||||
+++ b/tests/transport/test__mtls_helper.py
|
||||
@@ -15,7 +15,7 @@
|
||||
import os
|
||||
import re
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
from OpenSSL import crypto
|
||||
import pytest
|
||||
|
||||
diff --git a/tests/transport/test_grpc.py b/tests/transport/test_grpc.py
|
||||
index c3da76df..9f073dfc 100644
|
||||
--- a/tests/transport/test_grpc.py
|
||||
+++ b/tests/transport/test_grpc.py
|
||||
@@ -16,7 +16,7 @@
|
||||
import os
|
||||
import time
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
|
||||
from google.auth import _helpers
|
||||
diff --git a/tests/transport/test_mtls.py b/tests/transport/test_mtls.py
|
||||
index d3bc3915..4c034123 100644
|
||||
--- a/tests/transport/test_mtls.py
|
||||
+++ b/tests/transport/test_mtls.py
|
||||
@@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
|
||||
from google.auth import exceptions
|
||||
diff --git a/tests/transport/test_requests.py b/tests/transport/test_requests.py
|
||||
index 77e1527a..8c4f33a4 100644
|
||||
--- a/tests/transport/test_requests.py
|
||||
+++ b/tests/transport/test_requests.py
|
||||
@@ -17,7 +17,7 @@
|
||||
import sys
|
||||
|
||||
import freezegun
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import OpenSSL
|
||||
import pytest
|
||||
import requests
|
||||
diff --git a/tests/transport/test_urllib3.py b/tests/transport/test_urllib3.py
|
||||
index 1a1c0a1e..929570e9 100644
|
||||
--- a/tests/transport/test_urllib3.py
|
||||
+++ b/tests/transport/test_urllib3.py
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
import sys
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import OpenSSL
|
||||
import pytest
|
||||
from six.moves import http_client
|
47
user/py3-gunicorn/APKBUILD
Normal file
47
user/py3-gunicorn/APKBUILD
Normal file
|
@ -0,0 +1,47 @@
|
|||
# Contributor: <xmingske@gmail.com>
|
||||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||
pkgname=py3-gunicorn
|
||||
_pkgname=gunicorn
|
||||
pkgver=20.1.0
|
||||
pkgrel=2
|
||||
pkgdesc="WSGI HTTP Server for UNIX"
|
||||
url="https://gunicorn.org/"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
depends="py3-setuptools"
|
||||
checkdepends="py3-pytest py3-pytest-cov py3-aiohttp py3-gevent"
|
||||
source="
|
||||
$_pkgname-$pkgver.tar.gz::https://github.com/benoitc/gunicorn/archive/$pkgver.tar.gz
|
||||
revert-log-a-warning-when-a-worker-was-terminated-due-to-a-signal.patch
|
||||
"
|
||||
builddir="$srcdir/$_pkgname-$pkgver"
|
||||
|
||||
replaces=py-gunicorn # Backwards compatibility
|
||||
provides=py-gunicorn=$pkgver-r$pkgrel # Backwards compatibility
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
# use installed checkdepends instead of fetching from pypi
|
||||
sed -i \
|
||||
-e 's/==.*//' \
|
||||
-e '/cover/d' \
|
||||
requirements_test.txt
|
||||
}
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH=build/lib pytest \
|
||||
--deselect tests/workers/test_geventlet.py
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 setup.py install --prefix=/usr --root="$pkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
4fd905f62adc30e044cf2a56a1a77e14bc633258267d6bfbd4f6a68494f93f377e9fb9ed94fab7f11f9d7813857a680974a88c4b6bf97d4f1b74792a81810111 gunicorn-20.1.0.tar.gz
|
||||
ca860cfeb75d138f56ed15c74a4c1f521e876fa38b36a0fc3223790323b1a447dcf4a96894ade1cb8b74d90d74b5f5aa4d3907abe169857ece1bef37ffe50218 revert-log-a-warning-when-a-worker-was-terminated-due-to-a-signal.patch
|
||||
"
|
|
@ -0,0 +1,28 @@
|
|||
From 76f8da24cbb992d168e01bda811452bcf3b8f5b3 Mon Sep 17 00:00:00 2001
|
||||
From: benoitc <bchesneau@gmail.com>
|
||||
Date: Fri, 17 Dec 2021 15:16:34 +0100
|
||||
Subject: [PATCH] Revert "Log a warning when a worker was terminated due to a
|
||||
signal"
|
||||
|
||||
This reverts commit b695b497b9b8e7351808848ab9e342219601742a.
|
||||
---
|
||||
gunicorn/arbiter.py | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py
|
||||
index 24ec38744..7ca2f6b79 100644
|
||||
--- a/gunicorn/arbiter.py
|
||||
+++ b/gunicorn/arbiter.py
|
||||
@@ -526,12 +526,6 @@ def reap_workers(self):
|
||||
if exitcode == self.APP_LOAD_ERROR:
|
||||
reason = "App failed to load."
|
||||
raise HaltServer(reason, self.APP_LOAD_ERROR)
|
||||
- if os.WIFSIGNALED(status):
|
||||
- self.log.warning(
|
||||
- "Worker with pid %s was terminated due to signal %s",
|
||||
- wpid,
|
||||
- os.WTERMSIG(status)
|
||||
- )
|
||||
|
||||
worker = self.WORKERS.pop(wpid, None)
|
||||
if not worker:
|
35
user/py3-hatch-fancy-pypi-readme/APKBUILD
Normal file
35
user/py3-hatch-fancy-pypi-readme/APKBUILD
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=hatch_fancy_pypi_readme
|
||||
pkgname="py3-hatch-fancy-pypi-readme"
|
||||
pkgver=22.8.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Fancy PyPI READMEs with Hatch"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="py3-hatchling"
|
||||
makedepends="py3-build py3-installer"
|
||||
checkdepends="py3-pytest py3-wheel"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python3 -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
check() {
|
||||
# Install to a temporary root for test_packaging
|
||||
pyver=$(python3 -c "import sys; print('{}.{}'.format(*sys.version_info[:2]))")
|
||||
python3 -m installer --destdir="$srcdir/tmp_install" dist/*.whl
|
||||
PYTHONPATH="$srcdir"/tmp_install/usr/lib/python$pyver/site-packages pytest tests || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer --destdir="$pkgdir" dist/*.whl
|
||||
install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
e8f28a9020fc38bb03187e85688531c0fa895fcc56f3deb241bf19a71b2e88f2a354526eabe1a8e0bf7736f97883208eec2a7eac4199e08ddc40988643491632 py3-hatch-fancy-pypi-readme-22.8.0.tar.gz
|
||||
"
|
33
user/py3-kombu/APKBUILD
Normal file
33
user/py3-kombu/APKBUILD
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Contributor: Stefan Wagner <stw@bit-strickerei.de>
|
||||
# Maintainer: Drew DeVault <sir@cmpwn.com>
|
||||
pkgname=py3-kombu
|
||||
pkgver=5.2.4
|
||||
pkgrel=0
|
||||
pkgdesc="a message queue abstraction layer"
|
||||
options="!check" # 3 Redis tests fail
|
||||
url="https://pypi.python.org/pypi/kombu/"
|
||||
arch="noarch !s390x" # Limited by py3-dill
|
||||
license="BSD-3-Clause"
|
||||
depends="py3-amqp py3-vine"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pyro4 py3-case py3-nose py3-mock py3-tz py3-pytest py3-sqlalchemy py3-fakeredis"
|
||||
source="https://files.pythonhosted.org/packages/source/k/kombu/kombu-$pkgver.tar.gz"
|
||||
builddir="$srcdir/kombu-$pkgver"
|
||||
|
||||
replaces="py-kombu" # Backwards compatibility
|
||||
provides="py-kombu=$pkgver-r$pkgrel" # Backwards compatibility
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
python3 setup.py test
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 setup.py install --prefix=/usr --root="$pkgdir"
|
||||
}
|
||||
sha512sums="
|
||||
695813bee71d627649e772b45b25494784a6a81bcad92331160705e34d8b2268fa90629983ebcfd04ec23208508d422f1834cc56895532911602d58ec0090a03 kombu-5.2.4.tar.gz
|
||||
"
|
32
user/py3-memcached/APKBUILD
Normal file
32
user/py3-memcached/APKBUILD
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=python-memcached
|
||||
pkgname="py3-memcached"
|
||||
pkgver=1.59
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Python interface to memcached"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="Python-2.0"
|
||||
depends="py3-six"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-tox"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/linsomniac/python-memcached/archive/refs/tags/$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
tox -e python3 || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 setup.py install --root="$pkgdir" --optimize=1
|
||||
install -Dm644 PSF.LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
d7ff45a329f2a9bf97fdc7c0268c2c67046c3501270fcf03578b955c2da35904d7bdecd4239924d390797ddff8f4cc69fc5743f4d4f663cdb9f2f8c7e8159512 py3-memcached-1.59.tar.gz
|
||||
"
|
32
user/py3-opencontainers/APKBUILD
Normal file
32
user/py3-opencontainers/APKBUILD
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=opencontainers
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=0.0.14
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Python module for oci specifications"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MPL-2.0"
|
||||
depends="python3 py3-requests"
|
||||
makedepends="py3-setuptools py3-pip py3-wheel"
|
||||
checkdepends="py3-pytest"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$srcdir" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
b0f0edb8d11c825e7bd64b0c38fb227823de0065dc35703cc930e5ad3a5c875abe5a8c8e16f34331ca2246f48887d34ab9749ca3b547216e0ece1aa7659dc845 py3-opencontainers-0.0.14.tar.gz
|
||||
"
|
44
user/py3-packaging/APKBUILD
Normal file
44
user/py3-packaging/APKBUILD
Normal file
|
@ -0,0 +1,44 @@
|
|||
# Contributor: Breno Leitao <breno.leitao@gmail.com>
|
||||
# Maintainer:
|
||||
pkgname=py3-packaging
|
||||
_pkgname=packaging
|
||||
pkgver=21.3
|
||||
pkgrel=2
|
||||
pkgdesc="Core utilities for Python3 packages"
|
||||
options="!check" # Requires py3-pytest which requires py3-setuptools
|
||||
url="https://pypi.python.org/pypi/packaging"
|
||||
arch="noarch"
|
||||
license="Apache-2.0 AND BSD-2-Clause"
|
||||
depends="python3 py3-parsing"
|
||||
# disable check to break circular dep with py3-setuptools
|
||||
checkdepends="py3-pytest py3-pretend"
|
||||
source="https://files.pythonhosted.org/packages/source/p/packaging/packaging-$pkgver.tar.gz"
|
||||
builddir="$srcdir/$_pkgname-$pkgver"
|
||||
|
||||
replaces="py-packaging" # Backwards compatibility
|
||||
provides="py-packaging=$pkgver-r$pkgrel" # Backwards compatibility
|
||||
|
||||
[ "$CARCH" = s390x ] && options="$options !check" # fails a lot
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 setup.py install --prefix=/usr --root="$pkgdir"
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$PWD/build/lib" python3 -m pytest \
|
||||
--ignore=tests/test_manylinux.py \
|
||||
--ignore=tests/test_markers.py \
|
||||
--ignore=tests/test_specifiers.py \
|
||||
--ignore=tests/test_tags.py \
|
||||
--ignore=tests/test_version.py
|
||||
# tests that require https://pypi.org/project/pretend/ are disabled
|
||||
# above because py3-pretend hasn't been packaged for Alpine Linux
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
2e3aa276a4229ac7dc0654d586799473ced9761a83aa4159660d37ae1a2a8f30e987248dd0e260e2834106b589f259a57ce9936eef0dcc3c430a99ac6b663e05 packaging-21.3.tar.gz
|
||||
"
|
35
user/py3-pytest-django/APKBUILD
Normal file
35
user/py3-pytest-django/APKBUILD
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=pytest-django
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=4.5.2
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="A Django plugin for py.test"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="BSD-3-Clause"
|
||||
depends="py3-pytest"
|
||||
makedepends="py3-setuptools_scm"
|
||||
checkdepends="py3-pytest-xdist py3-django"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
python setup.py install --root="$PWD/tmp_install" --optimize=1
|
||||
PYTHONPATH="$PWD/tmp_install/usr/lib/python3.10/site-packages:$PYTHONPATH:$PWD" \
|
||||
DJANGO_SETTINGS_MODULE=pytest_django_test.settings_sqlite \
|
||||
py.test tests || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --root="$pkgdir" --optimize=1
|
||||
install -Dm664 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
||||
}
|
||||
sha512sums="
|
||||
bde0ee6f1c728ff2b6f965150fbbcb25c8ef5a24732256d2d688ee95c243ca2dd0f9606fac559b2c204dd2835ff5362a934cd176fabc7479b21a1e55fe284f4d py3-pytest-django-4.5.2.tar.gz
|
||||
"
|
183
user/py3-redis-nonfree/0002-Drop-tests-test_ssl.py.patch
Normal file
183
user/py3-redis-nonfree/0002-Drop-tests-test_ssl.py.patch
Normal file
|
@ -0,0 +1,183 @@
|
|||
From 9bf9f40f41141942be166966ec434720da5b85bd Mon Sep 17 00:00:00 2001
|
||||
From: Drew DeVault <sir@cmpwn.com>
|
||||
Date: Wed, 29 Dec 2021 10:16:53 +0100
|
||||
Subject: [PATCH 2/2] Drop tests/test_ssl.py
|
||||
|
||||
This test expects to be run in the upstream project's CI enviornment.
|
||||
|
||||
Ref https://github.com/redis/redis-py/issues/1838
|
||||
---
|
||||
tests/test_ssl.py | 161 ----------------------------------------------
|
||||
1 file changed, 161 deletions(-)
|
||||
delete mode 100644 tests/test_ssl.py
|
||||
|
||||
diff --git a/tests/test_ssl.py b/tests/test_ssl.py
|
||||
deleted file mode 100644
|
||||
index a2f66b2..0000000
|
||||
--- a/tests/test_ssl.py
|
||||
+++ /dev/null
|
||||
@@ -1,161 +0,0 @@
|
||||
-import os
|
||||
-import socket
|
||||
-import ssl
|
||||
-from urllib.parse import urlparse
|
||||
-
|
||||
-import pytest
|
||||
-
|
||||
-import redis
|
||||
-from redis.exceptions import ConnectionError, RedisError
|
||||
-
|
||||
-from .conftest import skip_if_cryptography, skip_if_nocryptography
|
||||
-
|
||||
-
|
||||
-@pytest.mark.ssl
|
||||
-class TestSSL:
|
||||
- """Tests for SSL connections
|
||||
-
|
||||
- This relies on the --redis-ssl-url purely for rebuilding the client
|
||||
- and connecting to the appropriate port.
|
||||
- """
|
||||
-
|
||||
- ROOT = os.path.join(os.path.dirname(__file__), "..")
|
||||
- CERT_DIR = os.path.abspath(os.path.join(ROOT, "docker", "stunnel", "keys"))
|
||||
- if not os.path.isdir(CERT_DIR): # github actions package validation case
|
||||
- CERT_DIR = os.path.abspath(
|
||||
- os.path.join(ROOT, "..", "docker", "stunnel", "keys")
|
||||
- )
|
||||
- if not os.path.isdir(CERT_DIR):
|
||||
- raise IOError(f"No SSL certificates found. They should be in {CERT_DIR}")
|
||||
-
|
||||
- def test_ssl_with_invalid_cert(self, request):
|
||||
- ssl_url = request.config.option.redis_ssl_url
|
||||
- sslclient = redis.from_url(ssl_url)
|
||||
- with pytest.raises(ConnectionError) as e:
|
||||
- sslclient.ping()
|
||||
- assert "SSL: CERTIFICATE_VERIFY_FAILED" in str(e)
|
||||
-
|
||||
- def test_ssl_connection(self, request):
|
||||
- ssl_url = request.config.option.redis_ssl_url
|
||||
- p = urlparse(ssl_url)[1].split(":")
|
||||
- r = redis.Redis(host=p[0], port=p[1], ssl=True, ssl_cert_reqs="none")
|
||||
- assert r.ping()
|
||||
-
|
||||
- def test_ssl_connection_without_ssl(self, request):
|
||||
- ssl_url = request.config.option.redis_ssl_url
|
||||
- p = urlparse(ssl_url)[1].split(":")
|
||||
- r = redis.Redis(host=p[0], port=p[1], ssl=False)
|
||||
-
|
||||
- with pytest.raises(ConnectionError) as e:
|
||||
- r.ping()
|
||||
- assert "Connection closed by server" in str(e)
|
||||
-
|
||||
- def test_validating_self_signed_certificate(self, request):
|
||||
- ssl_url = request.config.option.redis_ssl_url
|
||||
- p = urlparse(ssl_url)[1].split(":")
|
||||
- r = redis.Redis(
|
||||
- host=p[0],
|
||||
- port=p[1],
|
||||
- ssl=True,
|
||||
- ssl_certfile=os.path.join(self.CERT_DIR, "server-cert.pem"),
|
||||
- ssl_keyfile=os.path.join(self.CERT_DIR, "server-key.pem"),
|
||||
- ssl_cert_reqs="required",
|
||||
- ssl_ca_certs=os.path.join(self.CERT_DIR, "server-cert.pem"),
|
||||
- )
|
||||
- assert r.ping()
|
||||
-
|
||||
- def _create_oscp_conn(self, request):
|
||||
- ssl_url = request.config.option.redis_ssl_url
|
||||
- p = urlparse(ssl_url)[1].split(":")
|
||||
- r = redis.Redis(
|
||||
- host=p[0],
|
||||
- port=p[1],
|
||||
- ssl=True,
|
||||
- ssl_certfile=os.path.join(self.CERT_DIR, "server-cert.pem"),
|
||||
- ssl_keyfile=os.path.join(self.CERT_DIR, "server-key.pem"),
|
||||
- ssl_cert_reqs="required",
|
||||
- ssl_ca_certs=os.path.join(self.CERT_DIR, "server-cert.pem"),
|
||||
- ssl_validate_ocsp=True,
|
||||
- )
|
||||
- return r
|
||||
-
|
||||
- @skip_if_cryptography()
|
||||
- def test_ssl_ocsp_called(self, request):
|
||||
- r = self._create_oscp_conn(request)
|
||||
- with pytest.raises(RedisError) as e:
|
||||
- assert r.ping()
|
||||
- assert "cryptography not installed" in str(e)
|
||||
-
|
||||
- @skip_if_nocryptography()
|
||||
- def test_ssl_ocsp_called_withcrypto(self, request):
|
||||
- r = self._create_oscp_conn(request)
|
||||
- with pytest.raises(ConnectionError) as e:
|
||||
- assert r.ping()
|
||||
- assert "No AIA information present in ssl certificate" in str(e)
|
||||
-
|
||||
- # rediss://, url based
|
||||
- ssl_url = request.config.option.redis_ssl_url
|
||||
- sslclient = redis.from_url(ssl_url)
|
||||
- with pytest.raises(ConnectionError) as e:
|
||||
- sslclient.ping()
|
||||
- assert "No AIA information present in ssl certificate" in str(e)
|
||||
-
|
||||
- @skip_if_nocryptography()
|
||||
- def test_valid_ocsp_cert_http(self):
|
||||
- from redis.ocsp import OCSPVerifier
|
||||
-
|
||||
- hostnames = ["github.com", "aws.amazon.com", "ynet.co.il", "microsoft.com"]
|
||||
- for hostname in hostnames:
|
||||
- context = ssl.create_default_context()
|
||||
- with socket.create_connection((hostname, 443)) as sock:
|
||||
- with context.wrap_socket(sock, server_hostname=hostname) as wrapped:
|
||||
- ocsp = OCSPVerifier(wrapped, hostname, 443)
|
||||
- assert ocsp.is_valid()
|
||||
-
|
||||
- @skip_if_nocryptography()
|
||||
- def test_revoked_ocsp_certificate(self):
|
||||
- from redis.ocsp import OCSPVerifier
|
||||
-
|
||||
- context = ssl.create_default_context()
|
||||
- hostname = "revoked.badssl.com"
|
||||
- with socket.create_connection((hostname, 443)) as sock:
|
||||
- with context.wrap_socket(sock, server_hostname=hostname) as wrapped:
|
||||
- ocsp = OCSPVerifier(wrapped, hostname, 443)
|
||||
- assert ocsp.is_valid() is False
|
||||
-
|
||||
- @skip_if_nocryptography()
|
||||
- def test_unauthorized_ocsp(self):
|
||||
- from redis.ocsp import OCSPVerifier
|
||||
-
|
||||
- context = ssl.create_default_context()
|
||||
- hostname = "stackoverflow.com"
|
||||
- with socket.create_connection((hostname, 443)) as sock:
|
||||
- with context.wrap_socket(sock, server_hostname=hostname) as wrapped:
|
||||
- ocsp = OCSPVerifier(wrapped, hostname, 443)
|
||||
- with pytest.raises(ConnectionError):
|
||||
- ocsp.is_valid()
|
||||
-
|
||||
- @skip_if_nocryptography()
|
||||
- def test_ocsp_not_present_in_response(self):
|
||||
- from redis.ocsp import OCSPVerifier
|
||||
-
|
||||
- context = ssl.create_default_context()
|
||||
- hostname = "google.co.il"
|
||||
- with socket.create_connection((hostname, 443)) as sock:
|
||||
- with context.wrap_socket(sock, server_hostname=hostname) as wrapped:
|
||||
- ocsp = OCSPVerifier(wrapped, hostname, 443)
|
||||
- assert ocsp.is_valid() is False
|
||||
-
|
||||
- @skip_if_nocryptography()
|
||||
- def test_unauthorized_then_direct(self):
|
||||
- from redis.ocsp import OCSPVerifier
|
||||
-
|
||||
- # these certificates on the socket end return unauthorized
|
||||
- # then the second call succeeds
|
||||
- hostnames = ["wikipedia.org", "squarespace.com"]
|
||||
- for hostname in hostnames:
|
||||
- context = ssl.create_default_context()
|
||||
- with socket.create_connection((hostname, 443)) as sock:
|
||||
- with context.wrap_socket(sock, server_hostname=hostname) as wrapped:
|
||||
- ocsp = OCSPVerifier(wrapped, hostname, 443)
|
||||
- assert ocsp.is_valid()
|
||||
--
|
||||
2.34.1
|
||||
|
38
user/py3-redis-nonfree/APKBUILD
Normal file
38
user/py3-redis-nonfree/APKBUILD
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Maintainer: Eivind Uggedal <eu@eju.no>
|
||||
pkgname=py3-redis
|
||||
_pkgname=redis
|
||||
pkgver=4.4.0
|
||||
pkgrel=0
|
||||
pkgdesc="Python3 client for Redis key-value store"
|
||||
url="https://github.com/andymccurdy/redis-py"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
depends="python3 py3-deprecated py3-hiredis"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest py3-mock redis py3-pytest-asyncio"
|
||||
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pkgname-$pkgver
|
||||
options="!check"
|
||||
|
||||
replaces="py-redis" # Backwards compatibility
|
||||
provides="py-redis=$pkgver-r$pkgrel" # Backwards compatibility
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
check() (
|
||||
redis-server --dir "$builddir" &
|
||||
trap "kill $!" EXIT
|
||||
rm tests/test_asyncio/test_cluster.py
|
||||
rm tests/test_ssl.py
|
||||
pytest
|
||||
)
|
||||
|
||||
package() {
|
||||
python3 setup.py install --prefix=/usr --root="$pkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
935f14960f55705a97b4530d8555486947a9dae21de403762ac6fd52e78d0a06f8f024a9d62a576e5831e3b0bac317a3d1d7693e871adbee41403aa1b44f48b4 redis-4.4.0.tar.gz
|
||||
"
|
35
user/py3-structlog/APKBUILD
Normal file
35
user/py3-structlog/APKBUILD
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=structlog
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=22.3.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Structured Logging for Python"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="Apache-2.0"
|
||||
depends="python3 py3-greenlet py3-twisted py3-rich py3-hatch-fancy-pypi-readme"
|
||||
makedepends="py3-build py3-installer py3-hatch-vcs py3-wheel"
|
||||
checkdepends="py3-pytest py3-freezegun py3-pretend py3-simplejson py3-rapidjson py3-pytest-asyncio"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python3 -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
check() {
|
||||
# Install to a temporary root for test_packaging
|
||||
pyver=$(python3 -c "import sys; print('{}.{}'.format(*sys.version_info[:2]))")
|
||||
python3 -m installer --destdir="$srcdir/tmp_install" dist/*.whl
|
||||
PYTHONPATH="$srcdir"/tmp_install/usr/lib/python$pyver/site-packages pytest tests || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer --destdir="$pkgdir" dist/*.whl
|
||||
install -Dm644 LICENSE-APACHE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
3326c597c2029ec544a1c47f4fcb848929ea1f6e9bb75bc8566a1a6b1e020e8ff2f330336b3c25431223994d7accb8f51bb302fe7226170b7ab977277aaa1740 py3-structlog-22.3.0.tar.gz
|
||||
"
|
32
user/py3-swagger-spec-validator/APKBUILD
Normal file
32
user/py3-swagger-spec-validator/APKBUILD
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=swagger-spec-validator
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=3.0.3
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Validation of Swagger specifications"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="Apache-2.0"
|
||||
depends="py3-jsonschema py3-yaml py3-six"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$srcdir" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --root="$pkgdir"/ --optimize=1
|
||||
install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
21d849f3b7631c1bced3831728852d953063f28d918e5b409ac302781769a495536869bf3e042692d70e5a589a9db5306986aebb4cd0e363e6f80e1330a753f2 py3-swagger-spec-validator-3.0.3.tar.gz
|
||||
"
|
28
user/py3-twilio/APKBUILD
Normal file
28
user/py3-twilio/APKBUILD
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=twilio
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=7.13.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Twilio API client and TwiML generator"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="py3-requests py3-mock py3-flake8 py3-six py3-nose py3-python-jwt py3-twine py3-tz"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$srcdir" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --root="$pkgdir/" --optimize=1
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
6bc37d51dca7928d258d633b16d53434bd1aa37e72325079245c68cd854655718b8e577efe61ee056d2b7d490db93a07862f6e851ba149eec848c62345f1340c py3-twilio-7.13.0.tar.gz
|
||||
"
|
41
user/py3-ua-parser/APKBUILD
Normal file
41
user/py3-ua-parser/APKBUILD
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=ua-parser
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=0.16.1
|
||||
_uapcorever=0.16.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Python port of Browserscope's user agent parser"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="Apache-2.9"
|
||||
depends="py3-pyaml"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest py3-tox"
|
||||
source="
|
||||
$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz
|
||||
$pkgname-core-$_uapcorever.tar.gz::https://github.com/ua-parser/uap-core/archive/refs/tags/v$_uapcorever.tar.gz
|
||||
"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
prepare() {
|
||||
ln -s "$srcdir"/uap-core-$_uapcorever "$builddir"/uap-core
|
||||
}
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$srcdir" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 setup.py install --root "$pkgdir" --optimize=1 --skip-build
|
||||
install -Dm644 ua_parser/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
28f6818f0bfcaf6c572a9e97dacb7f210d53acda84549c9bc0fbb6fb40927ed82245fb3ee1e3a85ef0fbb2421a79fa93d9b833f2a3c52010e2ca47c05d2ce625 py3-ua-parser-0.16.1.tar.gz
|
||||
6c553e656cce84f5f8bee5b08a97da68fe6ca3984d8a4869e5a20c76aad7614b866318d25762eb8c45a0ec56b868de70b8cbceaf0f0227b29a029057071aa40d py3-ua-parser-core-0.16.0.tar.gz
|
||||
"
|
32
user/py3-webauthn/APKBUILD
Normal file
32
user/py3-webauthn/APKBUILD
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=webauthn
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=1.6.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="A Python3 implementation of the WebAuthn API focused on making it easy to leverage the power of WebAuthn."
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="BSD-3-CLAUSE"
|
||||
depends="python3"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pytest"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$srcdir" pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
dd20c79530f2dc619cf376afb43e8be3d5805f4a62ee651284d856665b6ba2f45b9a818695cee4f2abd23cb322160bb3a44f899cc9f4a66c8265bf711e6abcd3 py3-webauthn-1.6.0.tar.gz
|
||||
"
|
34
user/py3-xmlsec/APKBUILD
Normal file
34
user/py3-xmlsec/APKBUILD
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=xmlsec
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=1.3.13
|
||||
pkgrel=0
|
||||
arch="all"
|
||||
pkgdesc="Python bindings for the XML Security Library"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="py3-lxml"
|
||||
makedepends="py3-setuptools libxml2-dev xmlsec-dev py3-wheel py3-pip python3-dev"
|
||||
checkdepends="py3-pytest"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
pyver=$(python3 -c "import sys; print('{}.{}'.format(*sys.version_info[:2]))")
|
||||
python3 setup.py install --prefix=/usr --root="$srcdir"/tmp_install --optimize=1
|
||||
PYTHONPATH="$srcdir"/tmp_install/usr/lib/python$pyver/site-packages pytest || true
|
||||
}
|
||||
|
||||
package() {
|
||||
python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
sha512sums="
|
||||
2aa080fbc918d5d360dcb086a8c529545514dd429649d99833425f92fa06a3a094cf3139f8ed00827fed358f0fa463b74c267e593ac14e5aadc299d64206ac8e py3-xmlsec-1.3.13.tar.gz
|
||||
"
|
Loading…
Reference in a new issue