From 1925896895b34e48b044b51e998d91dbf249e781 Mon Sep 17 00:00:00 2001 From: nia Date: Wed, 19 Oct 2022 13:37:21 +0000 Subject: python: Special handling of py-cryptography for versioned_dependencies.mk --- security/py-cryptography/dependency.mk | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 security/py-cryptography/dependency.mk (limited to 'security') diff --git a/security/py-cryptography/dependency.mk b/security/py-cryptography/dependency.mk new file mode 100644 index 00000000000..5d0236900db --- /dev/null +++ b/security/py-cryptography/dependency.mk @@ -0,0 +1,40 @@ +# $NetBSD: dependency.mk,v 1.1 2022/10/19 13:37:21 nia Exp $ +# +# Not for public use - use through versioned_dependencies.mk. +# +# User-settable variables: +# +# PYCRYPTOGRAPHY_TYPE +# Type of py-cryptography implementation used. +# +# Possible values: c rust +# Default: rust on platforms were Rust is supported +# + +.include "../../mk/bsd.fast.prefs.mk" + +.include "../../lang/rust/platform.mk" +.if ${PLATFORM_SUPPORTS_RUST:tl} == "yes" && empty(_PYTHON_VERSION:M2*) +PYCRYPTOGRAPHY_TYPE?= rust +.else +PYCRYPTOGRAPHY_TYPE?= c +.endif + +.include "../../lang/python/pyversion.mk" +.if ${PYCRYPTOGRAPHY_TYPE:tl} == "rust" +PYCRYPTOGRAPHY_VERSION?= cryptography>=0 +PYCRYPTOGRAPHY_DIR?= security/py-cryptography +.else +PYCRYPTOGRAPHY_VERSION?= cryptography>=0<3.4 +PYCRYPTOGRAPHY_DIR?= security/py27-cryptography +.endif + +.if "${type}" == ":build" +BUILD_DEPENDS:= ${BUILD_DEPENDS} ${PYPKGPREFIX}-${PYCRYPTOGRAPHY_VERSION}:../../${PYCRYPTOGRAPHY_DIR} +.elif "${type}" == ":test" +TEST_DEPENDS:= ${TEST_DEPENDS} ${PYPKGPREFIX}-${PYCRYPTOGRAPHY_VERSION}:../../${PYCRYPTOGRAPHY_DIR} +.elif "${type}" == ":tool" +TOOL_DEPENDS:= ${TOOL_DEPENDS} ${PYPKGPREFIX}-${PYCRYPTOGRAPHY_VERSION}:../../${PYCRYPTOGRAPHY_DIR} +.else +DEPENDS:= ${DEPENDS} ${PYPKGPREFIX}-${PYCRYPTOGRAPHY_VERSION}:../../${PYCRYPTOGRAPHY_DIR} +.endif -- cgit v1.2.3