conda-forge / pyorc-feedstock

A conda-smithy repository for pyorc.
BSD 3-Clause "New" or "Revised" License
0 stars 8 forks source link

Convert `build/script` to multiline list #38

Open jakirkham opened 1 year ago

jakirkham commented 1 year ago

Currently the build/script in recipe/meta.yaml includes multiple environment variables and the build/install step on one line

https://github.com/conda-forge/pyorc-feedstock/blob/034fd0367f0206990fb58dbb4ab6be5945890990/recipe/meta.yaml#L13-L14

This could be transitioned into a list, which would be run as a multiline script, like so

FWIW it is possible to use a list with script for multiline support (for example):

  script:
    - export PYORC_SKIP_ORC_BUILD=1      # [unix]
    - set PYORC_SKIP_ORC_BUILD=1         # [win]
    - export PYORC_LIBRARIES="orc"       # [unix]
    - set PYORC_LIBRARIES="orc"          # [win]
    - {{ PYTHON }} -m pip install . -vv

This could be simplified further by moving environment variables into script_env (for example), which could be set for both platforms in the same way:

  script_env:
    - PYORC_SKIP_ORC_BUILD=1
    - PYORC_LIBRARIES="orc"
  script: {{ PYTHON }} -m pip install . -vv

Doing this would likely aid in readability and maintainability.

Originally this came up in this thread ( https://github.com/conda-forge/pyorc-feedstock/pull/37#discussion_r1128502727 ).