Skip to content

Commit a12fcdb

Browse files
committed
Add download-only option to build
1 parent 84cbd1b commit a12fcdb

5 files changed

Lines changed: 13 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* Clean up duplicate options in sysconfig data.
1515
* Work with setuptools >= 72.2.0
1616
* Default to positition indipendent code gen
17+
* Add --download-only option to build
1718

1819

1920
0.18.1

relenv/build/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ def setup_parser(subparsers):
8686
action="store_true",
8787
help="Force downloading source tarballs even if they exist",
8888
)
89+
build_subparser.add_argument(
90+
"--download-only",
91+
default=False,
92+
action="store_true",
93+
help="Stop after downloading source tarballs",
94+
)
8995
build_subparser.add_argument(
9096
"--step",
9197
dest="steps",
@@ -179,6 +185,7 @@ def signal_handler(signal, frame):
179185
clean=args.clean,
180186
cleanup=not args.no_cleanup,
181187
force_download=args.force_download,
188+
download_only=args.download_only,
182189
show_ui=show_ui,
183190
log_level=args.log_level.upper(),
184191
)

relenv/build/common.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@ def __init__(
802802
build_default=build_default,
803803
populate_env=populate_env,
804804
force_download=False,
805+
download_only=False,
805806
arch="x86_64",
806807
version="",
807808
):
@@ -824,7 +825,6 @@ def __init__(
824825

825826
self.build_default = build_default
826827
self.populate_env = populate_env
827-
self.force_download = force_download
828828
self.toolchains = get_toolchain(root=self.dirs.root)
829829
self.set_arch(self.arch)
830830

@@ -842,7 +842,6 @@ def copy(self, version, checksum):
842842
recipies,
843843
self.build_default,
844844
self.populate_env,
845-
self.force_download,
846845
self.arch,
847846
version,
848847
)
@@ -1207,6 +1206,7 @@ def __call__(
12071206
clean=True,
12081207
cleanup=True,
12091208
force_download=False,
1209+
download_only=False,
12101210
show_ui=False,
12111211
log_level="WARNING",
12121212
):
@@ -1267,6 +1267,8 @@ def __call__(
12671267
# Start a process for each build passing it an event used to notify each
12681268
# process if it's dependencies have finished.
12691269
self.download_files(steps, force_download=force_download, show_ui=show_ui)
1270+
if download_only:
1271+
return
12701272
self.build(steps, cleanup, show_ui=show_ui, log_level=log_level)
12711273

12721274
def check_versions(self):

relenv/build/darwin.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ def build_python(env, dirs, logfp):
8787
build.add(
8888
"XZ",
8989
download={
90-
"fallback_url": "http://tukaani.org/xz/xz-{version}.tar.gz",
91-
"url": "https://woz.io/relenv/dependencies/xz-{version}.tar.gz",
90+
"url": "http://tukaani.org/xz/xz-{version}.tar.gz",
9291
"version": "5.6.2",
9392
"checksum": "0d6b10e4628fe08e19293c65e8dbcaade084a083",
9493
},

relenv/build/linux.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@ def build_python(env, dirs, logfp):
452452
build_func=build_openssl,
453453
download={
454454
"url": "https://github.com/openssl/openssl/releases/download/openssl-{version}/openssl-{version}.tar.gz",
455-
# "fallback_url": "https://woz.io/relenv/dependencies/openssl-{version}.tar.gz",
456455
"version": "3.2.4",
457456
"checksum": "2247802a1193c0f8eb41c870e8de45a2241422d5",
458457
"checkfunc": tarball_version,
@@ -467,7 +466,6 @@ def build_python(env, dirs, logfp):
467466
wait_on=["openssl"],
468467
download={
469468
"url": "https://www.openssl.org/source/openssl-{version}.tar.gz",
470-
# "fallback_url": "https://woz.io/relenv/dependencies/openssl-{version}.tar.gz",
471469
"version": "3.0.8",
472470
"checksum": "580d8a7232327fe1fa6e7db54ac060d4321f40ab",
473471
"checkfunc": tarball_version,
@@ -491,7 +489,6 @@ def build_python(env, dirs, logfp):
491489
"XZ",
492490
download={
493491
"url": "http://tukaani.org/xz/xz-{version}.tar.gz",
494-
# "fallback_url": "https://woz.io/relenv/dependencies/xz-{version}.tar.gz",
495492
"version": "5.6.2",
496493
"checksum": "0d6b10e4628fe08e19293c65e8dbcaade084a083",
497494
"checkfunc": tarball_version,
@@ -503,7 +500,6 @@ def build_python(env, dirs, logfp):
503500
build_func=build_sqlite,
504501
download={
505502
"url": "https://sqlite.org/2024/sqlite-autoconf-{version}.tar.gz",
506-
# "fallback_url": "https://woz.io/relenv/dependencies/sqlite-autoconf-{version}.tar.gz",
507503
"version": "3460100",
508504
"checksum": "1fdbada080f3285ac864c314bfbfc581b13e804b",
509505
"checkfunc": sqlite_version,
@@ -516,7 +512,6 @@ def build_python(env, dirs, logfp):
516512
build_func=build_bzip2,
517513
download={
518514
"url": "https://sourceware.org/pub/bzip2/bzip2-{version}.tar.gz",
519-
# "fallback_url": "https://woz.io/relenv/dependencies/bzip2-{version}.tar.gz",
520515
"version": "1.0.8",
521516
"checksum": "bf7badf7e248e0ecf465d33c2f5aeec774209227",
522517
"checkfunc": tarball_version,
@@ -528,7 +523,6 @@ def build_python(env, dirs, logfp):
528523
build_func=build_gdbm,
529524
download={
530525
"url": "https://ftp.gnu.org/gnu/gdbm/gdbm-{version}.tar.gz",
531-
# "fallback_url": "https://woz.io/relenv/dependencies/gdbm-{version}.tar.gz",
532526
"version": "1.25",
533527
"checksum": "d55bdf2bb5f92f80006166dd8a8323cb2a428bd1",
534528
"checkfunc": tarball_version,
@@ -540,7 +534,6 @@ def build_python(env, dirs, logfp):
540534
build_func=build_ncurses,
541535
download={
542536
"url": "https://ftp.gnu.org/pub/gnu/ncurses/ncurses-{version}.tar.gz",
543-
# "fallback_url": "https://woz.io/relenv/dependencies/ncurses-{version}.tar.gz",
544537
# XXX: Need to work out tinfo linkage
545538
# "version": "6.5",
546539
# "checksum": "cde3024ac3f9ef21eaed6f001476ea8fffcaa381",
@@ -555,7 +548,6 @@ def build_python(env, dirs, logfp):
555548
build_libffi,
556549
download={
557550
"url": "https://github.com/libffi/libffi/releases/download/v{version}/libffi-{version}.tar.gz",
558-
# "fallback_url": "https://woz.io/relenv/dependencies/libffi-{version}.tar.gz",
559551
"version": "3.4.8",
560552
"checksum": "6930b77aebe2465a8e1a8617c4c9a8fa3199b256",
561553
"checkfunc": github_version,
@@ -568,7 +560,6 @@ def build_python(env, dirs, logfp):
568560
build_zlib,
569561
download={
570562
"url": "https://zlib.net/fossils/zlib-{version}.tar.gz",
571-
# "fallback_url": "https://woz.io/relenv/dependencies/zlib-{version}.tar.gz",
572563
"version": "1.3.1",
573564
"checksum": "f535367b1a11e2f9ac3bec723fb007fbc0d189e5",
574565
"checkfunc": tarball_version,
@@ -579,7 +570,6 @@ def build_python(env, dirs, logfp):
579570
"uuid",
580571
download={
581572
"url": "https://sourceforge.net/projects/libuuid/files/libuuid-{version}.tar.gz",
582-
# "fallback_url": "https://woz.io/relenv/dependencies/libuuid-{version}.tar.gz",
583573
"version": "1.0.3",
584574
"checksum": "46eaedb875ae6e63677b51ec583656199241d597",
585575
"checkfunc": uuid_version,
@@ -592,7 +582,6 @@ def build_python(env, dirs, logfp):
592582
wait_on=["openssl"],
593583
download={
594584
"url": "https://kerberos.org/dist/krb5/{version}/krb5-{version}.tar.gz",
595-
# "fallback_url": "https://woz.io/relenv/dependencies/krb5-{version}.tar.gz",
596585
"version": "1.21",
597586
"checksum": "e2ee531443122376ac8b62b3848d94376f646089",
598587
"checkfunc": krb_version,
@@ -606,7 +595,6 @@ def build_python(env, dirs, logfp):
606595
wait_on=["ncurses"],
607596
download={
608597
"url": "https://ftp.gnu.org/gnu/readline/readline-{version}.tar.gz",
609-
# "fallback_url": "https://woz.io/relenv/dependencies/readline-{version}.tar.gz",
610598
"version": "8.2.13",
611599
"checksum": "5ffb6a334c2422acbe8f4d2cb11e345265c8d930",
612600
"checkfunc": tarball_version,
@@ -621,7 +609,6 @@ def build_python(env, dirs, logfp):
621609
download={
622610
"url": "https://sourceforge.net/projects/libtirpc/files/libtirpc-{version}.tar.bz2",
623611
# "url": "https://downloads.sourceforge.net/projects/libtirpc/files/libtirpc-{version}.tar.bz2",
624-
# "fallback_url": "https://woz.io/relenv/dependencies/libtirpc-{version}.tar.bz2",
625612
"version": "1.3.4",
626613
"checksum": "63c800f81f823254d2706637bab551dec176b99b",
627614
"checkfunc": tarball_version,
@@ -648,7 +635,6 @@ def build_python(env, dirs, logfp):
648635
],
649636
download={
650637
"url": "https://www.python.org/ftp/python/{version}/Python-{version}.tar.xz",
651-
# "fallback_url": "https://woz.io/relenv/dependencies/Python-{version}.tar.xz",
652638
"version": build.version,
653639
"checksum": "d31d548cd2c5ca2ae713bebe346ba15e8406633a",
654640
"checkfunc": python_version,

0 commit comments

Comments
 (0)