git: e3c101e7ad2f - main - devel/py-watchfiles: Fix rust build

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Wed, 05 Apr 2023 17:37:40 UTC
The branch main has been updated by sunpoet:

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

commit e3c101e7ad2f072f9ea68e4e0bce5e9ba33c87aa
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-04-05 17:17:12 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-04-05 17:30:38 +0000

    devel/py-watchfiles: Fix rust build
    
    - Convert to USE_PYTHON=pep517
    - Bump PORTREVISION for package change
---
 devel/py-watchfiles/Makefile        |  15 +++---
 devel/py-watchfiles/Makefile.crates |  51 ++++++++++++++++++
 devel/py-watchfiles/distinfo        | 104 +++++++++++++++++++++++++++++++++++-
 devel/py-watchfiles/files/setup.py  |  15 ------
 4 files changed, 163 insertions(+), 22 deletions(-)

diff --git a/devel/py-watchfiles/Makefile b/devel/py-watchfiles/Makefile
index d7fe4c0cbe49..647bc41be878 100644
--- a/devel/py-watchfiles/Makefile
+++ b/devel/py-watchfiles/Makefile
@@ -1,8 +1,10 @@
 PORTNAME=	watchfiles
 PORTVERSION=	0.18.1
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+DISTFILES=	watchfiles-${PORTVERSION}${EXTRACT_SUFX}
 
 MAINTAINER=	sunpoet@FreeBSD.org
 COMMENT=	Simple, modern and high performance file watching and code reload in python
@@ -11,15 +13,16 @@ WWW=		https://github.com/samuelcolvin/watchfiles
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}maturin>=0.13<0.14:devel/py-maturin@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}anyio>=3.0.0:devel/py-anyio@${PY_FLAVOR}
 
-USES=		dos2unix python:3.7+
-USE_PYTHON=	autoplist concurrent distutils
+USES=		cargo dos2unix python:3.7+
+USE_PYTHON=	autoplist concurrent pep517
 
-NO_ARCH=	yes
+CARGO_BUILD=	no
+CARGO_INSTALL=	no
 
-post-patch:
-	@${RM} ${WRKSRC}/pyproject.toml
-	@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
+post-install:
+	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
 
 .include <bsd.port.mk>
diff --git a/devel/py-watchfiles/Makefile.crates b/devel/py-watchfiles/Makefile.crates
new file mode 100644
index 000000000000..00f84d6a7325
--- /dev/null
+++ b/devel/py-watchfiles/Makefile.crates
@@ -0,0 +1,51 @@
+CARGO_CRATES=	autocfg-1.1.0 \
+		bitflags-1.3.2 \
+		cfg-if-1.0.0 \
+		crossbeam-channel-0.5.4 \
+		crossbeam-utils-0.8.8 \
+		filetime-0.2.16 \
+		fsevent-sys-4.1.0 \
+		indoc-1.0.4 \
+		inotify-0.9.6 \
+		inotify-sys-0.1.5 \
+		kqueue-1.0.5 \
+		kqueue-sys-1.0.3 \
+		lazy_static-1.4.0 \
+		libc-0.2.124 \
+		lock_api-0.4.7 \
+		log-0.4.16 \
+		memoffset-0.6.5 \
+		mio-0.8.2 \
+		miow-0.3.7 \
+		notify-5.0.0 \
+		ntapi-0.3.7 \
+		once_cell-1.10.0 \
+		parking_lot-0.12.0 \
+		parking_lot_core-0.9.2 \
+		proc-macro2-1.0.37 \
+		pyo3-0.17.3 \
+		pyo3-build-config-0.17.3 \
+		pyo3-ffi-0.17.3 \
+		pyo3-macros-0.17.3 \
+		pyo3-macros-backend-0.17.3 \
+		quote-1.0.18 \
+		redox_syscall-0.2.13 \
+		same-file-1.0.6 \
+		scopeguard-1.1.0 \
+		smallvec-1.8.0 \
+		syn-1.0.91 \
+		target-lexicon-0.12.3 \
+		unicode-xid-0.2.2 \
+		unindent-0.1.8 \
+		walkdir-2.3.2 \
+		wasi-0.11.0+wasi-snapshot-preview1 \
+		winapi-0.3.9 \
+		winapi-i686-pc-windows-gnu-0.4.0 \
+		winapi-util-0.1.5 \
+		winapi-x86_64-pc-windows-gnu-0.4.0 \
+		windows-sys-0.34.0 \
+		windows_aarch64_msvc-0.34.0 \
+		windows_i686_gnu-0.34.0 \
+		windows_i686_msvc-0.34.0 \
+		windows_x86_64_gnu-0.34.0 \
+		windows_x86_64_msvc-0.34.0
diff --git a/devel/py-watchfiles/distinfo b/devel/py-watchfiles/distinfo
index e1f5e2c9bdf6..4400dc920c5c 100644
--- a/devel/py-watchfiles/distinfo
+++ b/devel/py-watchfiles/distinfo
@@ -1,3 +1,105 @@
-TIMESTAMP = 1669057879
+TIMESTAMP = 1679498762
 SHA256 (watchfiles-0.18.1.tar.gz) = 4ec0134a5e31797eb3c6c624dbe9354f2a8ee9c720e0b46fc5b7bab472b7c6d4
 SIZE (watchfiles-0.18.1.tar.gz) = 35613
