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

BLD: Install dependencies if cannot be imported. #300

Merged
merged 1 commit into from Sep 24, 2014
Merged

BLD: Install dependencies if cannot be imported. #300

merged 1 commit into from Sep 24, 2014

Conversation

jseabold
Copy link
Contributor

Should provide a middle ground for #169, #277, #285.

These are the same changes that were made to statsmodels in statsmodels/statsmodels#1902

I feel partially responsible for the bombardment of unhelpful/semi-rude issues you've had to field.

@mwaskom
Copy link
Owner

mwaskom commented Sep 24, 2014

Ah, clever!

mwaskom added a commit that referenced this pull request Sep 24, 2014
Determine install_requires from missing packages at install-time
@mwaskom mwaskom merged commit 4cbbdfd into mwaskom:master Sep 24, 2014
@mwaskom
Copy link
Owner

mwaskom commented Sep 24, 2014

Thanks!

@jseabold
Copy link
Contributor Author

@mwaskom Did you test this? I could have sworn it worked for me yesterday on a clean install, but I'm having issues now.

@mwaskom
Copy link
Owner

mwaskom commented Sep 25, 2014

Heh, I did not, it looked very straightforward! :/

On Thu, Sep 25, 2014 at 1:19 PM, Skipper Seabold notifications@github.com
wrote:

@mwaskom https://github.com/mwaskom Did you test this? I could have
sworn it worked for me yesterday on a clean install, but I'm having issues
now.


Reply to this email directly or view it on GitHub
#300 (comment).

@mwaskom
Copy link
Owner

mwaskom commented Sep 25, 2014

Hm, can confirm that it seems not to work properly, though.

@mwaskom
Copy link
Owner

mwaskom commented Sep 25, 2014

I think it has something to do with the existence of the local seaborn.egg-info/ directory.

@jseabold
Copy link
Contributor Author

That would make sense. I don't think I tried it from a source distribution only from a clean checkout.

@jseabold
Copy link
Contributor Author

Yeah, I have no idea what's going on here but don't want to dig into it. Indeed, if your source distribution has an .egg-info file, then pip finds it and ignores the requires.txt (which may be incorrect, anyway, if you build the sdist in an environment that has the dependencies). We formerly had a custom sdist command that didn't add the egg-info. Now I'm just going to exclude it using MANIFEST.in. Will let you know if I get to the bottom of it.

@jseabold
Copy link
Contributor Author

Unfortunately, it doesn't look like removing the egg-info from the sdist has any effect.

@jseabold
Copy link
Contributor Author

Ok easy fix actually. You can just remove the the sys.argv check. Worst case, you don't have those packages, no error is raised, they're installed by pip. Best case, they're found. No pip upgrade behavior. I think that's right...

@mwaskom
Copy link
Owner

mwaskom commented Sep 26, 2014

Ah, because we won't get ImportErrors raised anymore so things like pip install pandas seaborn should still work?

@jseabold
Copy link
Contributor Author

I'll have to check that for sure. But, yes, I think it would work here. Never raises an error and adds to installation list if it needs to.

For future reference for people who want to complain. Here's the 3 year old bug report for pip on the recursive upgrade behavior being a bug and their devs stating it's a bug [1]. Hopefully, we can at least get some traction from this soon [2].

[1] pypa/pip#304
[2] pypa/pip#59

mwaskom added a commit that referenced this pull request Sep 27, 2014
This is a followup to GH-#300. Now that the setup.py won't raise an
ImportError, we no longer need to protect the dependency check during
some modes of setup processing.
@mwaskom
Copy link
Owner

mwaskom commented Sep 27, 2014

OK see #306 for what I think is a solution.

@jseabold
Copy link
Contributor Author

Looks right to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants