Wed Oct 19 14:17:54 2022 UTC ()
fighting a losing battle against the py-cryptography rustification, part 4

Add support for py-OpenSSL to versioned_dependencies.mk


(nia)
diff -r1.88 -r1.89 pkgsrc/lang/python/versioned_dependencies.mk
diff -r0 -r1.1 pkgsrc/security/py-OpenSSL/dependency.mk

cvs diff -r1.88 -r1.89 pkgsrc/lang/python/versioned_dependencies.mk (expand / switch to unified diff)

--- pkgsrc/lang/python/versioned_dependencies.mk 2022/10/19 13:42:46 1.88
+++ pkgsrc/lang/python/versioned_dependencies.mk 2022/10/19 14:17:54 1.89
@@ -1,32 +1,33 @@ @@ -1,32 +1,33 @@
1# $NetBSD: versioned_dependencies.mk,v 1.88 2022/10/19 13:42:46 nia Exp $ 1# $NetBSD: versioned_dependencies.mk,v 1.89 2022/10/19 14:17:54 nia Exp $
2# 2#
3# This file determines which separate distribution of a Python 3# This file determines which separate distribution of a Python
4# package is used as dependency, depending on the Python version 4# package is used as dependency, depending on the Python version
5# used. 5# used.
6# 6#
7# === User-settable variables === 7# === User-settable variables ===
8# 8#
9# PYTHON_VERSIONED_DEPENDENCIES 9# PYTHON_VERSIONED_DEPENDENCIES
10# The Python package which should be added as a dependency. 10# The Python package which should be added as a dependency.
11# 11#
12# Possible values: Pillow X cairo chardet click coverage cryptography dns flake8 hypothesis importlib-metadata jinja2 lama markdown mccabe more-itertools pip packaging pygments pyphen rsa setuptools setuptools_scm test test-cov 12# Possible values: Pillow X cairo chardet click coverage cryptography dns flake8 hypothesis importlib-metadata jinja2 lama markdown mccabe more-itertools pip packaging pygments pyphen rsa setuptools setuptools_scm test test-cov
13# Default: (nothing) 13# Default: (nothing)
14# 14#
15 15
16.include "../../lang/python/pyversion.mk" 16.include "../../lang/python/pyversion.mk"
17 17
18# format: short name for PYTHON_VERSIONED_DEPENDENCIES<space>Python-2.x path<space>Python-3.x path 18# format: short name for PYTHON_VERSIONED_DEPENDENCIES<space>Python-2.x path<space>Python-3.x path
19_SUPPORTED_PACKAGES= # empty 19_SUPPORTED_PACKAGES= # empty
 20_SUPPORTED_PACKAGES+= OpenSSL security/py27-OpenSSL security/py-OpenSSL
