Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stacrs #28293

Merged
merged 16 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from 14 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
2 changes: 2 additions & 0 deletions recipes/stacrs/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MACOSX_SDK_VERSION: # [osx and x86_64]
- "10.14" # [osx and x86_64]
65 changes: 65 additions & 0 deletions recipes/stacrs/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
context:
name: stacrs
version: 0.3.0

package:
name: ${{ name|lower }}
version: ${{ version }}

source:
url: https://pypi.org/packages/source/${{ name[0] }}/${{ name }}/stacrs-${{ version }}.tar.gz
sha256: 0b321137b06a7a6be118d81a5dac01657252ed3f5c3c6b0f20f30ad10cd27a96

build:
number: 0
script:
- cargo-bundle-licenses --format yaml --output THIRDPARTY.yml
- if: win
then:
- set OPENSSL_DIR=%LIBRARY_PREFIX%
- set OPENSSL_NO_VENDOR=1
- if: unix
then:
- export OPENSSL_DIR=$PREFIX
- export OPENSSL_NO_VENDOR=1
- ${{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
skip:
- match(python, "<3.10")

requirements:
build:
- ${{ stdlib("c") }}
- ${{ compiler("cxx") }} # needed to compile libduckdb-sys
- ${{ compiler("rust") }} <1.82 # https://github.com/geoarrow/geoarrow-rs/issues/833
- cargo-bundle-licenses
host:
- maturin >=1.7,<2.0
- openssl
- pip
- python
run:
- python

tests:
- python:
imports:
- stacrs
- requirements:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove calling pip check as a script, and add it under python:
https://prefix-dev.github.io/rattler-build/latest/reference/recipe_file/#python-tests

although I think pip_check defaults to true.

Copy link
Member Author

@weiji14 weiji14 Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm ok, I tried it at commit 26563d8 but got the following error:

Error:   × Failed to parse recipe

Error:   × Parsing: missing field `script`
    ╭─[48:17]
 47 │           pip_check: true
 48 │ ╭─▶   - requirements:
 49 │ │         run:
 50 │ │           - pip
 51 │ │   
 52 │ ├─▶ about:
    · ╰──── here
 53 │       summary: A no-dependency Python package for STAC, using Rust under the hood.
    ╰────
  help: expected field `script` to be a list of commands

Maybe I should remove the requirements.run part, let me try that.

Edit: Yep, works now.

run:
- pip
script:
- pip check

about:
summary: A no-dependency Python package for STAC, using Rust under the hood.
license: MIT OR Apache-2.0
license_file:
- LICENSE-APACHE
- LICENSE-MIT
- THIRDPARTY.yml
homepage: https://www.gadom.ski/stacrs
repository: https://github.com/gadomski/stacrs

extra:
recipe-maintainers:
- weiji14
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gadomski, would you like to be a conda-forge recipe maintainer for stacrs (need a yes/no answer)?

Suggested change
recipe-maintainers:
- weiji14
recipe-maintainers:
- gadomski
- weiji14

Copy link
Contributor

@gadomski gadomski Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, I will, thanks for setting this up! If you have bandwidth, we could add this to the install instructions over on stacrs too.