77from pathlib import Path
88
99from shiv .bootstrap import Environment
10-
1110from shiv .builder import create_archive
1211from shiv .cli import __version__ as VERSION
1312
13+ from nxc .logger import nxc_logger
14+
1415
1516def build_nxc ():
16- print ("Building nxc" )
17+ nxc_logger . print_msg ("Building nxc" )
1718 try :
1819 shutil .rmtree ("bin" )
1920 shutil .rmtree ("build" )
2021 except FileNotFoundError :
2122 pass
2223 except Exception as e :
23- print (f"Exception while removing bin & build: { e } " )
24+ nxc_logger . print_msg (f"Exception while removing bin & build: { e } " )
2425
2526 try :
2627 os .mkdir ("build" )
2728 os .mkdir ("bin" )
2829 shutil .copytree ("nxc" , "build/nxc" )
2930 except Exception as e :
30- print (f"Exception while creating bin and build directories: { e } " )
31+ nxc_logger . print_msg (f"Exception while creating bin and build directories: { e } " )
3132 return
3233
3334 subprocess .run (
@@ -47,7 +48,9 @@ def build_nxc():
4748 [shutil .rmtree (p ) for p in Path ("build" ).glob ("**/*.dist-info" )]
4849
4950 env = Environment (
50- built_at = datetime .utcfromtimestamp (int (time .time ())).strftime ("%Y-%m-%d %H:%M:%S" ),
51+ built_at = datetime .utcfromtimestamp (int (time .time ())).strftime (
52+ "%Y-%m-%d %H:%M:%S"
53+ ),
5154 entry_point = "nxc.netexec:main" ,
5255 script = None ,
5356 compile_pyc = False ,
@@ -65,9 +68,11 @@ def build_nxc():
6568
6669
6770def build_nxcdb ():
68- print ("building nxcdb" )
71+ nxc_logger . print_msg ("building nxcdb" )
6972 env = Environment (
70- built_at = datetime .utcfromtimestamp (int (time .time ())).strftime ("%Y-%m-%d %H:%M:%S" ),
73+ built_at = datetime .utcfromtimestamp (int (time .time ())).strftime (
74+ "%Y-%m-%d %H:%M:%S"
75+ ),
7176 entry_point = "nxc.nxcdb:main" ,
7277 script = None ,
7378 compile_pyc = False ,
0 commit comments