Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Commit

Permalink
Release v1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jodal committed Jun 11, 2011
2 parents 0f9041e + c31202a commit ac8eb6e
Show file tree
Hide file tree
Showing 60 changed files with 442 additions and 1,009 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -4,8 +4,11 @@
*.swp
*.wpr
*.wpu
.coverage
MANIFEST
_build
build
dist
nosetests.xml
spotify_appkey.key
cover
1 change: 0 additions & 1 deletion MANIFEST.in
@@ -1,5 +1,4 @@
include LICENSE *.rst
include ez_setup.py

recursive-include src *.c *.h

Expand Down
5 changes: 4 additions & 1 deletion README.rst
Expand Up @@ -14,7 +14,10 @@ apply for, and receive an API key from Spotify.
Project resources
=================

- `Documentation <http://pyspotify.mopidy.com/>`_
- `Documentation for the latest release
<http://pyspotify.mopidy.com/docs/master/>`_
- `Documentation for the development version
<http://pyspotify.mopidy.com/docs/develop/>`_
- `Source code <http://github.com/mopidy/pyspotify>`_
- `Issue tracker <http://github.com/mopidy/pyspotify/issues>`_
- `Download development snapshot <http://github.com/mopidy/pyspotify/tarball/develop#egg=pyspotify-dev>`_
15 changes: 15 additions & 0 deletions docs/_templates/layout.html
@@ -0,0 +1,15 @@
{% extends "!layout.html" %}

{% block footer %}
{{ super() }}
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-15510432-2");
pageTracker._trackPageview();
} catch(err) {}
</script>
{% endblock %}
5 changes: 2 additions & 3 deletions docs/api/albumbrowse.rst
Expand Up @@ -2,9 +2,8 @@ Album browsing
**************
.. currentmodule:: spotify

Album browsers are created by the method
:meth:`browse_album <Session.browse_album>` of a :class:`Session <Session>`
object. They are iterable objects.
Album browsers are created by :meth:`Session.browse_album` object. They are
iterable objects.


The :class:`AlbumBrowser` class
Expand Down
5 changes: 2 additions & 3 deletions docs/api/artistbrowse.rst
Expand Up @@ -2,9 +2,8 @@ Artist browsing
***************
.. currentmodule:: spotify

Artist browsers are created by the method
:meth:`browse_artist <Session.browse_artist>` of a :class:`Session <Session>`
object. They are iterable objects.
Artist browsers are created by :meth:`Session.browse_artist` object. They are
iterable objects.


The :class:`ArtistBrowser` class
Expand Down
5 changes: 2 additions & 3 deletions docs/api/index.rst
Expand Up @@ -7,8 +7,8 @@ structured similarly to the `libspotify API documentation

.. module:: spotify

All the classes and sub-modules of **pyspotify** are contained in the
:mod:`spotify` parent module.
All the classes and submodules of pyspotify are contained in the :mod:`spotify`
parent module.

.. toctree::

Expand All @@ -27,4 +27,3 @@ All the classes and sub-modules of **pyspotify** are contained in the
user
toplist
inbox

5 changes: 2 additions & 3 deletions docs/api/session.rst
Expand Up @@ -4,9 +4,8 @@ Session handling
.. currentmodule:: spotify

The session handling is usually done by inheriting the
:class:`SpotifySessionManager <spotify.managers.SpotifySessionManager>` class
from the :mod:`manager` module.
Then the manager's :meth:`connect` method calls the
:class:`spotify.managers.SpotifySessionManager` class from the :mod:`manager`
module. Then the manager's :meth:`connect` method calls the
:func:`spotify.connect` function.

.. function:: connect(session_manager)
Expand Down
14 changes: 14 additions & 0 deletions docs/changes.rst
Expand Up @@ -2,6 +2,20 @@
Changes
=======

v1.3 (2011-06-11)
=================

It has only been four days since the v1.2 release, but we would like to get the
change from bytestrings to unicode objects released before more projects start
using pyspotify, as this change is really backwards incompatible.

- All strings returned by pyspotify has been changed from UTF-8 encoded
bytestrings to unicode objects.
- Track autolinking enabled for all playlists.
- Add :attr:`spotify.__version__` which exposes the current pyspotify version.
The API version of the libspotify used is already available as
:attr:`spotify.api_version`.

v1.2 (2011-06-07)
=================

Expand Down
13 changes: 9 additions & 4 deletions docs/conf.py
Expand Up @@ -11,7 +11,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os
import sys, os, re

import distutils.command.build
from distutils.dist import Distribution
Expand All @@ -26,6 +26,11 @@
pyspotify_path = '../' + b.build_platlib
sys.path.insert(0, os.path.abspath(pyspotify_path))

def get_version():
init_py = open('../spotify/__init__.py').read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", init_py))
return metadata['version']

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

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down Expand Up @@ -55,10 +60,10 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.2'
# The full version, including alpha/beta/rc tags.
release = '1.2'
release = get_version()
# The short X.Y version.
version = '.'.join(release.split('.')[:2])

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
27 changes: 15 additions & 12 deletions docs/introduction.rst
Expand Up @@ -58,35 +58,38 @@ Arch Linux package

Install the ``pyspotify-git`` package from the AUR.

Using Pip
---------
Using Pip (latest stable release)
---------------------------------

The ``pip`` program for installing Python packages is usually found is the
``python-pip`` package of your linux distribution.
``python-pip`` package of your Linux distribution.

To install ``pyspotify``, run as root::
To install ``pyspotify``, run::

pip install -U pyspotify
sudo pip install -U pyspotify

To update an existing installation, simply use the same command.

Using Pip (latest development version)
--------------------------------------

To install the very latest git version of pyspotify::

sudo pip install -U pyspotify==dev

Using setuptools (latest git version)
-------------------------------------

You will have first to clone the `git repository <http://github.com/mopidy/pyspotify>`_.

