-
Notifications
You must be signed in to change notification settings - Fork 64
/
setup.py
54 lines (47 loc) · 1.54 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
from setuptools.command.install import install
from setuptools.command.develop import develop
from setuptools.command.egg_info import egg_info
from setuptools import setup, find_packages
import sys
def genResources():
from PyQt5.pyrcc_main import main as pyrcc_main
saved_argv = sys.argv
# Use current environment to find pyrcc but use the public interface
sys.argv = ['pyrcc5', '-o', 'src/rmview/resources.py', 'resources.qrc']
pyrcc_main()
sys.argv = saved_argv
# https://stackoverflow.com/questions/19569557/pip-not-picking-up-a-custom-install-cmdclass
class genResourcesInstall(install):
def run(self):
genResources()
install.run(self)
class genResourcesDevelop(develop):
def run(self):
genResources()
develop.run(self)
class genResourcesEggInfo(egg_info):
def run(self):
genResources()
egg_info.run(self)
setup(
name='rmview',
version='3.1.3',
url='https://github.com/bordaigorl/rmview',
description='rMview: a fast live viewer for reMarkable',
author='bordaigorl',
author_email='emanuele.dosualdo@gmail.com',
classifiers=[
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
],
packages=['rmview', 'rmview.screenstream'],
install_requires=['pyqt5', 'paramiko', 'twisted[tls]', 'pyjwt'],
extras_require = { 'tunnel': ['sshtunnel'] },
entry_points={
'console_scripts':['rmview = rmview.rmview:rmViewMain']
},
cmdclass={
'install': genResourcesInstall,
'develop': genResourcesDevelop,
'egg_info': genResourcesEggInfo,
}
)