-
Notifications
You must be signed in to change notification settings - Fork 405
/
setup.py
102 lines (87 loc) · 2.66 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
"""
image_match is a simple package for finding approximate image matches from a
corpus. It is similar, for instance, to pHash <http://www.phash.org/>, but
includes a database backend that easily scales to billions of images and
supports sustained high rates of image insertion: up to 10,000 images/s on our
cluster!
Based on the paper An image signature for any kind of image, Goldberg et
al <http://www.cs.cmu.edu/~hcwong/Pdfs/icip02.ps>.
"""
import io
import os
import re
from setuptools import setup, find_packages
def read(*names, **kwargs):
with io.open(
os.path.join(os.path.dirname(__file__), *names),
encoding=kwargs.get('encoding', 'utf8')
) as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(
r'^__version__ = [\'"]([^\'"]*)[\'"]', version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError('Unable to find version string.')
tests_require = [
'coverage',
'pep8',
'pyflakes',
'pylint',
'pytest',
'pytest-cov',
'pytest-xdist',
]
dev_require = [
'ipdb',
'ipython',
]
docs_require = [
'recommonmark>=0.4.0',
'Sphinx>=1.3.5',
'sphinxcontrib-napoleon>=0.4.4',
'sphinx-rtd-theme>=0.1.9',
]
setup(
name='image_match',
version=find_version('image_match', '__init__.py'),
description='image_match is a simple package for finding approximate '\
'image matches from a corpus.',
long_description=__doc__,
url='https://github.com/ascribe/image-match/',
author='Ryan Henderson',
author_email='[email protected]',
license='Apache License 2.0',
zip_safe=True,
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Topic :: Database',
'Topic :: Database :: Database Engines/Servers',
'Topic :: Software Development',
'Natural Language :: English',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX :: Linux',
'Topic :: Multimedia :: Graphics',
],
packages=find_packages(),
setup_requires=[
'pytest-runner',
],
install_requires=[
'scikit-image>=0.14',
'elasticsearch>=7.0.0,<8.0.0',
'six>=1.11.0',
],
tests_require=tests_require,
extras_require={
'test': tests_require,
'dev': dev_require + tests_require + docs_require,
'docs': docs_require,
'extra': ['cairosvg>1,<2'],
},
)