forked from jkaberg/tvhProxy
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathsetup.py
39 lines (34 loc) · 1.21 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from setuptools import setup
from setuptools.command.install import install
import os, platform
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
usr = os.path.expanduser("~")
if platform.system() == 'Linux':
try:
os.system("sudo apt-get install python3-tk")
except:
print("tkinter install failed")
elif platform.system() == 'Darwin':
try:
os.system('ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null')
os.system('brew cask install tcl')
except:
print("tkinter install failed")
if not os.path.isdir(os.path.join(usr, 'YAP')):
os.mkdir(os.path.join(usr, 'YAP'))
with open(os.path.join(usr, 'YAP', 'sstvProxy.py'), "wb") as file:
# get request
from requests import get
response = get("https://raw.githubusercontent.com/vorghahn/sstvProxy/master/sstvProxy.py")
# write to file
file.write(response.content)
setup(
name = 'YAPSSTV',
version = '1.4',
cmdclass = {'install': PostInstallCommand},
description = 'Yet Another Proxy',
python_requires = '>=3.5',
install_requires=['requests','flask>=0.12.0']
)