ComputeCanada / software-stack

Repository to host issues relative to the Compute Canada software stack
12 stars 0 forks source link

Update EB hooks - raise error when use_pip is not used #138

Closed ccoulombe closed 7 months ago

ccoulombe commented 8 months ago

To accompany https://github.com/ComputeCanada/software-stack/issues/137, and prevent future oopsies, we need to raise an error if a module has a Python extension and uses python setup.py install and not pip install.

We then need to update the recipe to use:

        'use_pip': True,
        'use_pip_for_deps': True,
        'sanity_pip_check': True,

and fix/update any issues with the installed python packages.

mboisson commented 7 months ago

I suggest setting

exts_default_options['use_pip'] = True
exts_default_options['use_pip_for_deps'] = True
exts_default_options['sanity_pip_check'] = True

if there are Python extensions

mboisson commented 7 months ago

Or maybe add a sanity check that there are no .egg files in the install dir ?

Testing for use_pip in all extensions is not trivial.

ccoulombe commented 7 months ago

I'd prefer to raise an error (like we do with CMake). Plus, these will be defaults in the next EB version

mboisson commented 7 months ago

Plus, these will be defaults in the next EB version

which won't raise an error