git: 54348a04ffc5 - main - devel/py-ddtrace: Update to 2.10.2

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 04 Aug 2024 21:18:50 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=54348a04ffc5b62be235b69ba641363838d0feb4

commit 54348a04ffc5b62be235b69ba641363838d0feb4
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-08-04 21:16:03 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-08-04 21:16:03 +0000

    devel/py-ddtrace: Update to 2.10.2
    
    Changes:        https://github.com/DataDog/dd-trace-py/releases
---
 devel/py-ddtrace/Makefile                   | 11 ++++-
 devel/py-ddtrace/Makefile.crates            | 35 +++++++++++++
 devel/py-ddtrace/distinfo                   | 76 +++++++++++++++++++++++++++--
 devel/py-ddtrace/files/patch-pyproject.toml |  6 +--
 devel/py-ddtrace/files/patch-setup.py       | 16 +++---
 5 files changed, 127 insertions(+), 17 deletions(-)

diff --git a/devel/py-ddtrace/Makefile b/devel/py-ddtrace/Makefile
index cbcdc546a18a..1583bb335f83 100644
--- a/devel/py-ddtrace/Makefile
+++ b/devel/py-ddtrace/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	ddtrace
-PORTVERSION=	2.9.4
+PORTVERSION=	2.10.2
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI \
 		https://github.com/abseil/abseil-cpp/releases/download/20240116.2/:abseil
@@ -18,6 +18,7 @@ LICENSE_FILE_APACHE20=	${WRKSRC}/LICENSE.Apache
 LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/LICENSE.BSD3
 
 BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}setuptools-rust>=0<2:devel/py-setuptools-rust@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}setuptools-scm>=4:devel/py-setuptools-scm@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
 LIB_DEPENDS=	libddwaf.so:devel/libddwaf
@@ -32,9 +33,15 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}attrs>=20:devel/py-attrs@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}typing-extensions>=0:devel/py-typing-extensions@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}xmltodict>=0.12:devel/py-xmltodict@${PY_FLAVOR}
 
-USES=		cmake:indirect compiler:c++17-lang python shebangfix
+USES=		cargo cmake:indirect compiler:c++17-lang python shebangfix
 USE_PYTHON=	autoplist concurrent cython pep517
 
+CARGO_BUILD=	no
+CARGO_CARGOLOCK=${WRKSRC}/src/core/Cargo.lock
+CARGO_CARGOTOML=${WRKSRC}/src/core/Cargo.toml
+CARGO_INSTALL=	no
+MAKE_ENV=	DD_STACK_V2_REQUIRED=yes
+
 PORTSCOUT=	limit:^[0-9]*\.[0-9]*\.[0-9]*
 
 SHEBANG_FILES=	ddtrace/internal/datadog/profiling/cmake/tools/fetch_infer.sh \
diff --git a/devel/py-ddtrace/Makefile.crates b/devel/py-ddtrace/Makefile.crates
new file mode 100644
index 000000000000..c90fc2494356
--- /dev/null
+++ b/devel/py-ddtrace/Makefile.crates
@@ -0,0 +1,35 @@
+CARGO_CRATES=	autocfg-1.3.0 \
+		bitflags-2.5.0 \
+		cfg-if-1.0.0 \
+		heck-0.4.1 \
+		indoc-2.0.5 \
+		libc-0.2.154 \
+		lock_api-0.4.12 \
+		memoffset-0.9.1 \
+		once_cell-1.19.0 \
+		parking_lot-0.12.2 \
+		parking_lot_core-0.9.10 \
+		portable-atomic-1.6.0 \
+		proc-macro2-1.0.82 \
+		pyo3-0.21.2 \
+		pyo3-build-config-0.21.2 \
+		pyo3-ffi-0.21.2 \
+		pyo3-macros-0.21.2 \
+		pyo3-macros-backend-0.21.2 \
+		quote-1.0.36 \
+		redox_syscall-0.5.1 \
+		scopeguard-1.2.0 \
+		smallvec-1.13.2 \
+		syn-2.0.61 \
+		target-lexicon-0.12.14 \
+		unicode-ident-1.0.12 \
+		unindent-0.2.3 \
+		windows-targets-0.52.5 \
+		windows_aarch64_gnullvm-0.52.5 \
+		windows_aarch64_msvc-0.52.5 \
+		windows_i686_gnu-0.52.5 \
+		windows_i686_gnullvm-0.52.5 \
+		windows_i686_msvc-0.52.5 \
+		windows_x86_64_gnu-0.52.5 \
+		windows_x86_64_gnullvm-0.52.5 \
+		windows_x86_64_msvc-0.52.5
diff --git a/devel/py-ddtrace/distinfo b/devel/py-ddtrace/distinfo
index 731ad9fed04a..6dbc0ea4ef45 100644
--- a/devel/py-ddtrace/distinfo
+++ b/devel/py-ddtrace/distinfo
@@ -1,5 +1,75 @@
-TIMESTAMP = 1722711197
-SHA256 (ddtrace-2.9.4.tar.gz) = d5d1fcf20b3962f3761397d22c173c37615fe4337f79596ab6ff15d2d4824ae6
-SIZE (ddtrace-2.9.4.tar.gz) = 7115839
+TIMESTAMP = 1722798783
+SHA256 (ddtrace-2.10.2.tar.gz) = a57a9a0a26518e7dde7db24df7a38b2052e53d92080f72301169ec0a733ddb2f
+SIZE (ddtrace-2.10.2.tar.gz) = 7345500
 SHA256 (abseil-cpp-20240116.2.tar.gz) = 733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc
 SIZE (abseil-cpp-20240116.2.tar.gz) = 2151288
