Skip to content

Commit

Permalink
upgrade to Pants v2.23.0rc1 + other fixes (#139)
Browse files Browse the repository at this point in the history
* upgrade to Pants v2.23.0rc1

* update get-pants.sh binary

* update commands in README.md to those that work
  • Loading branch information
tdyas authored Oct 30, 2024
1 parent 7f64e77 commit fb191bb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,14 @@ pants test helloworld/translator/translator_test.py -- -k test_unknown_phrase #

## Create a PEX binary

The `package` goal requires specifying a target which can be packaged. In this case, the there is a `pex_binary` target with the name `pex_binary` in the `helloworld/BUILD` file.

```
pants package helloworld/main.py
pants package helloworld:pex_binary
```

The pex file is output to `dist/helloworld/pex_binary.pex` and can be executed directly.

## Run a binary directly

```
Expand Down
4 changes: 2 additions & 2 deletions get-pants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Once installed, if you want to update your "pants" launcher binary, use
-h | --help: Print this help message.
-d | --bin-dir:
The directory to install the scie-pants binary in, "~/bin" by default.
The directory to install the scie-pants binary in, "~/.local/bin" by default.
-b | --base-name:
The name to use for the scie-pants binary, "pants" by default.
Expand All @@ -176,7 +176,7 @@ Once installed, if you want to update your "pants" launcher binary, use
EOF
}

bin_dir="${HOME}/bin"
bin_dir="${HOME}/.local/bin"
base_name="pants"
version="latest/download"
while (($# > 0)); do
Expand Down
8 changes: 2 additions & 6 deletions pants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Licensed under the Apache License, Version 2.0 (see LICENSE).

[GLOBAL]
pants_version = "2.21.0"
pants_version = "2.23.0rc1"
backend_packages.add = [
"pants.backend.build_files.fmt.black",
"pants.backend.python",
Expand All @@ -25,7 +25,7 @@ root_patterns = ["/"]
# The default interpreter constraints for code in this repo. Individual targets can override
# this with the `interpreter_constraints` field. See
# https://www.pantsbuild.org/docs/python-interpreter-compatibility.

#
# Modify this if you don't have Python 3.9 on your machine.
# This can be a range, such as [">=3.8,<3.11"], but it's usually recommended to restrict
# to a single minor version.
Expand All @@ -44,7 +44,3 @@ resolves = { python-default = "python-default.lock"}
# problematic system Pythons. See
# https://www.pantsbuild.org/docs/python-interpreter-compatibility#changing-the-interpreter-search-path.
search_path = ["<PATH>", "<PYENV>"]

[python-infer]
# 2.17 is transitioning to a new, faster parser for dependency inference:
use_rust_parser = true

0 comments on commit fb191bb

Please sign in to comment.