[packages/python3-watchfiles] - new
qboosh
qboosh at pld-linux.org
Sun Jan 11 16:21:29 CET 2026
commit 888c2aecaf5e8f47bb8988857dff7410fccfb4ae
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Jan 11 16:21:18 2026 +0100
- new
python3-watchfiles.spec | 127 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 127 insertions(+)
---
diff --git a/python3-watchfiles.spec b/python3-watchfiles.spec
new file mode 100644
index 0000000..8b39174
--- /dev/null
+++ b/python3-watchfiles.spec
@@ -0,0 +1,127 @@
+#
+# Conditional build:
+%bcond_with doc # API documentation (not in sdist)
+%bcond_without tests # unit tests
+
+Summary: Simple, modern and high performance file watching and code reload in Python
+Summary(pl.UTF-8): Proste, nowoczesne i wydajne monitorowanie plików i przeładowywanie kodu w Pythonie
+Name: python3-watchfiles
+Version: 1.1.1
+Release: 1
+License: MIT
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/watchfiles/
+Source0: https://files.pythonhosted.org/packages/source/w/watchfiles/watchfiles-%{version}.tar.gz
+# Source0-md5: 6392b8b6c39803e431f5a2f80bbb2fb7
+# cargo vendor-filterer --platform='*-unknown-linux-*' --tier=2
+Source1: watchfiles-%{version}-vendor.tar.xz
+# Source1-md5: a1360324e17c5702652c4b2f7fc8caf6
+URL: https://pypi.org/project/watchfiles/
+BuildRequires: cargo
+BuildRequires: python3-build
+BuildRequires: python3-installer
+BuildRequires: python3-maturin >= 1.8.1
+BuildRequires: python3-maturin < 2
+BuildRequires: python3-modules >= 1:3.9
+%if %{with tests}
+BuildRequires: python3-anyio >= 3.0.0
+BuildRequires: python3-dirty_equals >= 0.8.0
+BuildRequires: python3-pytest >= 7.4.4
+BuildRequires: python3-pytest-mock >= 3.14.0
+BuildRequires: python3-pytest-pretty >= 1.2.0
+BuildRequires: python3-pytest-timeout >= 2.3.1
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 2.050
+BuildRequires: rust >= 1.77
+%if %{with doc}
+BuildRequires: python3-mdx-include >= 1.4.2
+BuildRequires: python3-mkdocs >= 1.6.1
+BuildRequires: python3-mkdocs-material >= 9.5.49
+BuildRequires: python3-mkdocstrings >= 0.25.1
+%endif
+%{?rust_req}
+Requires: python3-modules >= 1:3.9
+ExclusiveArch: %{rust_arches}
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Simple, modern and high performance file watching and code reload in
+Python.
+
+Underlying file system notifications are handled by the Notify Rust
+library.
+
+This package was previously named "watchgod".
+
+%description -l pl.UTF-8
+Proste, nowoczesne i wydajne monitorowanie plików i przeładowywanie
+kodu w Pythonie.
+
+Wykorzystywane poniżej powiadomienia z systemu plików są obsługiwane
+przez bibliotekę Rusta Notify.
+
+Ten pakiet wcześniej nazywał się "watchgod".
+
+%prep
+%setup -q -n watchfiles-%{version} -a1
+
+cat >>.cargo/config.toml <<EOF
+[source.crates-io]
+registry = 'https://github.com/rust-lang/crates.io-index'
+replace-with = 'vendored-sources'
+
+[source.vendored-sources]
+directory = '$PWD/vendor'
+EOF
+
+%build
+export CARGO_HOME="$(pwd)/.cargo"
+export CARGO_OFFLINE=true
+export CARGO_TERM_VERBOSE=true
+%ifarch x32
+export CARGO_BUILD_TARGET=x86_64-unknown-linux-gnux32
+export PKG_CONFIG_ALLOW_CROSS=1
+export PYO3_CROSS_LIB_DIR=%{_libdir}
+%endif
+%py3_build_pyproject
+
+%if %{with tests}
+%{__python3} -m zipfile -e build-3/*.whl build-3-test
+# move to avoid finding ../watchfiles without _rust_notify module
+cd build-3-test
+ln -sf ../tests tests
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS=anyio.pytest_plugin,pytest_mock.plugin,pytest_timeout \
+PYTHONPATH=$(pwd) \
+%{__python3} -m pytest tests
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+export CARGO_HOME="$(pwd)/.cargo"
+export CARGO_OFFLINE=true
+export CARGO_TERM_VERBOSE=true
+%ifarch x32
+export CARGO_BUILD_TARGET=x86_64-unknown-linux-gnux32
+export PKG_CONFIG_ALLOW_CROSS=1
+export PYO3_CROSS_LIB_DIR=%{_libdir}
+%endif
+
+%py3_install_pyproject
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.md
+%attr(755,root,root) %{_bindir}/watchfiles
+%dir %{py3_sitedir}/watchfiles
+%{py3_sitedir}/watchfiles/*.py
+%{py3_sitedir}/watchfiles/_rust_notify.cpython-*.so
+%{py3_sitedir}/watchfiles/_rust_notify.pyi
+%{py3_sitedir}/watchfiles/py.typed
+%{py3_sitedir}/watchfiles/__pycache__
+%{py3_sitedir}/watchfiles-%{version}.dist-info
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-watchfiles.git/commitdiff/888c2aecaf5e8f47bb8988857dff7410fccfb4ae
More information about the pld-cvs-commit
mailing list