Jelle van der Waa pushed to branch main at Arch Linux / Packaging / Packages / 
python-schema


Commits:
c8e57646 by Jelle van der Waa at 2024-04-27T18:49:03+02:00
Drop python-contextlib2 dependency

Merged upstream: https://github.com/keleshev/schema/pull/291

- - - - -


3 changed files:

- .SRCINFO
- PKGBUILD
- + drop-contextlib2.patch


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,7 +1,7 @@
 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


=====================================
PKGBUILD
=====================================
@@ -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() {


=====================================
drop-contextlib2.patch
=====================================
@@ -0,0 +1,17 @@
+From e446ee43919b0adfefd27ec04b2485a40bc77879 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= <git...@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"



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-schema/-/commit/c8e576468d3065e58905691b3341c96f68e1764c

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-schema/-/commit/c8e576468d3065e58905691b3341c96f68e1764c
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to