Skip to content

Commit

Permalink
fix(cli): configure features for python
Browse files Browse the repository at this point in the history
  • Loading branch information
gadomski committed Sep 4, 2024
1 parent 55d5f6d commit 6eacaf6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/python-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --manifest-path cli/Cargo.toml
args: --release --no-default-features --out dist --find-interpreter --manifest-path cli/Cargo.toml
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.platform.target }}
# args: --release --out dist --find-interpreter --manifest-path cli/Cargo.toml -F openssl-vendored
# args: --release --no-default-features --out dist --find-interpreter --manifest-path cli/Cargo.toml -F openssl-vendored
# sccache: 'true'
# manylinux: musllinux_1_2
# - name: Upload wheels
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --manifest-path cli/Cargo.toml
args: --release --no-default-features --out dist --find-interpreter --manifest-path cli/Cargo.toml
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --manifest-path cli/Cargo.toml
args: --release --no-default-features --out dist --find-interpreter --manifest-path cli/Cargo.toml
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
Expand Down
20 changes: 8 additions & 12 deletions cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,29 @@
![Crates.io](https://img.shields.io/crates/l/stac-cli?style=for-the-badge)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg?style=for-the-badge)](./CODE_OF_CONDUCT)

Command Line Interface (CLI), named `stacrs` for [STAC](https://stacspec.org/) built with [stac-rs](https://github.com/stac-utils/stac-rs).

![stac-cli gif](./img/stac-cli.gif)
Command Line Interface (CLI) for [STAC](https://stacspec.org/), named `stacrs`.

## Installation

Install rust, e.g. with [rustup](https://rustup.rs/).
Then:

```sh
cargo install stac-cli
```

You can also install it from PyPI, where it is named **stacrs**:
Or:

```shell
pip install stacrs
pip install stacrs-cli
```

### Homebrew

If you use [homebrew](https://brew.sh/), you can use [gadomski's](https://github.com/gadomski/) tap to install:
Then:

```shell
brew install gadomski/gadomski/stac
stacrs --help
```

**NOTE:** the version from PyPI (installed with `pip`) does not include GDAL support.
If you need to use [gdal](../core/README.md#gdal) features, install via `cargo install`.

## Usage

**stacrs** provides the following subcommands:
Expand Down
Binary file removed cli/img/stac-cli.gif
Binary file not shown.
9 changes: 8 additions & 1 deletion cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,12 @@ Issues = "https://github.com/stac-utils/stac-rs/issues"
stacrs = "stacrs_cli:main"

[tool.maturin]
features = ["pyo3/extension-module", "python"]
no-default-feature = true
features = [
"pyo3/extension-module",
"python",
"pgstac",
"geoparquet",
"duckdb/bundled",
]
module-name = "stacrs_cli"

0 comments on commit 6eacaf6

Please sign in to comment.