Skip to content

move platform check to import time not install time#92

Closed
rhelmer wants to merge 1 commit into
seb-m:masterfrom
rhelmer:import-time-fail
Closed

move platform check to import time not install time#92
rhelmer wants to merge 1 commit into
seb-m:masterfrom
rhelmer:import-time-fail

Conversation

@rhelmer
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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
Copy Markdown

#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