spookyhash 2.1.0__tar.gz → 2.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {spookyhash-2.1.0 → spookyhash-2.1.2}/LICENSE +21 -21
  2. {spookyhash-2.1.0 → spookyhash-2.1.2}/MANIFEST.in +1 -1
  3. {spookyhash-2.1.0/spookyhash.egg-info → spookyhash-2.1.2}/PKG-INFO +123 -110
  4. {spookyhash-2.1.0 → spookyhash-2.1.2}/README.md +89 -89
  5. spookyhash-2.1.2/pyproject.toml +56 -0
  6. {spookyhash-2.1.0 → spookyhash-2.1.2}/setup.cfg +4 -4
  7. spookyhash-2.1.2/setup.py +23 -0
  8. spookyhash-2.1.0/spookyhash.py → spookyhash-2.1.2/spookyhash/__init__.py +243 -240
  9. spookyhash-2.1.2/spookyhash/_spookyhash.pyi +25 -0
  10. spookyhash-2.1.2/spookyhash/py.typed +0 -0
  11. {spookyhash-2.1.0 → spookyhash-2.1.2/spookyhash.egg-info}/PKG-INFO +123 -110
  12. {spookyhash-2.1.0 → spookyhash-2.1.2}/spookyhash.egg-info/SOURCES.txt +7 -3
  13. spookyhash-2.1.2/spookyhash.egg-info/requires.txt +11 -0
  14. spookyhash-2.1.2/spookyhash.egg-info/top_level.txt +1 -0
  15. {spookyhash-2.1.0 → spookyhash-2.1.2}/src/SpookyV2.cpp +351 -351
  16. {spookyhash-2.1.0 → spookyhash-2.1.2}/src/SpookyV2.h +299 -299
  17. {spookyhash-2.1.0 → spookyhash-2.1.2}/src/SpookyV2.pxd +12 -12
  18. {spookyhash-2.1.0 → spookyhash-2.1.2}/src/spookyhash.pyx +106 -99
  19. spookyhash-2.1.2/tests/test_readme.py +50 -0
  20. spookyhash-2.1.2/tests/test_release.py +25 -0
  21. spookyhash-2.1.2/tests/test_spooky_hash.py +363 -0
  22. spookyhash-2.1.0/pyproject.toml +0 -37
  23. spookyhash-2.1.0/setup.py +0 -19
  24. spookyhash-2.1.0/spookyhash.egg-info/requires.txt +0 -4
  25. spookyhash-2.1.0/spookyhash.egg-info/top_level.txt +0 -2
  26. spookyhash-2.1.0/src/spookyhash.cpp +0 -24569
  27. {spookyhash-2.1.0 → spookyhash-2.1.2}/spookyhash.egg-info/dependency_links.txt +0 -0
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 Alen Buhanec
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Alen Buhanec
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1 +1 @@
1
- include src/*.pyx src/*.pxd src/*.cpp src/*.h
1
+ include src/*.pyx src/*.pxd src/*.cpp src/*.h
@@ -1,110 +1,123 @@
1
- Metadata-Version: 2.1
2
- Name: spookyhash
3
- Version: 2.1.0
4
- Summary: A Python wrapper for SpookyHash version 2
5
- Author-email: Alen Buhaec <alen.buhnaec@gmail.com>
6
- License: MIT
7
- Keywords: SpookyHash,hashlib
8
- Classifier: Topic :: Software Development :: Libraries
9
- Classifier: Development Status :: 5 - Production/Stable
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.7
12
- Classifier: Programming Language :: Python :: 3.8
13
- Classifier: Programming Language :: Python :: 3.9
14
- Classifier: Programming Language :: Python :: 3.10
15
- Classifier: License :: OSI Approved :: MIT License
16
- Classifier: Operating System :: OS Independent
17
- Classifier: Typing :: Typed
18
- Description-Content-Type: text/markdown
19
- Provides-Extra: test
20
- License-File: LICENSE
21
-
22
- # spookyhash [<img src="https://img.shields.io/gitlab/pipeline/alen/spookyhash/main?gitlab_url=https%3A%2F%2Fgitlab.comfi.dev%2F&label=Gitlab%20CI&style=flat-square" align="right">](https://gitlab.comfi.dev/alen/spookyhash) [<img src="https://img.shields.io/travis/buhanec/spookyhash/main.svg?label=Travis+CI&style=flat-square" align="right">](https://travis-ci.org/buhanec/spookyhash) [<img src="https://img.shields.io/azure-devops/build/buhanec/aa771e37-5a75-4d92-8d99-d27975af994e/2/main?label=Azure%20DevOps&style=flat-square" align="right">](https://dev.azure.com/buhanec/spookyhash/_build)
23
-
24
- A Python wrapper of Bob Jenkins' [SpookyHash version 2](http://burtleburtle.net/bob/hash/spooky.html). Offers 32- 64- and 128-bit oneshot and incremental hashes.
25
-
26
- # License
27
-
28
- > Licensed under the MIT license. See the LICENSE file in the repository root for more details.
29
-
30
- # Usage
31
-
32
- ## Installation
33
-
34
- Available through [spookyhash - PyPI](https://pypi.org/project/spookyhash/) using `pip install spookyhash`.
35
-
36
- ## Oneshot Hashes
37
-
38
- ```python
39
- >>> import spookyhash
40
-
41
- >>> spookyhash.hash32(b'hello world')
42
- 2617184861
43
- >>> spookyhash.hash32(b'hello world', seed=0x12345678)
44
- 3380090220
45
-
46
- >>> spookyhash.hash64(b'hello world')
47
- 14865987102431973981
48
- >>> spookyhash.hash64(b'hello world', seed=123)
49
- 5719863273689036421
50
-
51
- >>> spookyhash.hash128(b'hello world')
52
- 185933735475381961281710998418114941533
53
- >>> spookyhash.hash128(b'hello world', seed1=123_000, seed2=456_000)
54
- 144121310386202441278894605216246194925
55
-
56
- >>> # For a more comparable result to other libraries
57
- >>> spookyhash.hash128_pair(b'hello world')
58
- (14865987102431973981, 10079487997037711397)
59
- >>> spookyhash.hash128_pair(b'hello world', seed1=123_000, seed2=456_000)
60
- (12678109464562819821, 7812831891108919044)
61
- ```
62
-
63
- ## Incremental Hashes
64
-
65
- ```python
66
- >>> import spookyhash
67
-
68
- >>> sh = spookyhash.Hash32()
69
- >>> sh.update(b'hello')
70
- >>> sh.update(b' ')
71
- >>> sh.update(b'world')
72
- >>> sh.final()
73
- 2617184861
74
- >>> sh.hexdigest()
75
- '5d12ff9b'
76
-
77
- >>> spookyhash.Hash64(b'hello ', seed=123).update(b'world').final()
78
- 5719863273689036421
79
-
80
- >>> spookyhash.Hash64(b'hello ', seed=123).update(b'world').hexdigest()
81
- '85b609a05709614f'
82
-
83
- >>> sh = spookyhash.Hash128(seed1=123_000, seed2=456_000)
84
- >>> sh.update(b'hello world')
85
- >>> sh.final()
86
- 144121310386202441278894605216246194925
87
- >>> sh.final_pair()
88
- (12678109464562819821, 7812831891108919044)
89
- >>> sh.hexdigest()
90
- 'ede2c8f262b1f1af04f763f735c16c6c'
91
- ```
92
-
93
- ## `memoryview` Support
94
-
95
- Includes `memoryview` compatible types, such as NumPy arrays.
96
-
97
- ```python
98
- >>> import spookyhash
99
- >>> import numpy as np
100
-
101
- >>> spookyhash.Hash64(np.arange(100)).hexdigest()
102
- '43ab5363ad362c74'
103
-
104
- >>> spookyhash.Hash64(memoryview(b'hello world')).hexdigest()
105
- '5d12ff9b81984ece'
106
- ```
107
-
108
- # Platform Independence
109
-
110
- If run on a big-endian system, the code would produce different hashes, but of equal quality.
1
+ Metadata-Version: 2.4
2
+ Name: spookyhash
3
+ Version: 2.1.2
4
+ Summary: A Python wrapper for SpookyHash version 2
5
+ Author-email: Alen Buhanec <alen.buhanec@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/buhanec/spookyhash
8
+ Project-URL: Repository, https://github.com/buhanec/spookyhash
9
+ Project-URL: Issues, https://github.com/buhanec/spookyhash/issues
10
+ Keywords: SpookyHash,hashlib
11
+ Classifier: Topic :: Software Development :: Libraries
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Programming Language :: Python :: 3.15
21
+ Classifier: Operating System :: OS Independent
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.9
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Provides-Extra: typing
27
+ Requires-Dist: mypy>=1.18; extra == "typing"
28
+ Requires-Dist: typing-extensions; extra == "typing"
29
+ Provides-Extra: test
30
+ Requires-Dist: pytest; extra == "test"
31
+ Requires-Dist: hypothesis; extra == "test"
32
+ Requires-Dist: numpy; (python_version >= "3.11" or sys_platform != "win32" or platform_machine != "ARM64") and extra == "test"
33
+ Dynamic: license-file
34
+
35
+ # spookyhash
36
+
37
+ A Python wrapper of Bob Jenkins' [SpookyHash version 2](http://burtleburtle.net/bob/hash/spooky.html). Offers 32- 64- and 128-bit oneshot and incremental hashes.
38
+
39
+ # License
40
+
41
+ > Licensed under the MIT license. See the LICENSE file in the repository root for more details.
42
+
43
+ # Usage
44
+
45
+ ## Installation
46
+
47
+ Available through [spookyhash - PyPI](https://pypi.org/project/spookyhash/) using `pip install spookyhash`.
48
+
49
+ ## Oneshot Hashes
50
+
51
+ ```python
52
+ >>> import spookyhash
53
+
54
+ >>> spookyhash.hash32(b'hello world')
55
+ 2617184861
56
+ >>> spookyhash.hash32(b'hello world', seed=0x12345678)
57
+ 3380090220
58
+
59
+ >>> spookyhash.hash64(b'hello world')
60
+ 14865987102431973981
61
+ >>> spookyhash.hash64(b'hello world', seed=123)
62
+ 5719863273689036421
63
+
64
+ >>> spookyhash.hash128(b'hello world')
65
+ 185933735475381961281710998418114941533
66
+ >>> spookyhash.hash128(b'hello world', seed1=123_000, seed2=456_000)
67
+ 144121310386202441278894605216246194925
68
+
69
+ >>> # For a more comparable result to other libraries
70
+ >>> spookyhash.hash128_pair(b'hello world')
71
+ (14865987102431973981, 10079487997037711397)
72
+ >>> spookyhash.hash128_pair(b'hello world', seed1=123_000, seed2=456_000)
73
+ (12678109464562819821, 7812831891108919044)
74
+ ```
75
+
76
+ ## Incremental Hashes
77
+
78
+ ```python
79
+ >>> import spookyhash
80
+
81
+ >>> sh = spookyhash.Hash32()
82
+ >>> sh.update(b'hello')
83
+ >>> sh.update(b' ')
84
+ >>> sh.update(b'world')
85
+ >>> sh.final()
86
+ 2617184861
87
+ >>> sh.hexdigest()
88
+ '5d12ff9b'
89
+
90
+ >>> spookyhash.Hash64(b'hello ', seed=123).update(b'world').final()
91
+ 5719863273689036421
92
+
93
+ >>> spookyhash.Hash64(b'hello ', seed=123).update(b'world').hexdigest()
94
+ '85b609a05709614f'
95
+
96
+ >>> sh = spookyhash.Hash128(seed1=123_000, seed2=456_000)
97
+ >>> sh.update(b'hello world')
98
+ >>> sh.final()
99
+ 144121310386202441278894605216246194925
100
+ >>> sh.final_pair()
101
+ (12678109464562819821, 7812831891108919044)
102
+ >>> sh.hexdigest()
103
+ 'ede2c8f262b1f1af04f763f735c16c6c'
104
+ ```
105
+
106
+ ## `memoryview` Support
107
+
108
+ Includes `memoryview` compatible types, such as NumPy arrays.
109
+
110
+ ```python
111
+ >>> import spookyhash
112
+ >>> import numpy as np
113
+
114
+ >>> spookyhash.Hash64(np.arange(100, dtype=np.int32)).hexdigest()
115
+ '43ab5363ad362c74'
116
+
117
+ >>> spookyhash.Hash64(memoryview(b'hello world')).hexdigest()
118
+ '5d12ff9b81984ece'
119
+ ```
120
+
121
+ # Platform Independence
122
+
123
+ If run on a big-endian system, the code would produce different hashes, but of equal quality.
@@ -1,89 +1,89 @@
1
- # spookyhash [<img src="https://img.shields.io/gitlab/pipeline/alen/spookyhash/main?gitlab_url=https%3A%2F%2Fgitlab.comfi.dev%2F&label=Gitlab%20CI&style=flat-square" align="right">](https://gitlab.comfi.dev/alen/spookyhash) [<img src="https://img.shields.io/travis/buhanec/spookyhash/main.svg?label=Travis+CI&style=flat-square" align="right">](https://travis-ci.org/buhanec/spookyhash) [<img src="https://img.shields.io/azure-devops/build/buhanec/aa771e37-5a75-4d92-8d99-d27975af994e/2/main?label=Azure%20DevOps&style=flat-square" align="right">](https://dev.azure.com/buhanec/spookyhash/_build)
2
-
3
- A Python wrapper of Bob Jenkins' [SpookyHash version 2](http://burtleburtle.net/bob/hash/spooky.html). Offers 32- 64- and 128-bit oneshot and incremental hashes.
4
-
5
- # License
6
-
7
- > Licensed under the MIT license. See the LICENSE file in the repository root for more details.
8
-
9
- # Usage
10
-
11
- ## Installation
12
-
13
- Available through [spookyhash - PyPI](https://pypi.org/project/spookyhash/) using `pip install spookyhash`.
14
-
15
- ## Oneshot Hashes
16
-
17
- ```python
18
- >>> import spookyhash
19
-
20
- >>> spookyhash.hash32(b'hello world')
21
- 2617184861
22
- >>> spookyhash.hash32(b'hello world', seed=0x12345678)
23
- 3380090220
24
-
25
- >>> spookyhash.hash64(b'hello world')
26
- 14865987102431973981
27
- >>> spookyhash.hash64(b'hello world', seed=123)
28
- 5719863273689036421
29
-
30
- >>> spookyhash.hash128(b'hello world')
31
- 185933735475381961281710998418114941533
32
- >>> spookyhash.hash128(b'hello world', seed1=123_000, seed2=456_000)
33
- 144121310386202441278894605216246194925
34
-
35
- >>> # For a more comparable result to other libraries
36
- >>> spookyhash.hash128_pair(b'hello world')
37
- (14865987102431973981, 10079487997037711397)
38
- >>> spookyhash.hash128_pair(b'hello world', seed1=123_000, seed2=456_000)
39
- (12678109464562819821, 7812831891108919044)
40
- ```
41
-
42
- ## Incremental Hashes
43
-
44
- ```python
45
- >>> import spookyhash
46
-
47
- >>> sh = spookyhash.Hash32()
48
- >>> sh.update(b'hello')
49
- >>> sh.update(b' ')
50
- >>> sh.update(b'world')
51
- >>> sh.final()
52
- 2617184861
53
- >>> sh.hexdigest()
54
- '5d12ff9b'
55
-
56
- >>> spookyhash.Hash64(b'hello ', seed=123).update(b'world').final()
57
- 5719863273689036421
58
-
59
- >>> spookyhash.Hash64(b'hello ', seed=123).update(b'world').hexdigest()
60
- '85b609a05709614f'
61
-
62
- >>> sh = spookyhash.Hash128(seed1=123_000, seed2=456_000)
63
- >>> sh.update(b'hello world')
64
- >>> sh.final()
65
- 144121310386202441278894605216246194925
66
- >>> sh.final_pair()
67
- (12678109464562819821, 7812831891108919044)
68
- >>> sh.hexdigest()
69
- 'ede2c8f262b1f1af04f763f735c16c6c'
70
- ```
71
-
72
- ## `memoryview` Support
73
-
74
- Includes `memoryview` compatible types, such as NumPy arrays.
75
-
76
- ```python
77
- >>> import spookyhash
78
- >>> import numpy as np
79
-
80
- >>> spookyhash.Hash64(np.arange(100)).hexdigest()
81
- '43ab5363ad362c74'
82
-
83
- >>> spookyhash.Hash64(memoryview(b'hello world')).hexdigest()
84
- '5d12ff9b81984ece'
85
- ```
86
-
87
- # Platform Independence
88
-
89
- If run on a big-endian system, the code would produce different hashes, but of equal quality.
1
+ # spookyhash
2
+
3
+ A Python wrapper of Bob Jenkins' [SpookyHash version 2](http://burtleburtle.net/bob/hash/spooky.html). Offers 32- 64- and 128-bit oneshot and incremental hashes.
4
+
5
+ # License
6
+
7
+ > Licensed under the MIT license. See the LICENSE file in the repository root for more details.
8
+
9
+ # Usage
10
+
11
+ ## Installation
12
+
13
+ Available through [spookyhash - PyPI](https://pypi.org/project/spookyhash/) using `pip install spookyhash`.
14
+
15
+ ## Oneshot Hashes
16
+
17
+ ```python
18
+ >>> import spookyhash
19
+
20
+ >>> spookyhash.hash32(b'hello world')
21
+ 2617184861
22
+ >>> spookyhash.hash32(b'hello world', seed=0x12345678)
23
+ 3380090220
24
+
25
+ >>> spookyhash.hash64(b'hello world')
26
+ 14865987102431973981
27
+ >>> spookyhash.hash64(b'hello world', seed=123)
28
+ 5719863273689036421
29
+
30
+ >>> spookyhash.hash128(b'hello world')
31
+ 185933735475381961281710998418114941533
32
+ >>> spookyhash.hash128(b'hello world', seed1=123_000, seed2=456_000)
33
+ 144121310386202441278894605216246194925
34
+
35
+ >>> # For a more comparable result to other libraries
36
+ >>> spookyhash.hash128_pair(b'hello world')
37
+ (14865987102431973981, 10079487997037711397)
38
+ >>> spookyhash.hash128_pair(b'hello world', seed1=123_000, seed2=456_000)
39
+ (12678109464562819821, 7812831891108919044)
40
+ ```
41
+
42
+ ## Incremental Hashes
43
+
44
+ ```python
45
+ >>> import spookyhash
46
+
47
+ >>> sh = spookyhash.Hash32()
48
+ >>> sh.update(b'hello')
49
+ >>> sh.update(b' ')
50
+ >>> sh.update(b'world')
51
+ >>> sh.final()
52
+ 2617184861
53
+ >>> sh.hexdigest()
54
+ '5d12ff9b'
55
+
56
+ >>> spookyhash.Hash64(b'hello ', seed=123).update(b'world').final()
57
+ 5719863273689036421
58
+
59
+ >>> spookyhash.Hash64(b'hello ', seed=123).update(b'world').hexdigest()
60
+ '85b609a05709614f'
61
+
62
+ >>> sh = spookyhash.Hash128(seed1=123_000, seed2=456_000)
63
+ >>> sh.update(b'hello world')
64
+ >>> sh.final()
65
+ 144121310386202441278894605216246194925
66
+ >>> sh.final_pair()
67
+ (12678109464562819821, 7812831891108919044)
68
+ >>> sh.hexdigest()
69
+ 'ede2c8f262b1f1af04f763f735c16c6c'
70
+ ```
71
+
72
+ ## `memoryview` Support
73
+
74
+ Includes `memoryview` compatible types, such as NumPy arrays.
75
+
76
+ ```python
77
+ >>> import spookyhash
78
+ >>> import numpy as np
79
+
80
+ >>> spookyhash.Hash64(np.arange(100, dtype=np.int32)).hexdigest()
81
+ '43ab5363ad362c74'
82
+
83
+ >>> spookyhash.Hash64(memoryview(b'hello world')).hexdigest()
84
+ '5d12ff9b81984ece'
85
+ ```
86
+
87
+ # Platform Independence
88
+
89
+ If run on a big-endian system, the code would produce different hashes, but of equal quality.
@@ -0,0 +1,56 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools>=77",
4
+ "cython>=3.1",
5
+ ]
6
+ build-backend = "setuptools.build_meta"
7
+
8
+ [project]
9
+ authors = [{name = "Alen Buhanec", email = "alen.buhanec@gmail.com"}]
10
+ name = "spookyhash"
11
+ description = "A Python wrapper for SpookyHash version 2"
12
+ readme = "README.md"
13
+ requires-python = ">=3.9"
14
+ keywords = ["SpookyHash", "hashlib"]
15
+ license = "MIT"
16
+ classifiers = [
17
+ "Topic :: Software Development :: Libraries",
18
+ "Development Status :: 5 - Production/Stable",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.9",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.13",
25
+ "Programming Language :: Python :: 3.14",
26
+ "Programming Language :: Python :: 3.15",
27
+ "Operating System :: OS Independent",
28
+ "Typing :: Typed",
29
+ ]
30
+ dynamic = ["version"]
31
+
32
+ [project.urls]
33
+ Homepage = "https://github.com/buhanec/spookyhash"
34
+ Repository = "https://github.com/buhanec/spookyhash"
35
+ Issues = "https://github.com/buhanec/spookyhash/issues"
36
+
37
+ [project.optional-dependencies]
38
+ typing = [
39
+ "mypy>=1.18",
40
+ "typing-extensions",
41
+ ]
42
+ test = [
43
+ "pytest",
44
+ "hypothesis",
45
+ # only publishes win_arm64 wheels for CPython 3.11+
46
+ "numpy; python_version >= '3.11' or sys_platform != 'win32' or platform_machine != 'ARM64'",
47
+ ]
48
+
49
+ [tool.setuptools]
50
+ packages = ["spookyhash"]
51
+
52
+ [tool.setuptools.package-data]
53
+ spookyhash = ["py.typed", "_spookyhash.pyi"]
54
+
55
+ [tool.setuptools.dynamic]
56
+ version = {attr = "spookyhash.__version__"}
@@ -1,4 +1,4 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,23 @@
1
+ from Cython.Build import cythonize
2
+ from setuptools import Extension, setup
3
+
4
+ setup(
5
+ ext_modules=cythonize(
6
+ [
7
+ Extension(
8
+ "spookyhash._spookyhash",
9
+ ["src/spookyhash.pyx", "src/SpookyV2.cpp"],
10
+ language="c++",
11
+ ),
12
+ ],
13
+ compiler_directives={
14
+ "cdivision": True,
15
+ "boundscheck": False,
16
+ "wraparound": False,
17
+ "embedsignature": True,
18
+ "language_level": 3,
19
+ "freethreading_compatible": True,
20
+ },
21
+ build_dir="build/cython",
22
+ ),
23
+ )