diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-23 03:55:36 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-23 03:55:36 +0000 |
| commit | 152844d704e6e303040a87bc7552525bd6b06440 (patch) | |
| tree | 39023a2520aa05df48406c851a559f58b4110698 /python-cityhash.spec | |
| parent | d2f1c9bc1a5f6d8ff94f487f25c888362c487e55 (diff) | |
automatic import of python-cityhashopeneuler20.03
Diffstat (limited to 'python-cityhash.spec')
| -rw-r--r-- | python-cityhash.spec | 260 |
1 files changed, 136 insertions, 124 deletions
diff --git a/python-cityhash.spec b/python-cityhash.spec index 5d3a98e..03c3595 100644 --- a/python-cityhash.spec +++ b/python-cityhash.spec @@ -1,11 +1,11 @@ %global _empty_manifest_terminate_build 0 Name: python-cityhash -Version: 0.4.6 +Version: 0.4.7 Release: 1 Summary: Python bindings for CityHash and FarmHash License: MIT URL: https://github.com/escherba/python-cityhash -Source0: https://mirrors.nju.edu.cn/pypi/web/packages/48/e0/5bf47be42c9ce0e746484a038a1c5ac263fd7980492b4efd18c2fd6ac930/cityhash-0.4.6.tar.gz +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/37/94/0bc9bf508e6c39426a946a6217d20e3d471e57a45723c991213bb4616cd9/cityhash-0.4.7.tar.gz %description @@ -15,24 +15,28 @@ Python wrapper for [FarmHash](https://github.com/google/farmhash) and [CityHash](https://github.com/google/cityhash), a family of fast non-cryptographic hash functions. -[](https://github.com/escherba/python-cityhash/actions/workflows/build.yml) -[](https://pypi.python.org/pypi/cityhash) +[](https://github.com/escherba/python-cityhash/actions/workflows/build.yml) +[](https://pypi.python.org/pypi/cityhash) +[](https://anaconda.org/conda-forge/python-cityhash) [](https://pypistats.org/packages/cityhash) [](https://opensource.org/licenses/mit-license) -[](https://pypi.python.org/pypi/cityhash) +[](https://pypi.python.org/pypi/cityhash) ## Getting Started -This simplest way to use this package is to install it from PyPI: +To install from PyPI: ``` bash pip install cityhash ``` -This package exposes Python APIs for CityHash and FarmHash under `cityhash` and +To install in a Conda environment: + +``` bash +conda install -c conda-forge python-cityhash +``` + +The package exposes Python APIs for CityHash and FarmHash under `cityhash` and `farmhash` namespaces, respectively. Each provides 32-, 64- and 128-bit implementations. @@ -55,7 +59,7 @@ Usage example for FarmHash: ### Hardware-independent fingerprints -Fingerprints are seedless hashes which are guaranteed to be hardware- and +Fingerprints are seedless hashes that are guaranteed to be hardware- and platform-independent. This can be useful for networking applications which require persisting hashed values. @@ -69,21 +73,21 @@ require persisting hashed values. ### Incremental hashing CityHash and FarmHash do not support incremental hashing and thus are not ideal -for hashing of streams. If you require incremental hashing feature, use +for hashing of character streams. If you require incremental hashing, consider +another hashing library, such as [MetroHash](https://github.com/escherba/python-metrohash) or -[xxHash](https://github.com/ifduyue/python-xxhash) instead, which do support -it. +[xxHash](https://github.com/ifduyue/python-xxhash). ### Fast hashing of NumPy arrays -The Python [Buffer Protocol](https://docs.python.org/3/c-api/buffer.html) -allows Python objects to expose their data as raw byte arrays to other objects, -for fast access without copying to a separate location in memory. Among others, -NumPy is a major framework that supports this protocol. +The [Buffer Protocol](https://docs.python.org/3/c-api/buffer.html) allows +Python objects to expose their data as raw byte arrays for fast access without +having to copy to a separate location in memory. NumPy is one well-known +library that extensively uses this protocol. -All hashing functions in this packege will read byte arrays from objects that -expose them via the buffer protocol. Here is an example showing hashing of a 4D -NumPy array: +All hashing functions in this package will read byte arrays from objects that +expose them via the buffer protocol. Here is an example showing hashing of a +four-dimensional NumPy array: ``` python >>> import numpy as np @@ -94,30 +98,29 @@ NumPy array: ``` -The arrays need to be contiguous for this to work. To convert a non-contiguous -array, use NumPy's `ascontiguousarray()` function. +The NumPy arrays need to be contiguous for this to work. To convert a +non-contiguous array, use NumPy's `ascontiguousarray()` function. ## SSE4.2 support -For x86-64 platforms, the PyPi repository for this package includes wheels -compiled with SSE4.2 support. The 32- and 64-bit FarmHash variants -significantly benefit from SSE4.2 instructions. The 128-bit version, -unfortunately, does not exhibit speed up after compiling with SSE4.2 support. +For x86-64 platforms, the PyPI repository for this package includes wheels +compiled with SSE4.2 support. The 32- and 64-bit (but not the 128-bit) +variants of FarmHash significantly benefit from SSE4.2 instructions. -The vanilla CityHash fucntions (under `cityhash` module) do not take advantage -of SSE4.2. Instead, the `cityhashcrc` module provided with this package exposes -128- and 256-bit CRC functions which do harness SSE4.2. These functions are -very fast, and beat `FarmHash128` on speed (FarmHash does not include a 256-bit -function). Since FarmHash is the intended successor of CityHash, I would be -careful before using the CityHash-CRC functions, however, and would verify -whether they provide sufficient randomness for your intended application. +The vanilla CityHash functions (under `cityhash` module) do not take advantage +of SSE4.2. Instead, one can use the `cityhashcrc` module provided with this +package which exposes 128- and 256-bit CRC functions that do harness SSE4.2. +These functions are very fast, and beat `FarmHash128` on speed (FarmHash does +not include a 256-bit function). Since FarmHash is the intended successor of +CityHash, I would be careful before using the CityHash-CRC functions, however, +and would verify whether they provide sufficient randomness for your intended +application. ## Development ### Local workflow -For those who want to contribute, here is a quick start using some makefile -commands: +For those wanting to contribute, here is a quick start using Make commands: ``` bash git clone https://github.com/escherba/python-cityhash.git @@ -128,7 +131,7 @@ make cpp-test # run C++ tests make shell # enter IPython shell ``` -To find out which Make targets are available, type: +To find out which Make targets are available, enter: ``` bash make help @@ -136,10 +139,11 @@ make help ### Distribution -The wheels are built using [cibuildwheel](https://cibuildwheel.readthedocs.io/) -and are distributed to PyPI using GitHub actions. The wheels contain compiled -binaries and are available for the following platforms: windows-amd64, -ubuntu-x86, linux-x86\_64, linux-aarch64, and macosx-x86\_64. +The package wheels are built using +[cibuildwheel](https://cibuildwheel.readthedocs.io/) and are distributed to +PyPI using GitHub actions. The wheels contain compiled binaries and are +available for the following platforms: windows-amd64, ubuntu-x86, +linux-x86\_64, linux-aarch64, and macosx-x86\_64. ## See Also @@ -151,7 +155,7 @@ see [MetroHash](https://github.com/escherba/python-metrohash), ## Authors The original CityHash Python bindings are due to Alexander \[Amper\] Marshalov. -These were rewritten in Cython by Eugene Scherba, who also added the FarmHash +They were rewritten in Cython by Eugene Scherba, who also added the FarmHash bindings. The CityHash and FarmHash algorithms and their C++ implementation are by Google. @@ -178,24 +182,28 @@ Python wrapper for [FarmHash](https://github.com/google/farmhash) and [CityHash](https://github.com/google/cityhash), a family of fast non-cryptographic hash functions. -[](https://github.com/escherba/python-cityhash/actions/workflows/build.yml) -[](https://pypi.python.org/pypi/cityhash) +[](https://github.com/escherba/python-cityhash/actions/workflows/build.yml) +[](https://pypi.python.org/pypi/cityhash) +[](https://anaconda.org/conda-forge/python-cityhash) [](https://pypistats.org/packages/cityhash) [](https://opensource.org/licenses/mit-license) -[](https://pypi.python.org/pypi/cityhash) +[](https://pypi.python.org/pypi/cityhash) ## Getting Started -This simplest way to use this package is to install it from PyPI: +To install from PyPI: ``` bash pip install cityhash ``` -This package exposes Python APIs for CityHash and FarmHash under `cityhash` and +To install in a Conda environment: + +``` bash +conda install -c conda-forge python-cityhash +``` + +The package exposes Python APIs for CityHash and FarmHash under `cityhash` and `farmhash` namespaces, respectively. Each provides 32-, 64- and 128-bit implementations. @@ -218,7 +226,7 @@ Usage example for FarmHash: ### Hardware-independent fingerprints -Fingerprints are seedless hashes which are guaranteed to be hardware- and +Fingerprints are seedless hashes that are guaranteed to be hardware- and platform-independent. This can be useful for networking applications which require persisting hashed values. @@ -232,21 +240,21 @@ require persisting hashed values. ### Incremental hashing CityHash and FarmHash do not support incremental hashing and thus are not ideal -for hashing of streams. If you require incremental hashing feature, use +for hashing of character streams. If you require incremental hashing, consider +another hashing library, such as [MetroHash](https://github.com/escherba/python-metrohash) or -[xxHash](https://github.com/ifduyue/python-xxhash) instead, which do support -it. +[xxHash](https://github.com/ifduyue/python-xxhash). ### Fast hashing of NumPy arrays -The Python [Buffer Protocol](https://docs.python.org/3/c-api/buffer.html) -allows Python objects to expose their data as raw byte arrays to other objects, -for fast access without copying to a separate location in memory. Among others, -NumPy is a major framework that supports this protocol. +The [Buffer Protocol](https://docs.python.org/3/c-api/buffer.html) allows +Python objects to expose their data as raw byte arrays for fast access without +having to copy to a separate location in memory. NumPy is one well-known +library that extensively uses this protocol. -All hashing functions in this packege will read byte arrays from objects that -expose them via the buffer protocol. Here is an example showing hashing of a 4D -NumPy array: +All hashing functions in this package will read byte arrays from objects that +expose them via the buffer protocol. Here is an example showing hashing of a +four-dimensional NumPy array: ``` python >>> import numpy as np @@ -257,30 +265,29 @@ NumPy array: ``` -The arrays need to be contiguous for this to work. To convert a non-contiguous -array, use NumPy's `ascontiguousarray()` function. +The NumPy arrays need to be contiguous for this to work. To convert a +non-contiguous array, use NumPy's `ascontiguousarray()` function. ## SSE4.2 support -For x86-64 platforms, the PyPi repository for this package includes wheels -compiled with SSE4.2 support. The 32- and 64-bit FarmHash variants -significantly benefit from SSE4.2 instructions. The 128-bit version, -unfortunately, does not exhibit speed up after compiling with SSE4.2 support. +For x86-64 platforms, the PyPI repository for this package includes wheels +compiled with SSE4.2 support. The 32- and 64-bit (but not the 128-bit) +variants of FarmHash significantly benefit from SSE4.2 instructions. -The vanilla CityHash fucntions (under `cityhash` module) do not take advantage -of SSE4.2. Instead, the `cityhashcrc` module provided with this package exposes -128- and 256-bit CRC functions which do harness SSE4.2. These functions are -very fast, and beat `FarmHash128` on speed (FarmHash does not include a 256-bit -function). Since FarmHash is the intended successor of CityHash, I would be -careful before using the CityHash-CRC functions, however, and would verify -whether they provide sufficient randomness for your intended application. +The vanilla CityHash functions (under `cityhash` module) do not take advantage +of SSE4.2. Instead, one can use the `cityhashcrc` module provided with this +package which exposes 128- and 256-bit CRC functions that do harness SSE4.2. +These functions are very fast, and beat `FarmHash128` on speed (FarmHash does +not include a 256-bit function). Since FarmHash is the intended successor of +CityHash, I would be careful before using the CityHash-CRC functions, however, +and would verify whether they provide sufficient randomness for your intended +application. ## Development ### Local workflow -For those who want to contribute, here is a quick start using some makefile -commands: +For those wanting to contribute, here is a quick start using Make commands: ``` bash git clone https://github.com/escherba/python-cityhash.git @@ -291,7 +298,7 @@ make cpp-test # run C++ tests make shell # enter IPython shell ``` -To find out which Make targets are available, type: +To find out which Make targets are available, enter: ``` bash make help @@ -299,10 +306,11 @@ make help ### Distribution -The wheels are built using [cibuildwheel](https://cibuildwheel.readthedocs.io/) -and are distributed to PyPI using GitHub actions. The wheels contain compiled -binaries and are available for the following platforms: windows-amd64, -ubuntu-x86, linux-x86\_64, linux-aarch64, and macosx-x86\_64. +The package wheels are built using +[cibuildwheel](https://cibuildwheel.readthedocs.io/) and are distributed to +PyPI using GitHub actions. The wheels contain compiled binaries and are +available for the following platforms: windows-amd64, ubuntu-x86, +linux-x86\_64, linux-aarch64, and macosx-x86\_64. ## See Also @@ -314,7 +322,7 @@ see [MetroHash](https://github.com/escherba/python-metrohash), ## Authors The original CityHash Python bindings are due to Alexander \[Amper\] Marshalov. -These were rewritten in Cython by Eugene Scherba, who also added the FarmHash +They were rewritten in Cython by Eugene Scherba, who also added the FarmHash bindings. The CityHash and FarmHash algorithms and their C++ implementation are by Google. @@ -335,24 +343,28 @@ Python wrapper for [FarmHash](https://github.com/google/farmhash) and [CityHash](https://github.com/google/cityhash), a family of fast non-cryptographic hash functions. -[](https://github.com/escherba/python-cityhash/actions/workflows/build.yml) -[](https://pypi.python.org/pypi/cityhash) +[](https://github.com/escherba/python-cityhash/actions/workflows/build.yml) +[](https://pypi.python.org/pypi/cityhash) +[](https://anaconda.org/conda-forge/python-cityhash) [](https://pypistats.org/packages/cityhash) [](https://opensource.org/licenses/mit-license) -[](https://pypi.python.org/pypi/cityhash) +[](https://pypi.python.org/pypi/cityhash) ## Getting Started -This simplest way to use this package is to install it from PyPI: +To install from PyPI: ``` bash pip install cityhash ``` -This package exposes Python APIs for CityHash and FarmHash under `cityhash` and +To install in a Conda environment: + +``` bash +conda install -c conda-forge python-cityhash +``` + +The package exposes Python APIs for CityHash and FarmHash under `cityhash` and `farmhash` namespaces, respectively. Each provides 32-, 64- and 128-bit implementations. @@ -375,7 +387,7 @@ Usage example for FarmHash: ### Hardware-independent fingerprints -Fingerprints are seedless hashes which are guaranteed to be hardware- and +Fingerprints are seedless hashes that are guaranteed to be hardware- and platform-independent. This can be useful for networking applications which require persisting hashed values. @@ -389,21 +401,21 @@ require persisting hashed values. ### Incremental hashing CityHash and FarmHash do not support incremental hashing and thus are not ideal -for hashing of streams. If you require incremental hashing feature, use +for hashing of character streams. If you require incremental hashing, consider +another hashing library, such as [MetroHash](https://github.com/escherba/python-metrohash) or -[xxHash](https://github.com/ifduyue/python-xxhash) instead, which do support -it. +[xxHash](https://github.com/ifduyue/python-xxhash). ### Fast hashing of NumPy arrays -The Python [Buffer Protocol](https://docs.python.org/3/c-api/buffer.html) -allows Python objects to expose their data as raw byte arrays to other objects, -for fast access without copying to a separate location in memory. Among others, -NumPy is a major framework that supports this protocol. +The [Buffer Protocol](https://docs.python.org/3/c-api/buffer.html) allows +Python objects to expose their data as raw byte arrays for fast access without +having to copy to a separate location in memory. NumPy is one well-known +library that extensively uses this protocol. -All hashing functions in this packege will read byte arrays from objects that -expose them via the buffer protocol. Here is an example showing hashing of a 4D -NumPy array: +All hashing functions in this package will read byte arrays from objects that +expose them via the buffer protocol. Here is an example showing hashing of a +four-dimensional NumPy array: ``` python >>> import numpy as np @@ -414,30 +426,29 @@ NumPy array: ``` -The arrays need to be contiguous for this to work. To convert a non-contiguous -array, use NumPy's `ascontiguousarray()` function. +The NumPy arrays need to be contiguous for this to work. To convert a +non-contiguous array, use NumPy's `ascontiguousarray()` function. ## SSE4.2 support -For x86-64 platforms, the PyPi repository for this package includes wheels -compiled with SSE4.2 support. The 32- and 64-bit FarmHash variants -significantly benefit from SSE4.2 instructions. The 128-bit version, -unfortunately, does not exhibit speed up after compiling with SSE4.2 support. +For x86-64 platforms, the PyPI repository for this package includes wheels +compiled with SSE4.2 support. The 32- and 64-bit (but not the 128-bit) +variants of FarmHash significantly benefit from SSE4.2 instructions. -The vanilla CityHash fucntions (under `cityhash` module) do not take advantage -of SSE4.2. Instead, the `cityhashcrc` module provided with this package exposes -128- and 256-bit CRC functions which do harness SSE4.2. These functions are -very fast, and beat `FarmHash128` on speed (FarmHash does not include a 256-bit -function). Since FarmHash is the intended successor of CityHash, I would be -careful before using the CityHash-CRC functions, however, and would verify -whether they provide sufficient randomness for your intended application. +The vanilla CityHash functions (under `cityhash` module) do not take advantage +of SSE4.2. Instead, one can use the `cityhashcrc` module provided with this +package which exposes 128- and 256-bit CRC functions that do harness SSE4.2. +These functions are very fast, and beat `FarmHash128` on speed (FarmHash does +not include a 256-bit function). Since FarmHash is the intended successor of +CityHash, I would be careful before using the CityHash-CRC functions, however, +and would verify whether they provide sufficient randomness for your intended +application. ## Development ### Local workflow -For those who want to contribute, here is a quick start using some makefile -commands: +For those wanting to contribute, here is a quick start using Make commands: ``` bash git clone https://github.com/escherba/python-cityhash.git @@ -448,7 +459,7 @@ make cpp-test # run C++ tests make shell # enter IPython shell ``` -To find out which Make targets are available, type: +To find out which Make targets are available, enter: ``` bash make help @@ -456,10 +467,11 @@ make help ### Distribution -The wheels are built using [cibuildwheel](https://cibuildwheel.readthedocs.io/) -and are distributed to PyPI using GitHub actions. The wheels contain compiled -binaries and are available for the following platforms: windows-amd64, -ubuntu-x86, linux-x86\_64, linux-aarch64, and macosx-x86\_64. +The package wheels are built using +[cibuildwheel](https://cibuildwheel.readthedocs.io/) and are distributed to +PyPI using GitHub actions. The wheels contain compiled binaries and are +available for the following platforms: windows-amd64, ubuntu-x86, +linux-x86\_64, linux-aarch64, and macosx-x86\_64. ## See Also @@ -471,7 +483,7 @@ see [MetroHash](https://github.com/escherba/python-metrohash), ## Authors The original CityHash Python bindings are due to Alexander \[Amper\] Marshalov. -These were rewritten in Cython by Eugene Scherba, who also added the FarmHash +They were rewritten in Cython by Eugene Scherba, who also added the FarmHash bindings. The CityHash and FarmHash algorithms and their C++ implementation are by Google. @@ -483,7 +495,7 @@ LICENSE file for details. %prep -%autosetup -n cityhash-0.4.6 +%autosetup -n cityhash-0.4.7 %build %py3_build @@ -523,5 +535,5 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog -* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.4.6-1 +* Sun Apr 23 2023 Python_Bot <Python_Bot@openeuler.org> - 0.4.7-1 - Package Spec generated |
