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
|
#!/usr/bin/python
import os, re
from setuptools import setup
def relative(filename):
here = os.path.dirname('__file__')
return os.path.join(here, filename)
def read(filename):
f = open(relative(filename))
try:
return f.read()
finally:
f.close()
def get_version():
r = re.compile(r'''^__version__ = (["'])(.+)\1$''')
for line in read('imgdiff.py').splitlines():
m = r.match(line)
if m:
return m.group(2)
def get_description():
readme = read('README.rst')
readme = readme.replace('.. figure:: ',
'.. figure:: https://pythonhosted.org/imgdiff/')
changelog = read('CHANGES.rst')
return readme + '\n\n\n' + changelog
setup(name='imgdiff',
version=get_version(),
author='Marius Gedminas',
author_email='marius@gedmin.as',
url='https://github.com/mgedmin/imgdiff',
license='MIT',
description='Present two images side-by-side for visual comparison',
long_description=get_description(),
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Multimedia :: Graphics',
],
py_modules=['imgdiff'],
test_suite='imgdiff.test_suite',
zip_safe=False,
install_requires=['Pillow'],
entry_points="""
[console_scripts]
imgdiff = imgdiff:main
""")
|