Skip to content

Failing to pass arguments to pip install . builds on Windows #705

@bnavigator

Description

@bnavigator

Hi,

I am trying to remove deprecated python setup.py install calls in our CI and building instructions for Slycot:
python-control/Slycot#173

I am unable to pass scikit-build command line arguments through pip in a conda-build recipe for Windows.

This one works:

set BLAS_ROOT=%PREFIX%
set LAPACK_ROOT=%PREFIX%

"%PYTHON%" setup.py install -G "NMake Makefiles" -DBLA_VENDOR=Generic

if errorlevel 1 exit 1

On Unix-like systems I can do:

export SKBUILD_CONFIGURE_OPTIONS="-DBLA_VENDOR=Generic"
$PYTHON -m pip install -v . --no-build-isolation --global-option='--generator="Unix Makefiles"'

How do I set the generator for pip builds on Windows?

set "SKBUILD_CONFIGURE_OPTIONS=-DBLA_VENDOR=Generic"
"%PYTHON%" -m pip install . --no-build-isolation --global-option="--generator=NMake Makefiles" -vv

doesn't do the trick.

I also reconn that using pip --global-option, --build-option and so on are actually not sustainable. (pypa/pip#9774, pypa/pip#9769)

So how do I specify the generator from the CLI or environment for a modern Python installation without setup.py on all platforms?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions