diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | requirements.txt | 5 | ||||
-rw-r--r-- | setup.py | 74 |
4 files changed, 95 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = spotify-ripper pkgdesc = Command-line ripper for Spotify, with a workaround for playlist emptying pkgver = 2.11 - pkgrel = 3 + pkgrel = 4 url = https://github.com/colorizedmind/spotify-ripper arch = any license = MIT @@ -21,7 +21,11 @@ pkgbase = spotify-ripper optdepends = libav-git-no-libs: Rip songs to Apple Lossless format optdepends = fdkaac: Rip songs to MP4/M4A format with Fraunhofer FDK AAC codec source = https://github.com/colorizedmind/spotify-ripper/archive/a044a2ee8ce9d42f43ec973a2480ec5f62598ae7.zip + source = setup.py + source = requirements.txt md5sums = 0365af83b46ad43c6331cb7887ed06f8 + md5sums = c80e4dc2d35501cc87ef75deb954a3c0 + md5sums = 433ec722cffccd32c7e31807262f1128 pkgname = spotify-ripper @@ -2,7 +2,7 @@ pkgname=spotify-ripper pkgver=2.11 -pkgrel=3 +pkgrel=4 pkgdesc='Command-line ripper for Spotify, with a workaround for playlist emptying' arch=('any') url="https://github.com/colorizedmind/spotify-ripper" @@ -13,10 +13,18 @@ optdepends=('flac: Rip songs to lossless FLAC encoding' 'opus-tools: Rip songs t 'vorbis-tools: Rip songs to Ogg Vorbis encoding' 'faac: Rip songs to AAC format with FreeAAC' 'libav-git-no-libs: Rip songs to Apple Lossless format' 'fdkaac: Rip songs to MP4/M4A format with Fraunhofer FDK AAC codec') makedepends=('python2-setuptools') -source=("https://github.com/colorizedmind/spotify-ripper/archive/a044a2ee8ce9d42f43ec973a2480ec5f62598ae7.zip") -md5sums=('0365af83b46ad43c6331cb7887ed06f8') +source=("https://github.com/colorizedmind/spotify-ripper/archive/a044a2ee8ce9d42f43ec973a2480ec5f62598ae7.zip" + "setup.py" "requirements.txt") +md5sums=('0365af83b46ad43c6331cb7887ed06f8' + 'c80e4dc2d35501cc87ef75deb954a3c0' + '433ec722cffccd32c7e31807262f1128') package() { cd $pkgname-* + + # fix imports + cp ../setup.py . + cp ../requirements.txt . + python2 setup.py install --root="$pkgdir" } diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000000..6204e4dc47cf --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +pyspotify +colorama +mutagen +requests +schedule diff --git a/setup.py b/setup.py new file mode 100644 index 000000000000..5a174a13c04a --- /dev/null +++ b/setup.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python +# coding=utf-8 + +from setuptools import setup, find_packages +import os + + +def create_default_dir(): + default_dir = os.path.normpath(os.path.realpath( + (os.path.join(os.path.expanduser("~"), ".spotify-ripper")))) + if not os.path.exists(default_dir): + print("Creating default settings directory: " + + default_dir) + os.makedirs(default_dir.encode("utf-8")) + + +def _read(fn): + path = os.path.join(os.path.dirname(__file__), fn) + return open(path).read() + +setup( + name='spotify-ripper', + version='2.11', + packages=find_packages(exclude=["tests"]), + #scripts=['spotify_ripper/main.py'], + include_package_data=True, + zip_safe=False, + + # Executable + entry_points={ + 'console_scripts': [ + 'spotify-ripper = spotify_ripper.main:main', + ], + }, + + # Additional data + package_data={ + '': ['README.rst', 'LICENCE'] + }, + + # Requirements + install_requires=[ + 'pyspotify', + 'colorama', + 'mutagen', + 'requests', + 'schedule', + 'spotipy' + ], + + # Metadata + author='James Newell, SolidHal', + author_email='james.newell@gmail.com', + description='a small ripper for Spotify that rips Spotify URIs ' + 'to audio files', + license='MIT', + keywords="spotify ripper mp3 ogg vorbis flac opus acc mp4 m4a", + url='https://github.com/SolidHal/spotify-ripper', + download_url='https://github.com/SolidHal/spotify-ripper/archive/2.11.tar.gz', + classifiers=[ + 'Topic :: Multimedia :: Sound/Audio', + 'Topic :: Multimedia :: Sound/Audio :: Capture/Recording', + 'License :: OSI Approved :: MIT License', + 'Environment :: Console', + "Intended Audience :: Developers", + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + ], + #long_description=_read('README.rst'), +) + +create_default_dir() |