From e71b0035767bafd58eb0e8fb5540e3acde5f2e63 Mon Sep 17 00:00:00 2001 From: Ritiek Malhotra Date: Mon, 10 Oct 2016 04:47:16 +0530 Subject: [PATCH] windows compatibility --- setup.py | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/setup.py b/setup.py index 43de16b..7d91a11 100644 --- a/setup.py +++ b/setup.py @@ -10,18 +10,25 @@ from setuptools import setup, find_packages if not os.path.exists("Music"): os.makedirs("Music") -os.system('sudo chmod 777 Music') +if not os.name == 'nt': + os.system('sudo chmod 777 Music') open('Music/list.txt', 'a').close() -os.system('sudo chmod 777 Music/list.txt') +if not os.name == 'nt': + os.system('sudo chmod 777 Music/list.txt') setup(name='spotdl', - version='0.1', - description='Downloads Songs and Spotify playlists (even for free accounts)', - author='Ritiek Malhotra', - author_email='ritiekmalhotra123@gmail.com', - scripts=['bin/spotdl'], - url='https://www.github.com/Ritiek/Spotify-Downloader/', - download_url = 'https://github.com/Ritiek/Spotify-Downloader/tarball/0.1', - keywords = ['download', 'songs', 'spotify', 'playlists', 'music'], - classifiers = [], - ) + version='0.1', + description='Downloads Songs and Spotify playlists (even for free accounts)', + author='Ritiek Malhotra', + author_email='ritiekmalhotra123@gmail.com', + scripts=['bin/spotdl'], + url='https://www.github.com/Ritiek/Spotify-Downloader/', + download_url = 'https://github.com/Ritiek/Spotify-Downloader/tarball/0.1', + keywords = ['download', 'songs', 'spotify', 'playlists', 'music'], + classifiers = [], + ) + +if os.name == 'nt': + os.system('copy bin\spotdl Scripts\spotdl.py') + print '' + print 'To run the script use: `python.exe Scripts/spotdl.py` in your root python installation folder'