Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit 9478b85

Browse files
use setuptools_scm for version management
1 parent 727839a commit 9478b85

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

sentinel_api/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
from .sentinel_api import SentinelDownloader
1+
from .sentinel_api import SentinelDownloader
2+
3+
from pkg_resources import get_distribution, DistributionNotFound
4+
try:
5+
__version__ = get_distribution(__name__).version
6+
except DistributionNotFound:
7+
# package is not installed
8+
pass

sentinel_api/sentinel_api.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
- Documentation
99
"""
1010

11-
__version__ = '0.5.1'
12-
1311
###########################################################
1412
# imports
1513
###########################################################

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
setup(name='sentinel_api',
44
packages=find_packages(),
55
include_package_data=True,
6-
version='0.5.2',
6+
setup_requires=['setuptools_scm'],
7+
use_scm_version=True,
78
description='ESA Sentinel Search & Download API',
89
classifiers=[
910
'Programming Language :: Python',

0 commit comments

Comments
 (0)