-
Notifications
You must be signed in to change notification settings - Fork 18
/
setup.py
66 lines (52 loc) · 1.97 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
desc = """\
Python Image Displacement Identification
========================================
This module supports the identification of disploacement from image date
For the showcase see: `github.com/ladisk/pyIDI <https://github.com/ladisk/pyIDI/blob/master/Showcase.ipynb>`_
"""
import os
import re
from setuptools import setup
regexp = re.compile(r'.*__version__ = [\'\"](.*?)[\'\"]', re.S)
base_path = os.path.dirname(__file__)
init_file = os.path.join(base_path, 'pyidi', '__init__.py')
with open(init_file, 'r') as f:
module_content = f.read()
match = regexp.match(module_content)
if match:
version = match.group(1)
else:
raise RuntimeError(
'Cannot find __version__ in {}'.format(init_file))
with open(os.path.join(base_path, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
# readme = """
# pyidi
# =====
# Image-based Displacement Identification (IDI) implementation in python.
# The documentation for this repository is accessible `here <https://pyidi.readthedocs.io/en/latest/index.html>`_.
# """
def parse_requirements(filename):
''' Load requirements from a pip requirements file '''
with open(filename, 'r') as fd:
lines = []
for line in fd:
line.strip()
if line and not line.startswith("#"):
lines.append(line)
return lines
requirements = parse_requirements('requirements.txt')
setup(name='pyidi',
version=version,
author='Klemen Zaletelj, Domen Gorjup, Janko Slavič',
author_email='[email protected], [email protected]',
description='Python Image Displacement Identification.',
url='https://github.com/ladisk/pyidi',
packages=['pyidi', 'pyidi.methods'],
long_description=long_description,
long_description_content_type='text/markdown',
install_requires=requirements,
keywords='computer vision dic gradient-based image identification',
)