+SHA256 (rust/crates/autocfg-1.1.0.crate) = d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa
+SIZE (rust/crates/autocfg-1.1.0.crate) = 13272
+SHA256 (rust/crates/bitflags-1.3.2.crate) = bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a
+SIZE (rust/crates/bitflags-1.3.2.crate) = 23021
+SHA256 (rust/crates/cfg-if-1.0.0.crate) = baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd
+SIZE (rust/crates/cfg-if-1.0.0.crate) = 7934
+SHA256 (rust/crates/crossbeam-channel-0.5.4.crate) = 5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53
+SIZE (rust/crates/crossbeam-channel-0.5.4.crate) = 88237
+SHA256 (rust/crates/crossbeam-utils-0.8.8.crate) = 0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38
+SIZE (rust/crates/crossbeam-utils-0.8.8.crate) = 39681
+SHA256 (rust/crates/filetime-0.2.16.crate) = c0408e2626025178a6a7f7ffc05a25bc47103229f19c113755de7bf63816290c
+SIZE (rust/crates/filetime-0.2.16.crate) = 14502
+SHA256 (rust/crates/fsevent-sys-4.1.0.crate) = 76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2
+SIZE (rust/crates/fsevent-sys-4.1.0.crate) = 4620
+SHA256 (rust/crates/indoc-1.0.4.crate) = e7906a9fababaeacb774f72410e497a1d18de916322e33797bb2cd29baa23c9e
+SIZE (rust/crates/indoc-1.0.4.crate) = 13122
+SHA256 (rust/crates/inotify-0.9.6.crate) = f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff
+SIZE (rust/crates/inotify-0.9.6.crate) = 22971
+SHA256 (rust/crates/inotify-sys-0.1.5.crate) = e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb
+SIZE (rust/crates/inotify-sys-0.1.5.crate) = 6965
+SHA256 (rust/crates/kqueue-1.0.5.crate) = 97caf428b83f7c86809b7450722cd1f2b1fc7fb23aa7b9dee7e72ed14d048352
+SIZE (rust/crates/kqueue-1.0.5.crate) = 12654
+SHA256 (rust/crates/kqueue-sys-1.0.3.crate) = 8367585489f01bc55dd27404dcf56b95e6da061a256a666ab23be9ba96a2e587
+SIZE (rust/crates/kqueue-sys-1.0.3.crate) = 6673
+SHA256 (rust/crates/lazy_static-1.4.0.crate) = e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646
+SIZE (rust/crates/lazy_static-1.4.0.crate) = 10443
+SHA256 (rust/crates/libc-0.2.124.crate) = 21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50
+SIZE (rust/crates/libc-0.2.124.crate) = 577742
+SHA256 (rust/crates/lock_api-0.4.7.crate) = 327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53
+SIZE (rust/crates/lock_api-0.4.7.crate) = 25371
+SHA256 (rust/crates/log-0.4.16.crate) = 6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8
+SIZE (rust/crates/log-0.4.16.crate) = 37758
+SHA256 (rust/crates/memoffset-0.6.5.crate) = 5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce
+SIZE (rust/crates/memoffset-0.6.5.crate) = 7686
+SHA256 (rust/crates/mio-0.8.2.crate) = 52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9
+SIZE (rust/crates/mio-0.8.2.crate) = 88272
+SHA256 (rust/crates/miow-0.3.7.crate) = b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21
+SIZE (rust/crates/miow-0.3.7.crate) = 24563
+SHA256 (rust/crates/notify-5.0.0.crate) = ed2c66da08abae1c024c01d635253e402341b4060a12e99b31c7594063bf490a
+SIZE (rust/crates/notify-5.0.0.crate) = 37091
+SHA256 (rust/crates/ntapi-0.3.7.crate) = c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f
+SIZE (rust/crates/ntapi-0.3.7.crate) = 126994
+SHA256 (rust/crates/once_cell-1.10.0.crate) = 87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9
+SIZE (rust/crates/once_cell-1.10.0.crate) = 30414
+SHA256 (rust/crates/parking_lot-0.12.0.crate) = 87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58
+SIZE (rust/crates/parking_lot-0.12.0.crate) = 39761
+SHA256 (rust/crates/parking_lot_core-0.9.2.crate) = 995f667a6c822200b0433ac218e05582f0e2efa1b922a3fd2fbaadc5f87bab37
+SIZE (rust/crates/parking_lot_core-0.9.2.crate) = 32254
+SHA256 (rust/crates/proc-macro2-1.0.37.crate) = ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1
+SIZE (rust/crates/proc-macro2-1.0.37.crate) = 41378
+SHA256 (rust/crates/pyo3-0.17.3.crate) = 268be0c73583c183f2b14052337465768c07726936a260f480f0857cb95ba543
+SIZE (rust/crates/pyo3-0.17.3.crate) = 408939
+SHA256 (rust/crates/pyo3-build-config-0.17.3.crate) = 28fcd1e73f06ec85bf3280c48c67e731d8290ad3d730f8be9dc07946923005c8
+SIZE (rust/crates/pyo3-build-config-0.17.3.crate) = 29230
+SHA256 (rust/crates/pyo3-ffi-0.17.3.crate) = 0f6cb136e222e49115b3c51c32792886defbfb0adead26a688142b346a0b9ffc
+SIZE (rust/crates/pyo3-ffi-0.17.3.crate) = 62854
+SHA256 (rust/crates/pyo3-macros-0.17.3.crate) = 94144a1266e236b1c932682136dc35a9dee8d3589728f68130c7c3861ef96b28
+SIZE (rust/crates/pyo3-macros-0.17.3.crate) = 7257
+SHA256 (rust/crates/pyo3-macros-backend-0.17.3.crate) = c8df9be978a2d2f0cdebabb03206ed73b11314701a5bfe71b0d753b81997777f
+SIZE (rust/crates/pyo3-macros-backend-0.17.3.crate) = 49992
+SHA256 (rust/crates/quote-1.0.18.crate) = a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1
+SIZE (rust/crates/quote-1.0.18.crate) = 28911
+SHA256 (rust/crates/redox_syscall-0.2.13.crate) = 62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42
+SIZE (rust/crates/redox_syscall-0.2.13.crate) = 23759
+SHA256 (rust/crates/same-file-1.0.6.crate) = 93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502
+SIZE (rust/crates/same-file-1.0.6.crate) = 10183
+SHA256 (rust/crates/scopeguard-1.1.0.crate) = d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd
+SIZE (rust/crates/scopeguard-1.1.0.crate) = 11470
+SHA256 (rust/crates/smallvec-1.8.0.crate) = f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83
+SIZE (rust/crates/smallvec-1.8.0.crate) = 27992
+SHA256 (rust/crates/syn-1.0.91.crate) = b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d
+SIZE (rust/crates/syn-1.0.91.crate) = 235996
+SHA256 (rust/crates/target-lexicon-0.12.3.crate) = d7fa7e55043acb85fca6b3c01485a2eeb6b69c5d21002e273c79e465f43b7ac1
+SIZE (rust/crates/target-lexicon-0.12.3.crate) = 22990
+SHA256 (rust/crates/unicode-xid-0.2.2.crate) = 8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3
+SIZE (rust/crates/unicode-xid-0.2.2.crate) = 14955
+SHA256 (rust/crates/unindent-0.1.8.crate) = 514672a55d7380da379785a4d70ca8386c8883ff7eaae877be4d2081cebe73d8
+SIZE (rust/crates/unindent-0.1.8.crate) = 8326
+SHA256 (rust/crates/walkdir-2.3.2.crate) = 808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56
+SIZE (rust/crates/walkdir-2.3.2.crate) = 23516
+SHA256 (rust/crates/wasi-0.11.0+wasi-snapshot-preview1.crate) = 9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423
+SIZE (rust/crates/wasi-0.11.0+wasi-snapshot-preview1.crate) = 28131
+SHA256 (rust/crates/winapi-0.3.9.crate) = 5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419
+SIZE (rust/crates/winapi-0.3.9.crate) = 1200382
+SHA256 (rust/crates/winapi-i686-pc-windows-gnu-0.4.0.crate) = ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6
+SIZE (rust/crates/winapi-i686-pc-windows-gnu-0.4.0.crate) = 2918815
+SHA256 (rust/crates/winapi-util-0.1.5.crate) = 70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178
+SIZE (rust/crates/winapi-util-0.1.5.crate) = 10164
+SHA256 (rust/crates/winapi-x86_64-pc-windows-gnu-0.4.0.crate) = 712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f
+SIZE (rust/crates/winapi-x86_64-pc-windows-gnu-0.4.0.crate) = 2947998
+SHA256 (rust/crates/windows-sys-0.34.0.crate) = 5acdd78cb4ba54c0045ac14f62d8f94a03d10047904ae2a40afa1e99d8f70825
+SIZE (rust/crates/windows-sys-0.34.0.crate) = 3369228
+SHA256 (rust/crates/windows_aarch64_msvc-0.34.0.crate) = 17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d
+SIZE (rust/crates/windows_aarch64_msvc-0.34.0.crate) = 674445
+SHA256 (rust/crates/windows_i686_gnu-0.34.0.crate) = 2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed
+SIZE (rust/crates/windows_i686_gnu-0.34.0.crate) = 772343
+SHA256 (rust/crates/windows_i686_msvc-0.34.0.crate) = 9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956
+SIZE (rust/crates/windows_i686_msvc-0.34.0.crate) = 733497
+SHA256 (rust/crates/windows_x86_64_gnu-0.34.0.crate) = cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4
+SIZE (rust/crates/windows_x86_64_gnu-0.34.0.crate) = 744301
+SHA256 (rust/crates/windows_x86_64_msvc-0.34.0.crate) = d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9
+SIZE (rust/crates/windows_x86_64_msvc-0.34.0.crate) = 669900
diff --git a/devel/py-watchfiles/files/setup.py b/devel/py-watchfiles/files/setup.py
deleted file mode 100644
index 4c7ceddc669f..000000000000
--- a/devel/py-watchfiles/files/setup.py
+++ /dev/null
@@ -1,15 +0,0 @@
-from setuptools import setup
-
-setup(
-    name = 'watchfiles',
-    version = '%%PORTVERSION%%',
-    description = 'Simple, modern and high performance file watching and code reload in python.',
-    author = None,
-    author_email = 'Samuel Colvin <s@muelcolvin.com>',
-    url = 'https://github.com/samuelcolvin/watchfiles',
-    packages = ['watchfiles'],
-    package_data = {'': ['*']},
-    install_requires = ['anyio >= 3.0.0'],
-    entry_points = {'console_scripts': ['watchfiles = watchfiles.cli:cli']},
-    python_requires = '>= 3.7',
-)