Skip to content

Commit 0275014

Browse files
authored
describe exception types in docstrings (#10)
1 parent c6d18bc commit 0275014

4 files changed

Lines changed: 230 additions & 213 deletions

File tree

pip-freeze.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ipdb==0.13.9
1010
ipython==7.30.1
1111
jedi==0.18.1
1212
matplotlib-inline==0.1.3
13-
-e git+https://github.com/escherba/python-metrohash@73e7ff6160a666ec7075a7f02d1a14031a1385c3#egg=metrohash
13+
-e git+https://github.com/escherba/python-metrohash@c6d18bcf22fa6e4a0bc8a98fb8f94f2c60d4f12d#egg=metrohash
1414
numpy==1.21.5
1515
packaging==21.3
1616
parso==0.8.3

setup.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3+
import warnings
34
from os.path import join, dirname
45
from setuptools import setup
56
from setuptools.extension import Extension
67
from setuptools.dist import Distribution
78

89
try:
910
from cpuinfo import get_cpu_info
10-
have_sse42 = 'sse4.2' in get_cpu_info()['flags']
11-
except Exception:
12-
have_sse42 = False
11+
cpu_info = get_cpu_info()
12+
HAVE_SSE42 = 'sse4_2' in cpu_info['flags']
13+
except Exception as exc:
14+
HAVE_SSE42 = False
1315

1416
try:
1517
from Cython.Distutils import build_ext
@@ -33,8 +35,11 @@ def is_pure(self):
3335
-Wno-unused-function
3436
""".split()
3537

36-
if have_sse42:
38+
if HAVE_SSE42:
39+
warnings.warn("Compiling with SSE4.2 enabled")
3740
CXXFLAGS.append('-msse4.2')
41+
else:
42+
warnings.warn("compiling without SSE4.2 support")
3843

3944

4045
INCLUDE_DIRS = ['include']
@@ -77,7 +82,7 @@ def is_pure(self):
7782
)
7883

7984

80-
VERSION = '0.1.0.post4'
85+
VERSION = '0.1.0.post5'
8186
URL = "https://github.com/escherba/python-metrohash"
8287

8388

0 commit comments

Comments
 (0)