Skip to content

Commit 77fa8df

Browse files
committed
Merge branch 'setuptools_scm'
2 parents 165db3f + f0cbae2 commit 77fa8df

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ For this project we are using [semantic versioning](http://semver.org/). If
2020
you want to make a new release:
2121

2222
1. Create a new tag in git using the following format: `v<MAJOR>.<MINOR>.<PATCH>`.
23+
24+
git tag v1.x.0
25+
git push --tags
26+
2327
2. Create a release on GitHub based on that tag. Specify changes that were made.
28+
https://github.com/metabrainz/brainzutils-python/releases/new
2429

2530
When updating underlying dependencies keep in mind breaking changes that they
2631
might have. Update version of `brainzutils-python` accordingly.

brainzutils/__init__.py

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

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#!/usr/bin/env python
22

33
from setuptools import setup, find_packages
4-
from brainzutils import __version__
54

65
setup(
76
name="brainzutils",
8-
version=__version__,
97
description="Python tools for MetaBrainz projects",
108
author="MetaBrainz Foundation",
119
author_email="support@metabrainz.org",
1210
py_modules=["brainzutils"],
1311
packages=find_packages(),
12+
use_scm_version=True,
13+
setup_requires=['setuptools_scm'],
1414
install_requires=open("requirements.txt").read().split(),
1515
)

0 commit comments

Comments
 (0)