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

Pip dependencies #262

Open
henryiii opened this issue Aug 17, 2017 · 3 comments
Open

Pip dependencies #262

henryiii opened this issue Aug 17, 2017 · 3 comments
Labels
Type: Enhancement Improvement to functionality

Comments

@henryiii
Copy link
Contributor

Is there a way to set dependencies before the setup function? Since this replaces the normal setup, it means that pip requires scikit-build to already be present on the system. I'm trying to turn the instructions for my package from:

pip install scikit-build cmake
pip install -v my_package

into

pip install -v my_package

I could check for skbuild when I import, then use pip.main from import pip, but that would not respect the standard mechanisms for selecting user vs. system, virtual envs, etc.

PS: I'm working on the GooFit package, preparing it for a Python release in a few weeks.

@jcfr
Copy link
Contributor

jcfr commented Aug 17, 2017

Hi @henryiii ,

It is currently not possible.

That said, as soon as pip implements pep-0518, things should be better.

In the mean time, to keep things simple here is what we do:

try:
    from skbuild import setup
except ImportError:
    print('scikit-build is required to build from source.', file=sys.stderr)
    print('Please run:', file=sys.stderr)
    print('', file=sys.stderr)
    print('  python -m pip install scikit-build')
    sys.exit(1)

See https://github.com/InsightSoftwareConsortium/ITKPythonPackage/blob/2025a1c90f3121ea5781e6b2d2b739cce1456410/setup.py#L7-L14

@jcfr
Copy link
Contributor

jcfr commented Aug 17, 2017

For reference, see also pypa/pip#3691

@jcfr jcfr added the Type: Enhancement Improvement to functionality label Feb 22, 2018
@jcfr
Copy link
Contributor

jcfr commented Feb 22, 2018

duplicate #124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Improvement to functionality
Projects
None yet
Development

No branches or pull requests

2 participants