aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-12-25 16:03:18 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-12-25 16:10:53 +0000
commitbc3159fcccc2a679ad4e0ea338c0163dd0f87cdf (patch)
tree51034311989e57175cb8ad6627e044a8841c99da
parentea480c04f537235127daa96080546cfc4b6bcdbd (diff)
downloadports-bc3159fcccc2a679ad4e0ea338c0163dd0f87cdf.tar.gz
ports-bc3159fcccc2a679ad4e0ea338c0163dd0f87cdf.zip
devel/py-pip-audit: Allow build with py-cyclonedx-python-lib 6.0.0+
- Bump PORTREVISION for package change
-rw-r--r--devel/py-pip-audit/Makefile3
-rw-r--r--devel/py-pip-audit/files/patch-cyclonedx-python-lib24
2 files changed, 26 insertions, 1 deletions
diff --git a/devel/py-pip-audit/Makefile b/devel/py-pip-audit/Makefile
index 19733efe4ffc..6c7404e8264c 100644
--- a/devel/py-pip-audit/Makefile
+++ b/devel/py-pip-audit/Makefile
@@ -1,5 +1,6 @@
PORTNAME= pip-audit
PORTVERSION= 2.6.2
+PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= PYPI \
https://github.com/pypa/pip-audit/releases/download/v${PORTVERSION}/
@@ -15,7 +16,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}flit-core>=3.2<4:devel/py-flit-core@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cachecontrol>=0.13.0:www/py-cachecontrol@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}cyclonedx-python-lib>=4<6:textproc/py-cyclonedx-python-lib@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}cyclonedx-python-lib>=5<7:textproc/py-cyclonedx-python-lib@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}html5lib>=1.1:www/py-html5lib@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}packaging>=23.0.0:devel/py-packaging@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pip-api>=0.0.28:devel/py-pip-api@${PY_FLAVOR} \
diff --git a/devel/py-pip-audit/files/patch-cyclonedx-python-lib b/devel/py-pip-audit/files/patch-cyclonedx-python-lib
new file mode 100644
index 000000000000..eb0180333b4c
--- /dev/null
+++ b/devel/py-pip-audit/files/patch-cyclonedx-python-lib
@@ -0,0 +1,24 @@
+Reference: https://github.com/pypa/pip-audit/pull/715
+
+--- pip_audit/_format/cyclonedx.py.orig 2023-12-19 03:49:32 UTC
++++ pip_audit/_format/cyclonedx.py
+@@ -90,7 +90,7 @@ class CycloneDxFormat(VulnerabilityFormat):
+ logger.warning("--fix output is unsupported by CycloneDX formats")
+
+ bom = _pip_audit_result_to_bom(result)
+- formatter = output.get_instance(
++ formatter = output.make_outputter(
+ bom=bom,
+ output_format=self._inner_format.value,
+ schema_version=output.SchemaVersion.V1_4,
+--- pyproject.toml.orig 2023-12-19 03:49:32 UTC
++++ pyproject.toml
+@@ -28,7 +28,7 @@ classifiers = [
+ ]
+ dependencies = [
+ "CacheControl[filecache] >= 0.13.0",
+- "cyclonedx-python-lib >= 4,< 6",
++ "cyclonedx-python-lib >= 5,< 7",
+ "html5lib>=1.1",
+ "packaging>=23.0.0", # https://github.com/pypa/pip-audit/issues/464
+ "pip-api>=0.0.28",