Skip to content

Commit

Permalink
Merge pull request #88 from MobileRoboticsSkoltech/feature/version
Browse files Browse the repository at this point in the history
Feature/version - adding __version__ attribute.
  • Loading branch information
anastasiia-kornilova authored Jan 22, 2022
2 parents b09eabb + 8994409 commit 4e88f34
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
try:
from . import mrob

from pkg_resources import get_distribution

__version__ = get_distribution('mrob').version

for module in dir(mrob):
n = len(module) - 1
if not (module[:2] == '__' and module[n:n-2:-1] == '__') and module.count('.') == 0:
Expand Down
6 changes: 6 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
[metadata]
name = mrob
home-page = https://github.com/MobileRoboticsSkoltech/mrob
author = Gonzalo Ferrer
author_email = G.Ferrer@skoltech.ru
url = https://github.com/MobileRoboticsSkoltech/mrob
download_url = https://github.com/MobileRoboticsSkoltech/mrob
description = The Skoltech Mobile Robotics library (mrob) is a framework for implementing robotics research and projects.
platforms = any
maintainer = Gonzalo Ferrer
maintainer_email = G.Ferrer@skoltech.ru
long-description = file: README.md
Expand Down
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ def get_tag(self):
except ImportError:
bdist_wheel = None


setuptools.setup(
version_config=True,
version_config={
"dev_template": "{tag}.{branch}.post{ccount}+git.{sha}",
"dirty_template": "{tag}.{branch}.post{ccount}+git.{sha}.dirty",
},
setup_requires=['setuptools-git-versioning'],
cmdclass={'bdist_wheel': bdist_wheel}
)

0 comments on commit 4e88f34

Please sign in to comment.