diff --git a/0001-set-cargo-vendor-cache-for-local-build.patch b/0001-set-cargo-vendor-cache-for-local-build.patch new file mode 100644 index 0000000..d8aa99c --- /dev/null +++ b/0001-set-cargo-vendor-cache-for-local-build.patch @@ -0,0 +1,26 @@ +From ab7ddc5a199e791fba44150ed56c14b6874dbce0 Mon Sep 17 00:00:00 2001 +From: desert-sailor +Date: Wed, 9 Aug 2023 14:50:41 +0800 +Subject: [PATCH] set cargo vendor cache for local build + +--- + .cargo/config.toml | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/.cargo/config.toml b/.cargo/config.toml +index 7caf56d..07b7f6d 100644 +--- a/.cargo/config.toml ++++ b/.cargo/config.toml +@@ -10,3 +10,9 @@ rustflags = [ + "-C", "link-arg=-undefined", + "-C", "link-arg=dynamic_lookup", + ] ++ ++[source.crates-io] ++replace-with = "vendored-sources" ++ ++[source.vendored-sources] ++directory = "vendor" +-- +2.33.0 + diff --git a/cargo-vendor-cache b/cargo-vendor-cache new file mode 100644 index 0000000..85c75ab Binary files /dev/null and b/cargo-vendor-cache differ diff --git a/python-watchfiles.spec b/python-watchfiles.spec new file mode 100644 index 0000000..cb384ed --- /dev/null +++ b/python-watchfiles.spec @@ -0,0 +1,54 @@ +%global _empty_manifest_terminate_build 0 +%global pypi_name watchfiles + +Name: python-%{pypi_name} +Version: 0.19.0 +Release: 1 +Summary: Simple, modern and high performance file watching and code reload in python. + +License: MIT +URL: https://github.com/samuelcolvin/watchfiles +Source0: https://files.pythonhosted.org/packages/b3/17/d9453f774dd079fbe7d51565d58006f5059fc17c2fbcf952ef176fbb8657/watchfiles-0.19.0.tar.gz +Source1: cargo-vendor-cache +Patch1: 0001-set-cargo-vendor-cache-for-local-build.patch + +BuildRequires: rust-packaging + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-hatchling +BuildRequires: python3-maturin + +%description +Simple, modern and high performance file watching and code reload in python. + + +%package -n python3-%{pypi_name} +Summary: %{summary} + +%description -n python3-%{pypi_name} +Simple, modern and high performance file watching and code reload in python. + + +%prep +%autosetup -p1 -n %{pypi_name}-%{version} +tar xzvf %{SOURCE1} -C . + +%build +%pyproject_build + +%install +%pyproject_install + +%files -n python3-%{pypi_name} +%doc README.md +%license LICENSE +%{_bindir}/watchfiles +%{python3_sitearch}/%{pypi_name} +%{python3_sitearch}/%{pypi_name}*.dist-info/ + +%changelog +* Wed Aug 9 2023 Dongxing Wang - 0.19.0-1 +- Initial package diff --git a/watchfiles-0.19.0.tar.gz b/watchfiles-0.19.0.tar.gz new file mode 100644 index 0000000..11cc1a8 Binary files /dev/null and b/watchfiles-0.19.0.tar.gz differ