Skip to content
Snippets Groups Projects
Verified Commit c8e57646 authored by Jelle van der Waa's avatar Jelle van der Waa :construction:
Browse files

Drop python-contextlib2 dependency

parent 96a885e6
No related branches found
No related tags found
No related merge requests found
pkgbase = python-schema
pkgdesc = Python module to validate and convert data structures.
pkgver = 0.7.5
pkgrel = 5
pkgrel = 6
url = https://github.com/keleshev/schema
arch = any
license = MIT
......@@ -11,10 +11,11 @@ pkgbase = python-schema
makedepends = python-setuptools
makedepends = python-wheel
depends = python
depends = python-contextlib2
source = schema-0.7.5.tar.gz::https://github.com/keleshev/schema/archive/refs/tags/v0.7.5.tar.gz
source = python-schema-0.7.5-mock.patch
source = drop-contextlib2.patch
sha256sums = 9af94571c6c2df01be002a8dcd5efda33a64b08ce2c7fba9646d2a8fe762c8e3
sha256sums = fa8c47083e9531f6865dfbe61e7f33eddd09b1e40d42cc55b99e3e69a4ce256d
sha256sums = 8d90f933d7372d268b329ee8d6ca8ec843fef5826f752e57acb5f9238b5f76e3
pkgname = python-schema
......@@ -3,11 +3,11 @@
_name=schema
pkgname="python-$_name"
pkgver=0.7.5
pkgrel=5
pkgrel=6
pkgdesc='Python module to validate and convert data structures.'
arch=(any)
url="https://github.com/keleshev/$_name"
depends=(python python-contextlib2)
depends=(python)
makedepends=(
python-build
python-installer
......@@ -19,9 +19,11 @@ license=(MIT)
source=(
$_name-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz
$pkgname-0.7.5-mock.patch
drop-contextlib2.patch
)
sha256sums=('9af94571c6c2df01be002a8dcd5efda33a64b08ce2c7fba9646d2a8fe762c8e3'
'fa8c47083e9531f6865dfbe61e7f33eddd09b1e40d42cc55b99e3e69a4ce256d')
'fa8c47083e9531f6865dfbe61e7f33eddd09b1e40d42cc55b99e3e69a4ce256d'
'8d90f933d7372d268b329ee8d6ca8ec843fef5826f752e57acb5f9238b5f76e3')
prepare() {
cd "$srcdir/$_name-$pkgver"
......@@ -30,6 +32,9 @@ prepare() {
# remove the use of python-mock
patch -Np1 -i ../$pkgname-0.7.5-mock.patch
# remove contextlib2 requirement provided by Python since 3.3
patch -Np1 -i ../drop-contextlib2.patch
}
build() {
......
From e446ee43919b0adfefd27ec04b2485a40bc77879 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= <github@dotlambda.de>
Date: Sat, 4 Feb 2023 23:07:37 -0800
Subject: [PATCH] only require contextlib2 on Python < 3.3
contextlib.ExitStack was added in Python 3.3
---
requirements.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/requirements.txt b/requirements.txt
index 22f593a..4c1eafd 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1 +1 @@
-contextlib2>=0.5.5
+contextlib2>=0.5.5; python_version < "3.3"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment