Annotation of pkgsrc/lang/python/versioned_dependencies.mk, revision 1.89

1.89    ! nia         1: # $NetBSD: versioned_dependencies.mk,v 1.88 2022/10/19 13:42:46 nia Exp $
1.1       wiz         2: #
                      3: # This file determines which separate distribution of a Python
                      4: # package is used as dependency, depending on the Python version
                      5: # used.
                      6: #
                      7: # === User-settable variables ===
                      8: #
                      9: # PYTHON_VERSIONED_DEPENDENCIES
                     10: #       The Python package which should be added as a dependency.
                     11: #
1.86      wiz        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
1.1       wiz        13: #       Default: (nothing)
                     14: #
                     15: 
                     16: .include "../../lang/python/pyversion.mk"
                     17: 
1.39      adam       18: # format: short name for PYTHON_VERSIONED_DEPENDENCIES<space>Python-2.x path<space>Python-3.x path
1.25      rillig     19: _SUPPORTED_PACKAGES=   # empty
1.89    ! nia        20: _SUPPORTED_PACKAGES+=  OpenSSL security/py27-OpenSSL security/py-OpenSSL
1.68      wiz        21: _SUPPORTED_PACKAGES+=  Pillow graphics/py-Pillow6 graphics/py-Pillow
1.25      rillig     22: _SUPPORTED_PACKAGES+=  X textproc/py-X2 textproc/py-X
1.44      wiz        23: _SUPPORTED_PACKAGES+=  cairo graphics/py-cairo118 graphics/py-cairo
1.76      wiz        24: _SUPPORTED_PACKAGES+=  chardet converters/py-chardet4 converters/py-chardet
1.63      wiz        25: _SUPPORTED_PACKAGES+=  click devel/py-click7 devel/py-click
1.85      wiz        26: _SUPPORTED_PACKAGES+=  coverage devel/py27-coverage devel/py-coverage
1.67      wiz        27: _SUPPORTED_PACKAGES+=  cryptography security/py27-cryptography security/py-cryptography 
1.83      wiz        28: _SUPPORTED_PACKAGES+=  dns net/py-dns1 net/py-dns 
1.61      wiz        29: _SUPPORTED_PACKAGES+=  flake8 devel/py-flake8-3 devel/py-flake8
1.45      wiz        30: _SUPPORTED_PACKAGES+=  hypothesis devel/py-hypothesis4 devel/py-hypothesis
1.59      wiz        31: _SUPPORTED_PACKAGES+=  importlib-metadata devel/py-importlib-metadata2 devel/py-importlib-metadata
1.51      adam       32: _SUPPORTED_PACKAGES+=  isort devel/py-isort4 devel/py-isort
1.66      tnn        33: _SUPPORTED_PACKAGES+=  jinja2 textproc/py27-jinja2 textproc/py-jinja2
1.71      wiz        34: _SUPPORTED_PACKAGES+=  lama devel/py-lama7 devel/py-lama
1.53      wiz        35: _SUPPORTED_PACKAGES+=  markdown textproc/py-markdown3 textproc/py-markdown
1.64      wiz        36: _SUPPORTED_PACKAGES+=  mccabe devel/py-mccabe06 devel/py-mccabe
1.36      wiz        37: _SUPPORTED_PACKAGES+=  more-itertools devel/py-more-itertools2 devel/py-more-itertools
1.54      wiz        38: _SUPPORTED_PACKAGES+=  packaging devel/py-packaging2 devel/py-packaging
1.55      wiz        39: _SUPPORTED_PACKAGES+=  pip devel/py-pip20 devel/py-pip
1.50      adam       40: _SUPPORTED_PACKAGES+=  pygments textproc/py-pygments25 textproc/py-pygments
1.74      joerg      41: _SUPPORTED_PACKAGES+=  pyphen textproc/py27-pyphen textproc/py-pyphen
1.43      wiz        42: _SUPPORTED_PACKAGES+=  rsa security/py-rsa40 security/py-rsa
1.42      wiz        43: _SUPPORTED_PACKAGES+=  setuptools devel/py-setuptools44 devel/py-setuptools
1.58      wiz        44: _SUPPORTED_PACKAGES+=  setuptools_scm devel/py-setuptools_scm5 devel/py-setuptools_scm
1.40      adam       45: _SUPPORTED_PACKAGES+=  test devel/py-test4 devel/py-test
1.84      wiz        46: _SUPPORTED_PACKAGES+=  test-cov devel/py27-test-cov devel/py-test-cov
1.1       wiz        47: 
1.9       wiz        48: .for pattern in ${PYTHON_VERSIONED_DEPENDENCIES}
1.1       wiz        49: _PKG_MATCHED=  no
1.9       wiz        50: pkg:=  ${pattern:C/:.*//}
                     51: type:= ${pattern:C/[^:]*//}
1.25      rillig     52: .  for name py2dir py3dir in ${_SUPPORTED_PACKAGES}
1.88      nia        53: .    if "${pkg}" == "${name}" && "${pkg}" == "cryptography"
1.87      nia        54: # Special due to Rust handling.
                     55: _PKG_MATCHED=  yes
                     56: .      include "../../security/py-cryptography/dependency.mk"
1.89    ! nia        57: .    elif "${pkg}" == "${name}" && "${pkg}" == "OpenSSL"
        !            58: # Special due to Rust handling.
        !            59: _PKG_MATCHED=  yes
        !            60: .      include "../../security/py-OpenSSL/dependency.mk"
1.87      nia        61: .    elif "${pkg}" == "${name}"
1.1       wiz        62: _PKG_MATCHED=  yes
1.39      adam       63: .      if ${_PYTHON_VERSION} == 27
1.9       wiz        64: dir:=  ${py2dir}
1.25      rillig     65: .      else
1.9       wiz        66: dir:=  ${py3dir}
1.25      rillig     67: .      endif
                     68: .      if "${type}" == ":link"
1.9       wiz        69: .include "../../${dir}/buildlink3.mk"
1.25      rillig     70: .      elif "${type}" == ":build"
1.10      wiz        71: BUILD_DEPENDS:=        ${BUILD_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir}
1.32      adam       72: .      elif "${type}" == ":test"
                     73: TEST_DEPENDS:= ${TEST_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir}
1.34      adam       74: .      elif "${type}" == ":tool"
                     75: TOOL_DEPENDS:= ${TOOL_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir}
1.25      rillig     76: .      else
1.10      wiz        77: DEPENDS:=      ${DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir}
1.25      rillig     78: .      endif
                     79: .    endif
                     80: .  endfor
                     81: .  if ${_PKG_MATCHED} == "no"
1.22      dbj        82: PKG_FAIL_REASON+=      "${pkg} unsupported in PYTHON_VERSIONED_DEPENDENCIES"
1.25      rillig     83: .  endif
1.1       wiz        84: .endfor

CVSweb <webmaster@jp.NetBSD.org>