+SHA256 (rust/crates/autocfg-1.3.0.crate) = 0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0
+SIZE (rust/crates/autocfg-1.3.0.crate) = 16524
+SHA256 (rust/crates/bitflags-2.5.0.crate) = cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1
+SIZE (rust/crates/bitflags-2.5.0.crate) = 43821
+SHA256 (rust/crates/cfg-if-1.0.0.crate) = baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd
+SIZE (rust/crates/cfg-if-1.0.0.crate) = 7934
+SHA256 (rust/crates/heck-0.4.1.crate) = 95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8
+SIZE (rust/crates/heck-0.4.1.crate) = 11567
+SHA256 (rust/crates/indoc-2.0.5.crate) = b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5
+SIZE (rust/crates/indoc-2.0.5.crate) = 14396
+SHA256 (rust/crates/libc-0.2.154.crate) = ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346
+SIZE (rust/crates/libc-0.2.154.crate) = 743304
+SHA256 (rust/crates/lock_api-0.4.12.crate) = 07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17
+SIZE (rust/crates/lock_api-0.4.12.crate) = 27591
+SHA256 (rust/crates/memoffset-0.9.1.crate) = 488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a
+SIZE (rust/crates/memoffset-0.9.1.crate) = 9032
+SHA256 (rust/crates/once_cell-1.19.0.crate) = 3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92
+SIZE (rust/crates/once_cell-1.19.0.crate) = 33046
+SHA256 (rust/crates/parking_lot-0.12.2.crate) = 7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb
+SIZE (rust/crates/parking_lot-0.12.2.crate) = 41723
+SHA256 (rust/crates/parking_lot_core-0.9.10.crate) = 1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8
+SIZE (rust/crates/parking_lot_core-0.9.10.crate) = 32406
+SHA256 (rust/crates/portable-atomic-1.6.0.crate) = 7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0
+SIZE (rust/crates/portable-atomic-1.6.0.crate) = 140689
+SHA256 (rust/crates/proc-macro2-1.0.82.crate) = 8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b
+SIZE (rust/crates/proc-macro2-1.0.82.crate) = 48452
+SHA256 (rust/crates/pyo3-0.21.2.crate) = a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8
+SIZE (rust/crates/pyo3-0.21.2.crate) = 504574
+SHA256 (rust/crates/pyo3-build-config-0.21.2.crate) = 7883df5835fafdad87c0d888b266c8ec0f4c9ca48a5bed6bbb592e8dedee1b50
+SIZE (rust/crates/pyo3-build-config-0.21.2.crate) = 30581
+SHA256 (rust/crates/pyo3-ffi-0.21.2.crate) = 01be5843dc60b916ab4dad1dca6d20b9b4e6ddc8e15f50c47fe6d85f1fb97403
+SIZE (rust/crates/pyo3-ffi-0.21.2.crate) = 66160
+SHA256 (rust/crates/pyo3-macros-0.21.2.crate) = 77b34069fc0682e11b31dbd10321cbf94808394c56fd996796ce45217dfac53c
+SIZE (rust/crates/pyo3-macros-0.21.2.crate) = 7920
+SHA256 (rust/crates/pyo3-macros-backend-0.21.2.crate) = 08260721f32db5e1a5beae69a55553f56b99bd0e1c3e6e0a5e8851a9d0f5a85c
+SIZE (rust/crates/pyo3-macros-backend-0.21.2.crate) = 58088
+SHA256 (rust/crates/quote-1.0.36.crate) = 0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7
+SIZE (rust/crates/quote-1.0.36.crate) = 28507
+SHA256 (rust/crates/redox_syscall-0.5.1.crate) = 469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e
+SIZE (rust/crates/redox_syscall-0.5.1.crate) = 22536
+SHA256 (rust/crates/scopeguard-1.2.0.crate) = 94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49
+SIZE (rust/crates/scopeguard-1.2.0.crate) = 11619
+SHA256 (rust/crates/smallvec-1.13.2.crate) = 3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67
+SIZE (rust/crates/smallvec-1.13.2.crate) = 35216
+SHA256 (rust/crates/syn-2.0.61.crate) = c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9
+SIZE (rust/crates/syn-2.0.61.crate) = 257199
+SHA256 (rust/crates/target-lexicon-0.12.14.crate) = e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f
+SIZE (rust/crates/target-lexicon-0.12.14.crate) = 25508
+SHA256 (rust/crates/unicode-ident-1.0.12.crate) = 3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b
+SIZE (rust/crates/unicode-ident-1.0.12.crate) = 42168
+SHA256 (rust/crates/unindent-0.2.3.crate) = c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce
+SIZE (rust/crates/unindent-0.2.3.crate) = 7306
+SHA256 (rust/crates/windows-targets-0.52.5.crate) = 6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb
+SIZE (rust/crates/windows-targets-0.52.5.crate) = 6376
+SHA256 (rust/crates/windows_aarch64_gnullvm-0.52.5.crate) = 7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263
+SIZE (rust/crates/windows_aarch64_gnullvm-0.52.5.crate) = 433266
+SHA256 (rust/crates/windows_aarch64_msvc-0.52.5.crate) = 9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6
+SIZE (rust/crates/windows_aarch64_msvc-0.52.5.crate) = 827944
+SHA256 (rust/crates/windows_i686_gnu-0.52.5.crate) = 88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670
+SIZE (rust/crates/windows_i686_gnu-0.52.5.crate) = 875699
+SHA256 (rust/crates/windows_i686_gnullvm-0.52.5.crate) = 87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9
+SIZE (rust/crates/windows_i686_gnullvm-0.52.5.crate) = 473064
+SHA256 (rust/crates/windows_i686_msvc-0.52.5.crate) = db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf
+SIZE (rust/crates/windows_i686_msvc-0.52.5.crate) = 895404
+SHA256 (rust/crates/windows_x86_64_gnu-0.52.5.crate) = 4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9
+SIZE (rust/crates/windows_x86_64_gnu-0.52.5.crate) = 831539
+SHA256 (rust/crates/windows_x86_64_gnullvm-0.52.5.crate) = 852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596
+SIZE (rust/crates/windows_x86_64_gnullvm-0.52.5.crate) = 433246
+SHA256 (rust/crates/windows_x86_64_msvc-0.52.5.crate) = bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0
+SIZE (rust/crates/windows_x86_64_msvc-0.52.5.crate) = 827905
diff --git a/devel/py-ddtrace/files/patch-pyproject.toml b/devel/py-ddtrace/files/patch-pyproject.toml
index 4ecfd7f3e372..9065cfbe01ed 100644
--- a/devel/py-ddtrace/files/patch-pyproject.toml
+++ b/devel/py-ddtrace/files/patch-pyproject.toml
@@ -1,9 +1,9 @@
---- pyproject.toml.orig	2024-04-04 15:25:08 UTC
+--- pyproject.toml.orig	2024-08-01 21:44:33 UTC
 +++ pyproject.toml
 @@ -1,5 +1,5 @@
  [build-system]
