Release v0.7.2

This commit is contained in:
Stein Magnus Jodal 2012-05-07 22:56:24 +02:00
commit ca706ae978
6 changed files with 38 additions and 18 deletions

View File

@ -5,10 +5,22 @@ Changes
This change log is used to track all major changes to Mopidy.
v0.7.2 (2012-05-07)
===================
This is a maintenance release to make Mopidy 0.7 build on systems without all
of Mopidy's runtime dependencies, like Launchpad PPAs.
**Changes**
- Change from version tuple at :attr:`mopidy.VERSION` to :pep:`386` compliant
version string at :attr:`mopidy.__version__` to conform to :pep:`396`.
v0.7.1 (2012-04-22)
===================
This is a maintenance release to make Mopidy 0.6 work with pyspotify >= 1.7.
This is a maintenance release to make Mopidy 0.7 work with pyspotify >= 1.7.
**Changes**

View File

@ -11,7 +11,9 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
import os
import re
import sys
class Mock(object):
def __init__(self, *args, **kwargs):
@ -49,6 +51,11 @@ MOCK_MODULES = [
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = Mock()
def get_version():
init_py = open('../mopidy/__init__.py').read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", init_py))
return metadata['version']
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@ -87,8 +94,7 @@ copyright = u'2010-2012, Stein Magnus Jodal and contributors'
# built documents.
#
# The full version, including alpha/beta/rc tags.
import mopidy
release = mopidy.get_version()
release = get_version()
# The short X.Y version.
version = '.'.join(release.split('.')[:2])

View File

@ -37,7 +37,7 @@ dependencies installed.
- For Spotify support, you need libspotify and pyspotify. See
:doc:`libspotify`.
- To scrobble your played tracks to Last.FM, you need pylast::
- To scrobble your played tracks to Last.fm, you need pylast::
sudo pip install -U pylast

View File

@ -1,14 +1,14 @@
import platform
import sys
if not (2, 6) <= sys.version_info < (3,):
sys.exit(u'Mopidy requires Python >= 2.6, < 3')
import glib
import os
import platform
from subprocess import PIPE, Popen
VERSION = (0, 7, 1)
import glib
__version__ = '0.7.2'
DATA_PATH = os.path.join(str(glib.get_user_data_dir()), 'mopidy')
CACHE_PATH = os.path.join(str(glib.get_user_cache_dir()), 'mopidy')
@ -19,7 +19,7 @@ def get_version():
try:
return get_git_version()
except EnvironmentError:
return get_plain_version()
return __version__
def get_git_version():
process = Popen(['git', 'describe'], stdout=PIPE, stderr=PIPE)
@ -30,9 +30,6 @@ def get_git_version():
version = version[1:]
return version
def get_plain_version():
return '.'.join(map(str, VERSION))
def get_platform():
return platform.platform()

View File

@ -6,9 +6,13 @@ from distutils.core import setup
from distutils.command.install_data import install_data
from distutils.command.install import INSTALL_SCHEMES
import os
import re
import sys
from mopidy import get_version
def get_version():
init_py = open('mopidy/__init__.py').read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", init_py))
return metadata['version']
class osx_install_data(install_data):
# On MacOS, the platform-specific lib dir is

View File

@ -1,14 +1,14 @@
from distutils.version import StrictVersion as SV
import platform
from mopidy import get_plain_version, get_platform, get_python
from mopidy import __version__, get_platform, get_python
from tests import unittest
class VersionTest(unittest.TestCase):
def test_current_version_is_parsable_as_a_strict_version_number(self):
SV(get_plain_version())
SV(__version__)
def test_versions_can_be_strictly_ordered(self):
self.assert_(SV('0.1.0a0') < SV('0.1.0a1'))
@ -25,8 +25,9 @@ class VersionTest(unittest.TestCase):
self.assert_(SV('0.5.0') < SV('0.6.0'))
self.assert_(SV('0.6.0') < SV('0.6.1'))
self.assert_(SV('0.6.1') < SV('0.7.0'))
self.assert_(SV('0.7.0') < SV(get_plain_version()))
self.assert_(SV(get_plain_version()) < SV('0.7.2'))
self.assert_(SV('0.7.0') < SV('0.7.1'))
self.assert_(SV('0.7.1') < SV(__version__))
self.assert_(SV(__version__) < SV('0.8.0'))
def test_get_platform_contains_platform(self):
self.assert_(platform.platform() in get_platform())