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

move platform check to import time not install time #92

Closed
wants to merge 1 commit into from

Conversation

rhelmer
Copy link

@rhelmer rhelmer commented Feb 3, 2015

I'd like to use pyinotify for an optional feature, but I can't add it to my requirements.txt because pip install will fail for devs on non-Linux platforms (Mac being the most prevalent)

What do you think about moving the platform check into the module so it runs at import time (like the existing Python version check)?

@seb-m
Copy link
Owner

seb-m commented Feb 6, 2015

Hello Robert,

I'm not sure about that, it doesn't seem right to me to allow installs on systems known not to support inotify. The problem is that it's just for bypassing the issue that pip is unable to express conditional requirements based on platforms. I don't know if it could solve your issue but after searching a bit I've found this idea it could help I think.

@rhelmer
Copy link
Author

rhelmer commented Mar 13, 2015

@seb-m thanks for the response (which I somehow managed to miss until now :/)

The problem in our case is that we don't install from setup.py, we provide a requirements.txt with the versions we want to ship explicitly pinned.

I agree that the problem is pip unable to express conditional requirements :/ I guess I could split requirements.txt into multiple files, I was just hoping for something less burdensome on people installing my app.

@peterbe
Copy link

peterbe commented Jan 7, 2016

Any more thoughts on this @seb-m ?
To iterate @rhelmer 's point. The problem is that we can't do this: pip install -r requirements.txt because once it comes across your pyinotify it bails the process. The requirements.txt file just a text file and not something we can insert conditionals into.

One thing we (I work with @rhelmer) is that we can break out pyinotify from our requirements.txt and have an additional file only to be used by people on Linux.

@julianhille
Copy link

#120 adde parameter on installation which allows to install even if platform is not supported

@rhelmer rhelmer closed this Aug 12, 2024
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.

4 participants