-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathsetup.py
62 lines (57 loc) · 2.02 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import setuptools
import json
import os
from pathlib import Path
from subprocess import check_call
from setuptools.command.install import install
APP_NAME = "Raincoat"
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
cfg_path = f"{str(Path.home())}/.config/{APP_NAME}.json"
if not os.path.exists(cfg_path):
cfg = open(cfg_path, 'x')
j = dict(
jackett_apikey="",
jackett_url="http://127.0.0.1:9117",
jackett_indexer="all",
description_length=100,
exclude="",
results_limit=20,
client_url="",
display="grid",
torrent_client="transmission",
torrent_client_username="",
torrent_client_password="",
download_dir=""
)
json.dump(j, cfg, indent=4)
install.run(self)
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="raincoat-jackett",
version="1.3.3",
author="Gabisonfire",
author_email="gabisonfire@github.com",
description="Raincoat is a tool to search torrents using Jackett and send them to your client.",
keywords="transmission qbittorrent deluge jackett torrent",
long_description=long_description,
long_description_content_type="text/markdown",
python_requires=">=3.7.17",
packages=setuptools.find_packages(),
entry_points = {
"console_scripts": ['raincoat = raincoat.raincoat:main']
},
url="https://github.com/Gabisonfire/raincoat",
classifiers=[
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: MIT License",
"Operating System :: Unix",
"Topic :: Communications :: File Sharing",
],
install_requires=["requests==2.23.0", "colorama==0.4.3", "tabulate==0.8.10", "transmission-clutch==6.0.2", "deluge-client==1.8.0", "python-qbittorrent==0.4.2"],
cmdclass={
'install': PostInstallCommand
},
)