You are not logged in.

#1 2014-01-18 11:58:13

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

[solved] [Request] pygrooveshark

PyGrooveshark is an implementation of the unofficial Grooveshark API as used by the official clients. It is written in Python and supports searching, stations as well as the popular songs list.

http://koehlma.github.com/projects/pygrooveshark.html

Features

    searching in the Song database of Grooveshark for songs, albums and artists
    listening to the Grooveshark radio stations (songs by genre)
    fetching the popular songs list
    download the songs (for playing)
    access to all grooveshark meta information for songs, albums and artists

Is someone interested in packaging this for accessing Grooveshark from the command line?

Last edited by orschiro (2014-01-19 06:07:16)

Offline

#2 2014-01-18 15:08:29

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [solved] [Request] pygrooveshark

From what I can see, this is a python library, not something to be used from the command line.

PKGBUILD is pretty trivial, only question is what method to use to get the pkgver, I put two in with one commented out. It also says it works with python3, but setup.py uses python2 only calls. I opened an issue on github, if it's fixed, all you have to do is change the _python= line to package it for python3.

_python=python2
_pkgname=pygrooveshark
pkgname=$_python-$_pkgname-git
pkgver=3.0.r94.1011700
pkgrel=1
pkgdesc="An implementation of the unofficial Grooveshark API as used by the official clients"
arch=('any')
url="http://koehlma.github.io/projects/pygrooveshark.html"
license=('GPL3')
depends=("$_python")
makedepends=('git')
source=("git://github.com/koehlma/$_pkgname.git")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$_pkgname"

# git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./g'

  printf "$($_python setup.py -V).r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

package() {
  cd "$srcdir/$_pkgname"

  $_python setup.py install --root="$pkgdir"
}

Last edited by Scimmia (2014-01-18 15:14:18)

Offline

#3 2014-01-19 06:06:45

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] [Request] pygrooveshark

@Scimmia

Thanks for submitting the issue report.

I am watching it now and will update the package then if necessary!

https://aur.archlinux.org/packages/pyth … shark-git/

Offline

#4 2014-01-20 08:37:01

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] [Request] pygrooveshark

@Scimmia

Upstream made it compatible with python3. Would you recommend to make a separate package for python3?

Would you still keep the python2 package or is it enough to have the python3 package only?

Offline

#5 2014-01-20 08:44:19

HalosGhost
Forum Fellow
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,097
Website

Re: [solved] [Request] pygrooveshark

orschiro, if the same package can run with both python2 or python3, then you should only have one package. The question would then be how you label that option in the depends.

I guess you would add both 'python' and 'python2' to the optdepends array and do a check in a prepare() function to make sure that at least one of them is installed.

If instead, you need different files for each distribution of python, then yeah, you need to have two packages.

All the best,

-HG

Offline

#6 2014-01-20 17:55:37

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [solved] [Request] pygrooveshark

HalosGhost wrote:

orschiro, if the same package can run with both python2 or python3, then you should only have one package.

This is a library, not a program. There's no way to make the same binary package use either one.

@orschiro, it's up to you. When building for a binary repo like core, extra, community, etc, it makes sense and is normal to have one PKGBUILD build both python and python2 packages. I don't think this works well in the AUR, though, as it forces the person building it to have both python and python2 installed to make both packages, even if they're only interested in one of them. As for only having a python package, there's no reason to remove the python2 version unless you make the python package a split PGKBUILD.

Locally, I keep my PKGBUILDs in a git repo. In cases like this, I make a branch for python2 and simply rebase it against master whenever I make changes.

Last edited by Scimmia (2014-01-20 17:59:02)

Offline

#7 2014-01-21 22:47:44

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] [Request] pygrooveshark

Thanks for your feedback. I will maintain both versions then.

python2: https://aur.archlinux.org/packages/pyth … shark-git/
python3: https://aur.archlinux.org/packages/pyth … shark-git/

Offline

Board footer

Powered by FluxBB