Skip to content

Conversation

@Neeratyoy
Copy link
Contributor

Reference Issue

Addresses #727.

What does this PR implement/fix? Explain your changes.

Fixes a system exit on install.

How should this PR be tested?

git clone https://github.com/openml/openml-python.git
python setup.py install

@Neeratyoy Neeratyoy requested a review from mfeurer July 9, 2019 18:34
@mfeurer
Copy link
Collaborator

mfeurer commented Jul 10, 2019

I don't think this PR keeps the original behavior which is only allowing installation via pip. Could you please check that installation via python setup.py install does not work, while it works with pip?

@Neeratyoy
Copy link
Contributor Author

I think I understood the issue wrong, in that case.

On my local, pip install openml works fine. While a python setup.py install after a git clone fails.
From #727 and the link he shared, it looked like issue was with the steps described here.

@Neeratyoy
Copy link
Contributor Author

@PGijsbers could you please opine on what is the expected behaviour in the installation from source for openml.

Currently following the steps in the doc do not work owing to this.
Is there a specific reason why we are not allowing python setup.py install to work.

Should we remove the documentation instruction then, or do something better than a direct system.exit().
@mfeurer

@Neeratyoy Neeratyoy requested a review from PGijsbers July 12, 2019 13:12
@mfeurer
Copy link
Collaborator

mfeurer commented Jul 12, 2019

We could edit the docs to be pip install . -e and remove the if statement?

@PGijsbers
Copy link
Collaborator

PGijsbers commented Jul 12, 2019

Installing from source should be done using pip install -e . not with python setup.py install. Looks like I forgot to update the docs 🤦‍♂

We moved away from python setup.py install because it would start building numpy, this is not necessary when installing through pip.

However, it looks like pip (in some cases) will install openml through calling python setup.py install. In this case the user is installing openml through pip but our setup script prevents the user from doing so. So rather than checking if the setup script is called through python setup.py install, we should see if python setup.py install is called by pip. I am not sure how to do that.

edit: I asked for some additional information. But if we can not reproduce the issue and/or solve it nicely, then just updating the documentation and removing the if-statement is fine with me. If possible though, I would like to keep it in if it does not hinder pip install.

@pganssle
Copy link

However, it looks like pip (in some cases) will install openml through calling python setup.py install. In this case the user is installing openml through pip but our setup script prevents the user from doing so. So rather than checking if the setup script is called through python setup.py install, we should see if python setup.py install is called by pip. I am not sure how to do that.

Yes, this is the case - even setup.py bdist_wheel might invoke setup.py install at some point, because of some implementation details of bdist_wheel.

This is one of the reasons we have been unable to just remove the setup.py install command, despite the fact that we are actively discouraging it.

I will comment in the issue thread, but I think the best way to fix this would be to stop enforcing the "don't run setup.py install" in your setup.py script, and possibly raise exceptions if some specific conditions are not met.

@mfeurer
Copy link
Collaborator

mfeurer commented Jul 26, 2019

This is superseded by #750.

@mfeurer mfeurer closed this Jul 26, 2019
@mfeurer mfeurer deleted the fix_727 branch November 12, 2019 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants