Skip to content

Commit c6d18bc

Browse files
authored
Merge pull request #9 from escherba/es/misc2
update setup.py and links
2 parents 73e7ff6 + dc83a75 commit c6d18bc

9 files changed

Lines changed: 268 additions & 239 deletions

File tree

README.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ A Python wrapper around `MetroHash <https://github.com/jandrewrogers/MetroHash>`
1515
:target: https://circleci.com/gh/escherba/python-metrohash
1616
:alt: Tests Status
1717

18+
.. image:: https://img.shields.io/pypi/pyversions/cityhash.svg
19+
:target: https://pypi.python.org/pypi/cityhash
20+
:alt: Supported Python versions
21+
22+
.. image:: https://img.shields.io/pypi/l/cityhash.svg
23+
:target: https://pypi.python.org/pypi/cityhash
24+
:alt: License
25+
1826
Getting Started
1927
---------------
2028

@@ -31,8 +39,8 @@ Example Usage below).
3139
Usage Examples
3240
--------------
3341

34-
Simple Hashing
35-
~~~~~~~~~~~~~~
42+
Stateless Hashing
43+
~~~~~~~~~~~~~~~~~
3644

3745
This package provides Python interfaces to 64- and 128-bit implementations of
3846
MetroHash algorithm. For stateless hashing, it exports ``metrohash64`` and
@@ -117,7 +125,7 @@ See Also
117125
--------
118126
For other fast non-cryptographic hashing implementations available as Python
119127
extensions, see `CityHash <https://github.com/escherba/python-cityhash>`__ and
120-
`xxh <https://github.com/lebedov/xxh>`__.
128+
`MurmurHash <https://github.com/hajimes/mmh3>`__.
121129

122130
Authors
123131
-------
@@ -128,4 +136,4 @@ License
128136
-------
129137
This software is licensed under the `Apache License, Version 2.0
130138
<https://opensource.org/licenses/Apache-2.0>`_. See the included LICENSE
131-
file for more information.
139+
file for details.

pip-freeze.txt

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
1-
attrs==21.3.0
1+
attrs==21.4.0
2+
backcall==0.2.0
23
Cython==0.29.26
4+
decorator==5.1.0
35
distlib==0.3.4
46
filelock==3.4.2
57
importlib-metadata==4.10.0
68
iniconfig==1.1.1
7-
-e git+https://github.com/escherba/python-metrohash@d7ab131bff70108ef26744882be3c624fb5bff9b#egg=metrohash
9+
ipdb==0.13.9
10+
ipython==7.30.1
11+
jedi==0.18.1
12+
matplotlib-inline==0.1.3
13+
-e git+https://github.com/escherba/python-metrohash@73e7ff6160a666ec7075a7f02d1a14031a1385c3#egg=metrohash
814
numpy==1.21.5
915
packaging==21.3
16+
parso==0.8.3
17+
pexpect==4.8.0
18+
pickleshare==0.7.5
1019
platformdirs==2.4.1
1120
pluggy==1.0.0
21+
prompt-toolkit==3.0.24
22+
ptyprocess==0.7.0
1223
py==1.11.0
24+
Pygments==2.10.0
1325
pyparsing==3.0.6
1426
pytest==6.2.5
1527
six==1.16.0
1628
toml==0.10.2
29+
traitlets==5.1.1
1730
typing_extensions==4.0.1
18-
virtualenv==20.11.1
31+
virtualenv==20.11.2
32+
wcwidth==0.2.5
1933
zipp==3.6.0

python.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ release: env build_ext ## upload package to PyPI
3939
.PHONY: shell
4040
shell: build_ext ## open Python shell within the virtualenv
4141
@echo "Using $(PYVERSION)"
42-
$(PYENV) python
42+
$(PYENV) ipython
4343

4444
.PHONY: build_ext
4545
build_ext: $(EXTENSION) ## build C extension(s)

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
cython
2+
ipdb
3+
ipython
24
numpy
35
pytest
46
setuptools

setup.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
13
from os.path import join, dirname
24
from setuptools import setup
35
from setuptools.extension import Extension
46
from setuptools.dist import Distribution
57

68
try:
79
from cpuinfo import get_cpu_info
8-
cpu_info = get_cpu_info()
9-
have_sse42 = 'sse4.2' in cpu_info['flags']
10+
have_sse42 = 'sse4.2' in get_cpu_info()['flags']
1011
except Exception:
1112
have_sse42 = False
1213

@@ -15,8 +16,6 @@
1516
except ImportError:
1617
build_ext = None
1718

18-
USE_CYTHON = build_ext is not None
19-
2019

2120
class BinaryDistribution(Distribution):
2221
"""
@@ -55,7 +54,8 @@ def is_pure(self):
5554
CMDCLASS = {}
5655
EXT_MODULES = []
5756

58-
if USE_CYTHON:
57+
if build_ext is not None:
58+
CMDCLASS['build_ext'] = build_ext
5959
EXT_MODULES.append(
6060
Extension(
6161
"metrohash",
@@ -65,7 +65,6 @@ def is_pure(self):
6565
extra_compile_args=CXXFLAGS,
6666
include_dirs=INCLUDE_DIRS)
6767
)
68-
CMDCLASS['build_ext'] = build_ext
6968
else:
7069
EXT_MODULES.append(
7170
Extension(
@@ -78,7 +77,7 @@ def is_pure(self):
7877
)
7978

8079

81-
VERSION = '0.1.0.post3'
80+
VERSION = '0.1.0.post4'
8281
URL = "https://github.com/escherba/python-metrohash"
8382

8483

@@ -110,7 +109,7 @@ def get_long_description():
110109
ext_modules=EXT_MODULES,
111110
keywords=['hash', 'hashing', 'metrohash', 'cityhash'],
112111
classifiers=[
113-
'Development Status :: 4 - Beta',
112+
'Development Status :: 5 - Production/Stable',
114113
'Intended Audience :: Developers',
115114
'Intended Audience :: Science/Research',
116115
'License :: OSI Approved :: Apache Software License',
@@ -124,14 +123,12 @@ def get_long_description():
124123
'Programming Language :: Python :: 3.7',
125124
'Programming Language :: Python :: 3.8',
126125
'Programming Language :: Python :: 3.9',
127-
'Topic :: Internet',
128-
'Topic :: Scientific/Engineering',
129126
'Topic :: Scientific/Engineering :: Information Analysis',
130-
'Topic :: Software Development',
131-
'Topic :: Software Development :: Libraries :: Python Modules',
127+
'Topic :: Software Development :: Libraries',
132128
'Topic :: Utilities'
133129
],
134130
long_description=get_long_description(),
131+
long_description_content_type='text/x-rst',
135132
tests_require=['pytest'],
136133
distclass=BinaryDistribution,
137134
)

0 commit comments

Comments
 (0)