File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ import os
2+ from colorama import Fore , Style
3+
4+ F = Fore # Changes the foreground color of the text (F.COLOR)
5+ SR = Style .RESET_ALL # Resets any color applied to the text
6+
7+ if __name__ == '__main__' :
8+ os .system ('cls >nul' )
9+
10+ # installing and/or upgrading wheel and setuptools via pip
11+ print (f'{ F .CYAN } --> Updating libraries...{ SR } ' )
12+ os .system ('pip install wheel setuptools >nul' )
13+ os .system ('pip install wheel --upgrade >nul' )
14+ os .system ('pip install setuptools --upgrade >nul' )
15+
16+ print (f"{ F .CYAN } --> Building packages with 'setup.py'...{ SR } " )
17+ # building tar package with sdist
18+ os .system ('python setup.py sdist' )
19+ print (f"{ F .CYAN } --> Created tar file{ SR } " )
20+
21+ # building whl package with bdist_wheel
22+ os .system ('python setup.py bdist_wheel' )
23+ print (f"{ F .CYAN } --> Created whl file{ SR } " )
24+
25+ print ("" )
26+ print (f"{ F .CYAN } Building complete. Files can be found under the local 'dist/' folder{ SR } " )
27+
28+ input (f'{ F .CYAN } Press ENTER to exit.{ SR } ' )
29+ else :
30+ print (f"{ F .CYAN } --> Script 'build.py' was called but not run as 'main'{ SR } " )
31+ input (f'{ F .CYAN } --> Press ENTER to exit.{ SR } ' )
You can’t perform that action at this time.
0 commit comments