summaryrefslogtreecommitdiff
path: root/python-safetensors.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-01-29 04:10:39 +0000
committerCoprDistGit <infra@openeuler.org>2024-01-29 04:10:39 +0000
commit10292ef49b8395859a4d335b2c9b3536b2fb387b (patch)
tree8512a60b90f7ff6cf91fcaa750d1a13be4ea8334 /python-safetensors.spec
parent5065028f8967e305dd6c192d7f3678c64700b5bd (diff)
automatic import of python-safetensorsopeneuler23.09
Diffstat (limited to 'python-safetensors.spec')
-rw-r--r--python-safetensors.spec58
1 files changed, 58 insertions, 0 deletions
diff --git a/python-safetensors.spec b/python-safetensors.spec
new file mode 100644
index 0000000..d2bceac
--- /dev/null
+++ b/python-safetensors.spec
@@ -0,0 +1,58 @@
+%global debug_package %{nil}
+%global _empty_manifest_terminate_build 0
+
+Name: python-safetensors
+Version: 0.4.2
+Release: 1
+Summary: Simple, safe way to store and distribute tensors
+License: Apache-2.0
+URL: https://github.com/huggingface/safetensors
+Source0: https://github.com/huggingface/safetensors/archive/refs/tags/v%{version}.tar.gz
+
+Requires: python3-numpy
+Requires: python3-pytorch
+
+%description
+Safetensors is a new simple format for storing tensors safely (as opposed to pickle) and that is still fast (zero-copy). Safetensors is really fast.
+%package -n python3-safetensors
+Summary: Simple, safe way to store and distribute tensors
+Provides: python3-safetensors
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-setuptools_scm
+BuildRequires: python3-pbr
+BuildRequires: python3-pip
+BuildRequires: python3-wheel
+BuildRequires: python3-hatchling
+
+BuildRequires: rust cargo
+BuildRequires: python3-maturin
+BuildRequires: python3-setuptools-rust
+
+%description -n python3-safetensors
+Safetensors is a new simple format for storing tensors safely (as opposed to pickle) and that is still fast (zero-copy). Safetensors is really fast.
+
+%prep
+%autosetup -p1 -n safetensors-%{version}
+
+%build
+pushd ./bindings/python
+%pyproject_build
+popd
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+
+%install
+pushd ./bindings/python
+%pyproject_install
+popd
+
+%files -n python3-safetensors
+%doc *.md
+%license LICENSE
+%{python3_sitearch}/*
+
+%changelog
+* Sun Jan 28 2024 Binshuo Zu <274620705z@gmail.com> - 0.4.2-1
+- Package init