Introduce setup.py

some cleanup
ready to publish
master
flyingrub 2014-10-27 00:28:35 +01:00
parent 0870e58d3e
commit 978e0d6d6a
5 changed files with 63 additions and 2 deletions

3
MANIFEST.in Normal file
View File

@ -0,0 +1,3 @@
include *.md
include LICENSE
include config/scdl.cfg

3
scdl/__init__.py Normal file
View File

@ -0,0 +1,3 @@
"""Python Soundcloud Music Downloader."""
__version__ = '0.9'

View File

@ -49,6 +49,7 @@ def main():
"""
Main function, call parse_url
"""
signal.signal(signal.SIGINT, signal_handler)
print("Soundcloud Downloader")
global offset
@ -89,7 +90,7 @@ def get_config():
"""
global token
config = configparser.ConfigParser()
config.read('scdl.cfg')
config.read(os.path.join(os.path.expanduser('~'), '.config/scdl/scdl.cfg'))
token = config['scdl']['auth_token']
path = config['scdl']['path']
if os.path.exists(path):
@ -332,5 +333,4 @@ def signal_handler(signal, frame):
sys.exit(0)
if __name__ == "__main__":
signal.signal(signal.SIGINT, signal_handler)
main()

55
setup.py Normal file
View File

@ -0,0 +1,55 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import os
import scdl
setup(
name='scdl',
version=scdl.__version__,
packages=find_packages(),
author="FlyinGrub",
author_email="flyinggrub@gmail.com",
description="Download Music from Souncloud",
long_description=open('README.md').read(),
install_requires=[
'docopt',
'soundcloud',
'wget',
'configparser',
],
data_files=[
(os.path.join(os.path.expanduser('~'), '.config/scdl'), ['config/scdl.cfg'])
],
include_package_data=True,
url='https://github.com/flyingrub/scdl',
classifiers=[
"Programming Language :: Python",
"Development Status :: 4 - BETA",
"License :: GPLv2",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.4",
'Topic :: Internet',
'Topic :: Multimedia :: Sound/Audio',
],
entry_points = {
'console_scripts': [
'scdl = scdl.scdl:main',
],
},
)