2
2
3
3
from setuptools import setup , find_packages
4
4
5
- from setuptools .command .install import install
6
- from setuptools .command .build import build
5
+ from setuptools .command .install import install as _install
7
6
8
7
9
8
def _post_install ():
@@ -20,26 +19,12 @@ def _post_install():
20
19
_ , out = getstatusoutput (f'source { path } ' )
21
20
22
21
23
- class CustomInstallCommand ( install ):
22
+ class install ( _install ):
24
23
def run (self ):
24
+ _install .run (self )
25
25
self .execute (_post_install , (), msg = "Running post install task" )
26
- print ("**" * 50 )
27
- _post_install ()
28
- install .run (self )
29
26
30
- class CustomBuildCommand (build ):
31
- def run (self ):
32
- self .execute (_post_install , (), msg = "Running post install task" )
33
- print ("**" * 50 )
34
- _post_install ()
35
- build .run (self )
36
-
37
- #
38
- # class CustomInstallCommand(install):
39
- # """Customized setuptools install command - prints a friendly greeting."""
40
- # def run(self):
41
- # print "Hello, developer, how are you? :)"
42
- # install.run(self)
27
+
43
28
def get_env_var (name , default = None ):
44
29
if not name :
45
30
return False
@@ -110,8 +95,5 @@ def get_requirements():
110
95
'' : ["/etc/simplyblock/requirements.txt" ],
111
96
'/etc/simplyblock' : ["requirements.txt" ]
112
97
},
113
- cmdclass = {
114
- # 'install': CustomInstallCommand,
115
- 'build' : CustomBuildCommand
116
- },
98
+ cmdclass = {'install' : install },
117
99
)
0 commit comments