git: 93cb8d4388b2 - main - devel/py-requirementslib: Update to 2.1.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sat, 19 Nov 2022 08:17:33 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=93cb8d4388b285dff313c2a10a1bab7ac058c01c

commit 93cb8d4388b285dff313c2a10a1bab7ac058c01c
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-11-19 08:12:09 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-11-19 08:12:09 +0000

    devel/py-requirementslib: Update to 2.1.0
    
    - Allow build with py-vistir 0.7.0+
    
    Changes:        https://github.com/sarugaku/requirementslib/releases
---
 devel/py-requirementslib/Makefile           |  4 +--
 devel/py-requirementslib/distinfo           |  6 ++---
 devel/py-requirementslib/files/patch-vistir | 40 +++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 5 deletions(-)

diff --git a/devel/py-requirementslib/Makefile b/devel/py-requirementslib/Makefile
index 6a3bea059967..d9975d8cbd06 100644
--- a/devel/py-requirementslib/Makefile
+++ b/devel/py-requirementslib/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	requirementslib
-PORTVERSION=	2.0.3
+PORTVERSION=	2.1.0
 CATEGORIES=	devel python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -20,7 +20,7 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}attrs>=19.2:devel/py-attrs@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}plette>=0:devel/py-plette@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}requests>=0:www/py-requests@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}tomlkit>=0.5.3:textproc/py-tomlkit@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}vistir>=0.6.1<0.6.1_99:devel/py-vistir@${PY_FLAVOR}
+		${PYTHON_PKGNAMEPREFIX}vistir>=0.6.1:devel/py-vistir@${PY_FLAVOR}
 
 USES=		python:3.7+
 USE_PYTHON=	autoplist concurrent distutils
diff --git a/devel/py-requirementslib/distinfo b/devel/py-requirementslib/distinfo
index 118041c47f8c..0be5fcd37582 100644
--- a/devel/py-requirementslib/distinfo
+++ b/devel/py-requirementslib/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1664767952
-SHA256 (requirementslib-2.0.3.tar.gz) = da978e693eacd70e42bc465ae10b157f5043910f0e58b684e8db08b3f272cece
-SIZE (requirementslib-2.0.3.tar.gz) = 117911
+TIMESTAMP = 1665647525
+SHA256 (requirementslib-2.1.0.tar.gz) = b7f9541b3a6b8fbd49e7e58988d9476341b73e3c5e94d48a3ee1bc927e49e5bc
+SIZE (requirementslib-2.1.0.tar.gz) = 116773
diff --git a/devel/py-requirementslib/files/patch-vistir b/devel/py-requirementslib/files/patch-vistir
new file mode 100644
index 000000000000..0893c1d23732
--- /dev/null
+++ b/devel/py-requirementslib/files/patch-vistir
@@ -0,0 +1,40 @@
+--- setup.cfg.orig	2022-10-09 02:37:19 UTC
++++ setup.cfg
+@@ -50,7 +50,7 @@ install_requires = 
+ 	requests
+ 	setuptools>=40.8
+ 	tomlkit>=0.5.3
+-	vistir==0.6.1
++	vistir>=0.6.1
+ 
+ [options.extras_require]
+ tests = 
+--- src/requirementslib/models/dependencies.py.orig	2022-10-09 02:36:47 UTC
++++ src/requirementslib/models/dependencies.py
+@@ -17,7 +17,6 @@ from pip._internal.utils.temp_dir import TempDirectory
+ from pip._vendor.packaging.markers import Marker
+ from pip._vendor.packaging.utils import canonicalize_name
+ from pip._vendor.packaging.version import parse
+-from vistir.compat import fs_str
+ from vistir.contextmanagers import temp_environ
+ from vistir.path import create_tracked_tempdir
+ 
+@@ -35,6 +34,18 @@ from .utils import (
+     name_from_req,
+     version_from_ireq,
+ )
++
++# from vistir 0.6.1 (src/vistir/compat.py)
++def fs_str(string):
++    """Encodes a string into the proper filesystem encoding.
++
++    Borrowed from pip-tools
++    """
++
++    if isinstance(string, str):
++        return string
++    assert not isinstance(string, bytes)
++    return string.encode(_fs_encoding)
+ 
+ if MYPY_RUNNING:
+     from typing import Any, Dict, List, Optional, Set, Text, TypeVar, Union