Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion 6 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
tdyas marked this conversation as resolved.
Show resolved Hide resolved
```

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 4 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 8 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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.