pyinotify icon indicating copy to clipboard operation
pyinotify copied to clipboard

move platform check to import time not install time

Open rhelmer opened this issue 10 years ago • 4 comments

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)?

rhelmer avatar Feb 03 '15 18:02 rhelmer

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.

seb-m avatar Feb 06 '15 07:02 seb-m

@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.

rhelmer avatar Mar 13 '15 22:03 rhelmer

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.

peterbe avatar Jan 07 '16 17:01 peterbe

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

julianhille avatar Apr 04 '16 11:04 julianhille