Skip to content

Commit

Permalink
Build scie-pants using science. (#191)
Browse files Browse the repository at this point in the history
Instead of using raw `scie-jump` and a hand-crafted JSON lift manifest,
use `science` and a TOML lift manifest to build `scie-pants`.

The `science` tool and its more friendly interface are the present and
future of end-user scie construction. We convert here and gain a few
things:
+ A manifest format we can comment.
+ Abstraction over platforms and PBS details.
+ Support for embedded build provenanace information for more
  comprehensive black box debugability.
+ A clean path to publishing both "thin" and "fat" binaries, solving
  #154.
  • Loading branch information
jsirois committed May 26, 2023
1 parent 0943208 commit 0ebe82a
Show file tree
Hide file tree
Showing 14 changed files with 500 additions and 525 deletions.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ jobs:
rust:1.69.0-alpine3.17 \
sh -c '
apk add cmake make musl-dev perl && \
cargo run -p package -- --dest-dir dist/ scie --tools-pex dist/tools.pex \
cargo run -p package -- --dest-dir dist/ scie-pants
'
cargo run -p package -- --dest-dir dist/ scie \
--scie-pants dist/scie-pants --tools-pex dist/tools.pex
- persist_to_workspace:
root: dist
paths:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ jobs:
rust:1.69.0-alpine3.17 \
sh -c '
apk add cmake make musl-dev perl && \
cargo run -p package -- --dest-dir dist/ scie --tools-pex dist/tools.pex \
cargo run -p package -- --dest-dir dist/ scie-pants
'
cargo run -p package -- --dest-dir dist/ scie \
--scie-pants dist/scie-pants --tools-pex dist/tools.pex
echo
echo "Running under: $(uname -a)"
echo
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ jobs:
rust:1.69.0-alpine3.17 \
sh -c '
apk add cmake make musl-dev perl && \
cargo run -p package -- --dest-dir dist/ scie --tools-pex dist/tools.pex \
cargo run -p package -- --dest-dir dist/ scie-pants
'
cargo run -p package -- --dest-dir dist/ scie \
--scie-pants dist/scie-pants --tools-pex dist/tools.pex
- name: Prepare Changelog
id: prepare-changelog
uses: a-scie/actions/changelog@v1.5
Expand Down
115 changes: 0 additions & 115 deletions package/pbt.lift.json

This file was deleted.

57 changes: 57 additions & 0 deletions package/pbt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[lift]
name = "pbt"
description = """\
Python Build Tool: A BusyBox that provides `python`, `pip`, `pex`, `pex3` and `pex-tools`.\
"""

[[lift.interpreters]]
id = "cpython"
provider = "PythonBuildStandalone"
release = "20230507"
lazy = true
version = "3.8.16"

[[lift.files]]
name = "pex"
type = "blob"
digest = { size = 4098329, fingerprint = "faad51a6a108fba9d40b2a10e82a2646fccbaf8c3d9be47818f4bffae02d94b8" }
source = { url = "https://github.com/pantsbuild/pex/releases/download/v2.1.137/pex", lazy = true }

[[lift.commands]]
name = "pex"
exe = "#{cpython:python}"
args = [
"{pex}"
]

[[lift.commands]]
name = "pex3"
exe = "#{cpython:python}"
args = [
"{pex}"
]

[lift.commands.env.replace]
PEX_SCRIPT = "pex3"

[[lift.commands]]
name = "pex-tools"
exe = "#{cpython:python}"
args = [
"{pex}"
]

[lift.commands.env.replace]
PEX_SCRIPT = "pex-tools"

[[lift.commands]]
name = "pip"
exe = "#{cpython:python}"
args = [
"-m",
"pip"
]

[[lift.commands]]
name = "python"
exe = "#{cpython:python}"

0 comments on commit 0ebe82a

Please sign in to comment.