20_SUPPORTED_PACKAGES+= Pillow graphics/py-Pillow6 graphics/py-Pillow 21_SUPPORTED_PACKAGES+= Pillow graphics/py-Pillow6 graphics/py-Pillow
21_SUPPORTED_PACKAGES+= X textproc/py-X2 textproc/py-X 22_SUPPORTED_PACKAGES+= X textproc/py-X2 textproc/py-X
22_SUPPORTED_PACKAGES+= cairo graphics/py-cairo118 graphics/py-cairo 23_SUPPORTED_PACKAGES+= cairo graphics/py-cairo118 graphics/py-cairo
23_SUPPORTED_PACKAGES+= chardet converters/py-chardet4 converters/py-chardet 24_SUPPORTED_PACKAGES+= chardet converters/py-chardet4 converters/py-chardet
24_SUPPORTED_PACKAGES+= click devel/py-click7 devel/py-click 25_SUPPORTED_PACKAGES+= click devel/py-click7 devel/py-click
25_SUPPORTED_PACKAGES+= coverage devel/py27-coverage devel/py-coverage 26_SUPPORTED_PACKAGES+= coverage devel/py27-coverage devel/py-coverage
26_SUPPORTED_PACKAGES+= cryptography security/py27-cryptography security/py-cryptography  27_SUPPORTED_PACKAGES+= cryptography security/py27-cryptography security/py-cryptography
27_SUPPORTED_PACKAGES+= dns net/py-dns1 net/py-dns  28_SUPPORTED_PACKAGES+= dns net/py-dns1 net/py-dns
28_SUPPORTED_PACKAGES+= flake8 devel/py-flake8-3 devel/py-flake8 29_SUPPORTED_PACKAGES+= flake8 devel/py-flake8-3 devel/py-flake8
29_SUPPORTED_PACKAGES+= hypothesis devel/py-hypothesis4 devel/py-hypothesis 30_SUPPORTED_PACKAGES+= hypothesis devel/py-hypothesis4 devel/py-hypothesis
30_SUPPORTED_PACKAGES+= importlib-metadata devel/py-importlib-metadata2 devel/py-importlib-metadata 31_SUPPORTED_PACKAGES+= importlib-metadata devel/py-importlib-metadata2 devel/py-importlib-metadata
31_SUPPORTED_PACKAGES+= isort devel/py-isort4 devel/py-isort 32_SUPPORTED_PACKAGES+= isort devel/py-isort4 devel/py-isort
32_SUPPORTED_PACKAGES+= jinja2 textproc/py27-jinja2 textproc/py-jinja2 33_SUPPORTED_PACKAGES+= jinja2 textproc/py27-jinja2 textproc/py-jinja2
@@ -43,26 +44,30 @@ _SUPPORTED_PACKAGES+= setuptools devel/p @@ -43,26 +44,30 @@ _SUPPORTED_PACKAGES+= setuptools devel/p
43_SUPPORTED_PACKAGES+= setuptools_scm devel/py-setuptools_scm5 devel/py-setuptools_scm 44_SUPPORTED_PACKAGES+= setuptools_scm devel/py-setuptools_scm5 devel/py-setuptools_scm
44_SUPPORTED_PACKAGES+= test devel/py-test4 devel/py-test 45_SUPPORTED_PACKAGES+= test devel/py-test4 devel/py-test
45_SUPPORTED_PACKAGES+= test-cov devel/py27-test-cov devel/py-test-cov 46_SUPPORTED_PACKAGES+= test-cov devel/py27-test-cov devel/py-test-cov
46 47
47.for pattern in ${PYTHON_VERSIONED_DEPENDENCIES} 48.for pattern in ${PYTHON_VERSIONED_DEPENDENCIES}
48_PKG_MATCHED= no 49_PKG_MATCHED= no
49pkg:= ${pattern:C/:.*//} 50pkg:= ${pattern:C/:.*//}
50type:= ${pattern:C/[^:]*//} 51type:= ${pattern:C/[^:]*//}
51. for name py2dir py3dir in ${_SUPPORTED_PACKAGES} 52. for name py2dir py3dir in ${_SUPPORTED_PACKAGES}
52. if "${pkg}" == "${name}" && "${pkg}" == "cryptography" 53. if "${pkg}" == "${name}" && "${pkg}" == "cryptography"
53# Special due to Rust handling. 54# Special due to Rust handling.
54_PKG_MATCHED= yes 55_PKG_MATCHED= yes
55. include "../../security/py-cryptography/dependency.mk" 56. include "../../security/py-cryptography/dependency.mk"
 57. elif "${pkg}" == "${name}" && "${pkg}" == "OpenSSL"
 58# Special due to Rust handling.
 59_PKG_MATCHED= yes
 60. include "../../security/py-OpenSSL/dependency.mk"
56. elif "${pkg}" == "${name}" 61. elif "${pkg}" == "${name}"
57_PKG_MATCHED= yes 62_PKG_MATCHED= yes
58. if ${_PYTHON_VERSION} == 27 63. if ${_PYTHON_VERSION} == 27
59dir:= ${py2dir} 64dir:= ${py2dir}
60. else 65. else
61dir:= ${py3dir} 66dir:= ${py3dir}
62. endif 67. endif
63. if "${type}" == ":link" 68. if "${type}" == ":link"
64.include "../../${dir}/buildlink3.mk" 69.include "../../${dir}/buildlink3.mk"
65. elif "${type}" == ":build" 70. elif "${type}" == ":build"
66BUILD_DEPENDS:= ${BUILD_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} 71BUILD_DEPENDS:= ${BUILD_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir}
67. elif "${type}" == ":test" 72. elif "${type}" == ":test"
68TEST_DEPENDS:= ${TEST_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} 73TEST_DEPENDS:= ${TEST_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir}

File Added: pkgsrc/security/py-OpenSSL/dependency.mk
# $NetBSD: dependency.mk,v 1.1 2022/10/19 14:17:54 nia Exp $
#
# Not for public use - use through versioned_dependencies.mk.
#

.include "../../security/py-cryptography/dependency.mk"

.if ${PYCRYPTOGRAPHY_TYPE:tl} == "rust"
PYOPENSSL_VERSION?=	OpenSSL>=0
PYOPENSSL_DIR?=		security/py-OpenSSL
.else
PYOPENSSL_VERSION?=	OpenSSL>=0<22.0.0
PYOPENSSL_DIR?=		security/py27-OpenSSL
.endif

.if "${type}" == ":build"
BUILD_DEPENDS:=	${BUILD_DEPENDS} ${PYPKGPREFIX}-${PYOPENSSL_VERSION}:../../${PYOPENSSL_DIR}
.elif "${type}" == ":test"
TEST_DEPENDS:=	${TEST_DEPENDS} ${PYPKGPREFIX}-${PYOPENSSL_VERSION}:../../${PYOPENSSL_DIR}
.elif "${type}" == ":tool"
TOOL_DEPENDS:=	${TOOL_DEPENDS} ${PYPKGPREFIX}-${PYOPENSSL_VERSION}:../../${PYOPENSSL_DIR}
.else
DEPENDS:=	${DEPENDS} ${PYPKGPREFIX}-${PYOPENSSL_VERSION}:../../${PYOPENSSL_DIR}
.endif