On Ubuntu or other Debian-based distributions::

python setup.py install --install-layout=deb

On other::
Then to install it::

python setup.py install
sudo python setup.py install


Trying it out
=============

Included with pyspotify is a simple program, `examples/jukebox.py`. Run this
Included with pyspotify is a simple program, ``examples/jukebox.py``. Run this
with your credentials and access to an API key, and it will let you browse and
play from your playlists, conduct searches and play from Spotify URIs.
11 changes: 5 additions & 6 deletions docs/managers/index.rst
Expand Up @@ -3,13 +3,12 @@ Managers

.. module:: spotify.manager

The role of the *pyspotify* managers is to help the developper by abstracting
basic operations of the spotify library. They include callbacks that you can
implement if you wish to be notified of particular spotify events.
The role of the pyspotify *managers* is to help the developer by abstracting
basic operations of the Spotify library. They include callbacks that you can
implement if you wish to be notified of particular Spotify events.

The one you certainly want to use is the :class:`session manager
<SpotifySessionManager>`, as it handles all login and other basic session
operations.
The one you certainly want to use is the :class:`SpotifySessionManager`, as it
handles all login and other basic session operations.

.. toctree::

Expand Down
18 changes: 1 addition & 17 deletions examples/jukebox.py
@@ -1,20 +1,4 @@
#!/usr/bin/env python
#
# $Id$
#
# Copyright 2009 Doug Winter
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import cmd
import readline
Expand Down Expand Up @@ -78,7 +62,7 @@ def do_list(self, line):
playlist = self.jukebox.starred
for i, t in enumerate(playlist):
if t.is_loaded():
print "%3d %s" % (i, t.name())
print "%3d %s - %s" % (i, t.artists()[0].name(), t.name())
else:
print "%3d %s" % (i, "loading...")

Expand Down
8 changes: 6 additions & 2 deletions setup.cfg
@@ -1,3 +1,7 @@
[nosetests]
where=tests
no-path-adjustment=1
cover-html = 1
cover-inclusive = 1
cover-package = spotify
no-path-adjustment = 1
where = tests
with-xunit = 1
8 changes: 7 additions & 1 deletion setup.py
Expand Up @@ -2,6 +2,12 @@

from distutils.core import setup, Extension
import os
import re

def get_version():
init_py = open('spotify/__init__.py').read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", init_py))
return metadata['version']

def fullsplit(path, result=None):
"""
Expand Down Expand Up @@ -77,7 +83,7 @@ def fullsplit(path, result=None):

setup(
name='pyspotify',
version='1.2',
version=get_version(),
description='Python wrapper for libspotify',
long_description=open('README.rst').read(),
author='Doug Winter',
Expand Down
1 change: 1 addition & 0 deletions spotify/__init__.py
@@ -1,3 +1,4 @@
__version__ = '1.3'

class SpotifyError(Exception):
pass
Expand Down
16 changes: 0 additions & 16 deletions spotify/alsahelper.py
@@ -1,19 +1,3 @@
# $Id$
#
# Copyright 2009 Doug Winter
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import alsaaudio

class AlsaController(object):
Expand Down

0 comments on commit ac8eb6e

Please sign in to comment.