--requires = ["setuptools_scm[toml]>=4", "cython", "cmake>=3.24.2,<3.28; python_version>='3.7'"]
-+requires = ["setuptools_scm[toml]>=4", "cython"]
+-requires = ["setuptools_scm[toml]>=4", "cython", "cmake>=3.24.2,<3.28; python_version>='3.7'", "setuptools-rust<2"]
++requires = ["setuptools_scm[toml]>=4", "cython", "setuptools-rust<2"]
  build-backend = "setuptools.build_meta"
  
  [project]
diff --git a/devel/py-ddtrace/files/patch-setup.py b/devel/py-ddtrace/files/patch-setup.py
index 790f04b29ea4..db5700537fd7 100644
--- a/devel/py-ddtrace/files/patch-setup.py
+++ b/devel/py-ddtrace/files/patch-setup.py
@@ -1,24 +1,22 @@
---- setup.py.orig	2024-04-04 15:25:08 UTC
+--- setup.py.orig	2024-08-01 21:44:34 UTC
 +++ setup.py
-@@ -8,9 +8,7 @@ import tarfile
+@@ -8,7 +8,6 @@ import tarfile
  import sysconfig
  import tarfile
  
 -import cmake
+ from setuptools_rust import Binding
+ from setuptools_rust import RustExtension
  
--
- from setuptools import Extension, find_packages, setup  # isort: skip
- from setuptools.command.build_ext import build_ext  # isort: skip
- from setuptools.command.build_py import build_py as BuildPyCommand  # isort: skip
-@@ -481,10 +479,9 @@ setup(
+@@ -495,10 +494,9 @@ setup(
      # funcsigs backport required for vendored debtcollector
      cmdclass={
          "build_ext": CMakeBuild,
 -        "build_py": LibraryDownloader,
          "clean": CleanLibraries,
      },
--    setup_requires=["setuptools_scm[toml]>=4", "cython", "cmake>=3.24.2,<3.28"],
-+    setup_requires=["setuptools_scm[toml]>=4", "cython"],
+-    setup_requires=["setuptools_scm[toml]>=4", "cython", "cmake>=3.24.2,<3.28", "setuptools-rust"],
++    setup_requires=["setuptools_scm[toml]>=4", "cython", "setuptools-rust"],
      ext_modules=ext_modules
      + cythonize(
          [