Skip to content

Commit 18ea54f

Browse files
committed
windows: create .tar and .tar.zst files
I think things are stable enough to start doing this. We still have a long way to go though.
1 parent 2bb7059 commit 18ea54f

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

build-windows.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ def run():
5454
dest_path = DIST / ('cpython-%s-windows-amd64-%s.tar.zst' % (
5555
DOWNLOADS['cpython-3.7']['version'], now.strftime('%Y%m%dT%H%M')))
5656

57-
#print('compressing Python archive to %s' % dest_path)
58-
#with source_path.open('rb') as ifh, dest_path.open('wb') as ofh:
59-
# cctx = zstandard.ZstdCompressor(level=15)
60-
# cctx.copy_stream(ifh, ofh, source_path.stat().st_size)
61-
#
62-
#sha256 = hash_path(dest_path)
63-
#print('%s has SHA256 %s' % (dest_path, sha256))
57+
print('compressing Python archive to %s' % dest_path)
58+
with source_path.open('rb') as ifh, dest_path.open('wb') as ofh:
59+
cctx = zstandard.ZstdCompressor(level=15)
60+
cctx.copy_stream(ifh, ofh, source_path.stat().st_size)
61+
62+
sha256 = hash_path(dest_path)
63+
print('%s has SHA256 %s' % (dest_path, sha256))
6464

6565

6666
if __name__ == '__main__':

cpython-windows/build.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
DOWNLOADS,
1414
)
1515
from pythonbuild.utils import (
16+
create_tar_from_directory,
1617
download_entry,
1718
extract_tar_to_directory,
1819
)
@@ -59,7 +60,6 @@ def exec_and_log(args, cwd, env, exit_on_error=True):
5960
log('process exited %d' % p.returncode)
6061

6162
if p.returncode and exit_on_error:
62-
import pdb; pdb.set_trace()
6363
sys.exit(p.returncode)
6464

6565

@@ -313,8 +313,10 @@ def build_cpython(pgo=False):
313313
pcbuild_path,
314314
os.environ)
315315

316-
import pdb; pdb.set_trace()
317-
log('it worked!')
316+
dest_path = BUILD / 'cpython-windows.tar'
317+
318+
with dest_path.open('wb') as fh:
319+
create_tar_from_directory(fh, td / 'out')
318320

319321

320322
def main():

0 commit comments

Comments
 (0)