irs/setup.py

62 lines
1.7 KiB
Python
Raw Normal View History

2016-12-10 23:40:43 +00:00
from setuptools import setup
from setuptools.command.develop import develop
from setuptools.command.install import install
class PostDevelopCommand(develop):
"""Post-installation for development mode."""
def run(self):
# PUT YOUR PRE-INSTALL SCRIPT HERE or CALL A FUNCTION
develop.run(self)
# PUT YOUR POST-INSTALL SCRIPT HERE or CALL A FUNCTION
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
install.run(self) # Actually install the module and dependencies
2017-06-10 19:31:15 +00:00
try:
import ydl_binaries
except ImportError:
import pip
pip.main(['install', "ydl-binaries"])
2017-06-10 19:21:17 +00:00
import ydl_binaries
from os import path
from shutil import copyfile
print("\n\nDownloading Dependencies:\n")
2017-06-11 00:37:16 +00:00
# ydl_binaries.download_ffmpeg("~/.irs/bin")
# ydl_binaries.update_ydl("~/.irs/bin")
config_file = path.expanduser("~/.irs/config_.py")
if not path.isfile(config_file):
copyfile("irs/config_preset", config_file)
2016-12-10 23:40:43 +00:00
setup(
name = 'irs',
2017-05-12 23:37:21 +00:00
version = '6.5.6',
description = 'A music downloader that just gets metadata.',
url = 'https://github.com/kepoorhampond/irs',
author = 'Kepoor Hampond',
author_email = 'kepoorh@gmail.com',
license = 'GPL',
packages = ['irs'],
install_requires = [
'bs4',
'mutagen',
'requests',
'spotipy',
'ydl-binaries'
2016-12-10 23:40:43 +00:00
],
entry_points = {
'console_scripts': ['irs = irs.cli:main'],
2016-12-10 23:40:43 +00:00
},
cmdclass = {
'develop': PostDevelopCommand,
'install': PostInstallCommand,
},
2016-12-10 23:40:43 +00:00
)