Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store version in a separate module #271

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Byte-compiled / optimized / DLL files
__pycache__/
musicbrainzngs.egg-info/
*.py[cod]
*$py.class

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))
import musicbrainzngs
from musicbrainzngs.musicbrainz import _version
from musicbrainzngs import _version

# -- General configuration -----------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions musicbrainzngs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
from musicbrainzngs.version import _version
from musicbrainzngs.musicbrainz import *
from musicbrainzngs.caa import *
2 changes: 1 addition & 1 deletion musicbrainzngs/musicbrainz.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from musicbrainzngs import mbxml
from musicbrainzngs import util
from musicbrainzngs import compat
from musicbrainzngs import _version

_version = "0.7.1"
_log = logging.getLogger("musicbrainzngs")

LUCENE_SPECIAL = r'([+\-&|!(){}\[\]\^"~*?:\\\/])'
Expand Down
1 change: 1 addition & 0 deletions musicbrainzngs/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_version = "0.7.1"
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
#!/usr/bin/env python

from setuptools import setup

from musicbrainzngs import musicbrainz
import os

with open("README.rst", "r") as fh:
long_description = fh.read()

# `_version` comes into namespace from here
with open(os.path.join("musicbrainzngs", "version.py")) as version_file:
exec(version_file.read())

setup(
name="musicbrainzngs",
version=musicbrainz._version,
version=_version,
description="Python bindings for the MusicBrainz NGS and"
" the Cover Art Archive webservices",
long_description=long_description,
Expand Down
2 changes: 1 addition & 1 deletion test/test_caa.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from musicbrainzngs import caa
from musicbrainzngs import compat
from musicbrainzngs.musicbrainz import _version
from musicbrainzngs import _version
import musicbrainzngs
from test import _common

Expand Down