Skip to content

Commit 2a53e7c

Browse files
authored
Add files via upload
1 parent 205e080 commit 2a53e7c

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

pack.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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}')

0 commit comments

Comments
 (0)