pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc python: Special handling of py-cryptography for versio...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8a3a54beb82a
branches:  trunk
changeset: 386996:8a3a54beb82a
user:      nia <nia%pkgsrc.org@localhost>
date:      Wed Oct 19 13:37:21 2022 +0000

description:
python: Special handling of py-cryptography for versioned_dependencies.mk

diffstat:

 lang/python/versioned_dependencies.mk  |   8 +++++-
 security/py-cryptography/dependency.mk |  40 ++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 2 deletions(-)

diffs (66 lines):

diff -r 801911ab5e03 -r 8a3a54beb82a lang/python/versioned_dependencies.mk
--- a/lang/python/versioned_dependencies.mk     Wed Oct 19 13:18:46 2022 +0000
+++ b/lang/python/versioned_dependencies.mk     Wed Oct 19 13:37:21 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: versioned_dependencies.mk,v 1.86 2022/09/11 18:10:43 wiz Exp $
+# $NetBSD: versioned_dependencies.mk,v 1.87 2022/10/19 13:37:21 nia Exp $
 #
 # This file determines which separate distribution of a Python
 # package is used as dependency, depending on the Python version
@@ -49,7 +49,11 @@
 pkg:=  ${pattern:C/:.*//}
 type:= ${pattern:C/[^:]*//}
 .  for name py2dir py3dir in ${_SUPPORTED_PACKAGES}
-.    if "${pkg}" == "${name}"
+.    if "${pkg}" == "cryptography"
+# Special due to Rust handling.
+_PKG_MATCHED=  yes
+.      include "../../security/py-cryptography/dependency.mk"
+.    elif "${pkg}" == "${name}"
 _PKG_MATCHED=  yes
 .      if ${_PYTHON_VERSION} == 27
 dir:=  ${py2dir}
diff -r 801911ab5e03 -r 8a3a54beb82a security/py-cryptography/dependency.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/py-cryptography/dependency.mk    Wed Oct 19 13:37:21 2022 +0000
@@ -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



Home | Main Index | Thread Index | Old Index