mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-20 14:44:05 +00:00
Add new PICARD_BUILD_VERSION_STR
It can be set by external script at build time. PICARD_VERSION should not be modified. See http://tickets.musicbrainz.org/browse/PICARD-592
This commit is contained in:
@@ -24,6 +24,11 @@ PICARD_APP_NAME = "Picard"
|
||||
PICARD_ORG_NAME = "MusicBrainz"
|
||||
PICARD_VERSION = (1, 3, 0, 'dev', 4)
|
||||
|
||||
# optional build version
|
||||
# it should be in the form '<platform>_<YYMMDDHHMMSS>'
|
||||
# ie. win32_20140415091256
|
||||
PICARD_BUILD_VERSION_STR = ""
|
||||
|
||||
|
||||
class VersionError(Exception):
|
||||
pass
|
||||
@@ -63,7 +68,11 @@ def version_from_string(version_str):
|
||||
_version_re.pattern))
|
||||
|
||||
|
||||
__version__ = PICARD_VERSION_STR = version_to_string(PICARD_VERSION)
|
||||
PICARD_VERSION_STR = version_to_string(PICARD_VERSION)
|
||||
PICARD_VERSION_STR_SHORT = version_to_string(PICARD_VERSION, short=True)
|
||||
if PICARD_BUILD_VERSION_STR:
|
||||
__version__ = "%s_%s" % (PICARD_VERSION_STR, PICARD_BUILD_VERSION_STR)
|
||||
else:
|
||||
__version__ = PICARD_VERSION_STR
|
||||
|
||||
api_versions = ["0.15.0", "0.15.1", "0.16.0", "1.0.0", "1.1.0", "1.2.0", "1.3.0"]
|
||||
|
||||
@@ -51,8 +51,8 @@ import picard.resources
|
||||
import picard.plugins
|
||||
from picard.i18n import setup_gettext
|
||||
|
||||
from picard import (PICARD_APP_NAME, PICARD_ORG_NAME, PICARD_VERSION_STR, log,
|
||||
acoustid, config)
|
||||
from picard import (PICARD_APP_NAME, PICARD_ORG_NAME, __version__,
|
||||
log, acoustid, config)
|
||||
from picard.album import Album, NatAlbum
|
||||
from picard.browser.browser import BrowserIntegration
|
||||
from picard.browser.filelookup import FileLookup
|
||||
@@ -614,7 +614,7 @@ Options:
|
||||
|
||||
|
||||
def version():
|
||||
print """MusicBrainz Picard %s""" % (PICARD_VERSION_STR)
|
||||
print """MusicBrainz Picard %s""" % (__version__)
|
||||
|
||||
|
||||
def main(localedir=None, autoupdate=True):
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
from mutagen import version_string as mutagen_version
|
||||
from PyQt4.QtCore import PYQT_VERSION_STR as pyqt_version
|
||||
from picard import PICARD_VERSION_STR_SHORT
|
||||
from picard import (PICARD_VERSION_STR_SHORT, PICARD_BUILD_VERSION_STR)
|
||||
from picard.const import PICARD_URLS
|
||||
from picard.formats import supported_formats
|
||||
from picard.ui.options import OptionsPage, register_options_page
|
||||
@@ -41,8 +41,13 @@ class AboutOptionsPage(OptionsPage):
|
||||
self.ui.setupUi(self)
|
||||
|
||||
def load(self):
|
||||
if PICARD_BUILD_VERSION_STR:
|
||||
version = "%s (%s)" % (PICARD_VERSION_STR_SHORT,
|
||||
PICARD_BUILD_VERSION_STR)
|
||||
else:
|
||||
version = PICARD_VERSION_STR_SHORT
|
||||
args = {
|
||||
"version": PICARD_VERSION_STR_SHORT,
|
||||
"version": version,
|
||||
"mutagen-version": mutagen_version,
|
||||
"pyqt-version": pyqt_version,
|
||||
"discid-version": discid_version or _("is not installed"),
|
||||
|
||||
Reference in New Issue
Block a user