diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-10 08:17:02 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-10 08:17:02 +0000 |
| commit | 7be361ecbf098c39071d13763d6e930bdac3ac48 (patch) | |
| tree | 3dea754d3c0629f7603a106fd12ac90bb13416f8 | |
| parent | e72d053aad50d74c0a8bafbb0e0155b0c1f9da42 (diff) | |
automatic import of python-pyfarmhash
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-pyfarmhash.spec | 245 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 247 insertions, 0 deletions
@@ -0,0 +1 @@ +/pyfarmhash-0.3.2.tar.gz diff --git a/python-pyfarmhash.spec b/python-pyfarmhash.spec new file mode 100644 index 0000000..f9164d7 --- /dev/null +++ b/python-pyfarmhash.spec @@ -0,0 +1,245 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pyfarmhash +Version: 0.3.2 +Release: 1 +Summary: Google FarmHash Bindings for Python +License: MIT License +URL: https://github.com/veelion/python-farmhash +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c3/7f/256f1954343fc44641d04292e1410470337db3720bd57b510782e449d6db/pyfarmhash-0.3.2.tar.gz + + +%description +# python-farmhash +Google's FarmHash binding for Python + + +## Overview + +This package provides bindings for the [Google's FarmHash](http://code.google.com/p/farmhash/). +Code specific to this project is covered by [The MIT License](http://opensource.org/licenses/MIT) + +## Install + +*Update:* Windows binary wheel uploaded to pypi + +Currently, clone the repo and: + +pip(Linux & Windows): +```bash +$ sudo pip install pyfarmhash +``` + +From Source: +```bash +$ cd python-farmhash +$ sudo python setup.py Install +``` + +### Build on Windows: + +1. Install Microsoft Visual C++ Compiler +2. Install miniconda for Python + +```bash +$ cd python-farmhash +$ sudo python setup.py install +``` + +## Usage + + +``` +import farmhash +print farmhash.hash64('abc') +2640714258260161385 + +For more details, use ipython: +In [1]: import farmhash + +In [2]: farmhash.hash64withseed? +Type: builtin_function_or_method +String Form:<built-in function hash64withseed> +Docstring: +Hash function for a string. For convenience, a 64-bit seed is also hashed into the result. +example: print farmhash.hash64withseed('abc', 12345) +13914286602242141520L +``` + + + + +%package -n python3-pyfarmhash +Summary: Google FarmHash Bindings for Python +Provides: python-pyfarmhash +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-cffi +BuildRequires: gcc +BuildRequires: gdb +%description -n python3-pyfarmhash +# python-farmhash +Google's FarmHash binding for Python + + +## Overview + +This package provides bindings for the [Google's FarmHash](http://code.google.com/p/farmhash/). +Code specific to this project is covered by [The MIT License](http://opensource.org/licenses/MIT) + +## Install + +*Update:* Windows binary wheel uploaded to pypi + +Currently, clone the repo and: + +pip(Linux & Windows): +```bash +$ sudo pip install pyfarmhash +``` + +From Source: +```bash +$ cd python-farmhash +$ sudo python setup.py Install +``` + +### Build on Windows: + +1. Install Microsoft Visual C++ Compiler +2. Install miniconda for Python + +```bash +$ cd python-farmhash +$ sudo python setup.py install +``` + +## Usage + + +``` +import farmhash +print farmhash.hash64('abc') +2640714258260161385 + +For more details, use ipython: +In [1]: import farmhash + +In [2]: farmhash.hash64withseed? +Type: builtin_function_or_method +String Form:<built-in function hash64withseed> +Docstring: +Hash function for a string. For convenience, a 64-bit seed is also hashed into the result. +example: print farmhash.hash64withseed('abc', 12345) +13914286602242141520L +``` + + + + +%package help +Summary: Development documents and examples for pyfarmhash +Provides: python3-pyfarmhash-doc +%description help +# python-farmhash +Google's FarmHash binding for Python + + +## Overview + +This package provides bindings for the [Google's FarmHash](http://code.google.com/p/farmhash/). +Code specific to this project is covered by [The MIT License](http://opensource.org/licenses/MIT) + +## Install + +*Update:* Windows binary wheel uploaded to pypi + +Currently, clone the repo and: + +pip(Linux & Windows): +```bash +$ sudo pip install pyfarmhash +``` + +From Source: +```bash +$ cd python-farmhash +$ sudo python setup.py Install +``` + +### Build on Windows: + +1. Install Microsoft Visual C++ Compiler +2. Install miniconda for Python + +```bash +$ cd python-farmhash +$ sudo python setup.py install +``` + +## Usage + + +``` +import farmhash +print farmhash.hash64('abc') +2640714258260161385 + +For more details, use ipython: +In [1]: import farmhash + +In [2]: farmhash.hash64withseed? +Type: builtin_function_or_method +String Form:<built-in function hash64withseed> +Docstring: +Hash function for a string. For convenience, a 64-bit seed is also hashed into the result. +example: print farmhash.hash64withseed('abc', 12345) +13914286602242141520L +``` + + + + +%prep +%autosetup -n pyfarmhash-0.3.2 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-pyfarmhash -f filelist.lst +%dir %{python3_sitearch}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.3.2-1 +- Package Spec generated @@ -0,0 +1 @@ +80206957815e75aaa674d23a36ef7443 pyfarmhash-0.3.2.tar.gz |
