Skip to content

Commit e54a3db

Browse files
committed
Define MTM version in a single place
1 parent 781bddf commit e54a3db

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

MTM/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
import pandas as pd
44
from skimage.feature import peak_local_max
55
from scipy.signal import find_peaks
6+
from .version import __version__
67

78
from .NMS import NMS
89

910
__all__ = ['NMS']
10-
__version__ = '1.5.3'
1111

1212
def _findLocalMax_(corrMap, score_threshold=0.6):
1313
'''

MTM/version.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Store the version here so:
2+
# 1) we don't load dependencies by storing it in __init__.py
3+
# 2) we can import it in setup.py for the same reason
4+
# 3) we can import it into your module module
5+
__version__ = '1.5.3post'

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
with open("README.md", "r") as fh:
44
long_description = fh.read()
55

6+
# Read version from MTM/version.py
7+
exec(open('MTM/version.py').read())
8+
9+
610
setuptools.setup(
711
name="Multi-Template-Matching",
8-
version="1.5.3",
12+
version=__version__,
913
author="Laurent Thomas",
1014
author_email="laurent132.thomas@laposte.net",
1115
description="Object-recognition in images using multiple templates",

0 commit comments

Comments
 (0)