Skip to content

Commit

Permalink
Use setuptools_scm to get the version from the git tag
Browse files Browse the repository at this point in the history
  • Loading branch information
alastair committed May 6, 2020
1 parent e6522a5 commit f0cbae2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion brainzutils/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
__version__ = '1.14.1'
from pkg_resources import get_distribution, DistributionNotFound

try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/usr/bin/env python

from setuptools import setup, find_packages
from brainzutils import __version__

setup(
name="brainzutils",
version=__version__,
description="Python tools for MetaBrainz projects",
author="MetaBrainz Foundation",
author_email="support@metabrainz.org",
py_modules=["brainzutils"],
packages=find_packages(),
use_scm_version=True,
setup_requires=['setuptools_scm'],
install_requires=open("requirements.txt").read().split(),
)

0 comments on commit f0cbae2

Please sign in to comment.