Skip to content

Commit fb191bb

Browse files
authored
upgrade to Pants v2.23.0rc1 + other fixes (#139)
* upgrade to Pants v2.23.0rc1 * update get-pants.sh binary * update commands in README.md to those that work
1 parent 7f64e77 commit fb191bb

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Diff for: README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,14 @@ pants test helloworld/translator/translator_test.py -- -k test_unknown_phrase #
139139

140140
## Create a PEX binary
141141

142+
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.
143+
142144
```
143-
pants package helloworld/main.py
145+
pants package helloworld:pex_binary
144146
```
145147

148+
The pex file is output to `dist/helloworld/pex_binary.pex` and can be executed directly.
149+
146150
## Run a binary directly
147151

148152
```

Diff for: get-pants.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Once installed, if you want to update your "pants" launcher binary, use
163163
-h | --help: Print this help message.
164164
165165
-d | --bin-dir:
166-
The directory to install the scie-pants binary in, "~/bin" by default.
166+
The directory to install the scie-pants binary in, "~/.local/bin" by default.
167167
168168
-b | --base-name:
169169
The name to use for the scie-pants binary, "pants" by default.
@@ -176,7 +176,7 @@ Once installed, if you want to update your "pants" launcher binary, use
176176
EOF
177177
}
178178

179-
bin_dir="${HOME}/bin"
179+
bin_dir="${HOME}/.local/bin"
180180
base_name="pants"
181181
version="latest/download"
182182
while (($# > 0)); do

Diff for: pants.toml

+2-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
33

44
[GLOBAL]
5-
pants_version = "2.21.0"
5+
pants_version = "2.23.0rc1"
66
backend_packages.add = [
77
"pants.backend.build_files.fmt.black",
88
"pants.backend.python",
@@ -25,7 +25,7 @@ root_patterns = ["/"]
2525
# The default interpreter constraints for code in this repo. Individual targets can override
2626
# this with the `interpreter_constraints` field. See
2727
# https://www.pantsbuild.org/docs/python-interpreter-compatibility.
28-
28+
#
2929
# Modify this if you don't have Python 3.9 on your machine.
3030
# This can be a range, such as [">=3.8,<3.11"], but it's usually recommended to restrict
3131
# to a single minor version.
@@ -44,7 +44,3 @@ resolves = { python-default = "python-default.lock"}
4444
# problematic system Pythons. See
4545
# https://www.pantsbuild.org/docs/python-interpreter-compatibility#changing-the-interpreter-search-path.
4646
search_path = ["<PATH>", "<PYENV>"]
47-
48-
[python-infer]
49-
# 2.17 is transitioning to a new, faster parser for dependency inference:
50-
use_rust_parser = true

0 commit comments

Comments
 (0)