How can I provide "--compile --install-option='--with-openssl' pycurl" these options while adding pycurl dependency? #6814
-
My Project required pycurl as dependency and i have added it via 'poetry add pycurl'. Its get added but while importing module its showing following error. And to resolve this i need to add "--compile --install-option='--with-openssl'" these options while adding dependency. Is there any way to add those options? and it should support in 'poetry install' command also. Thanks.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This is not possible currently, and I do not see such a feature ever being on the roadmap. The python ecosystem is very much moving towards installing things from wheels, not from source. If you really need something from the curl package, I would build it into a wheel and use that. I would then push those patches upstream. Otherwise, I'd strongly recommend that you look at using packages that provide similar functionality, and are packaged as wheels, requests, for example. |
Beta Was this translation helpful? Give feedback.
-
I don't think this is a good or satisfying solution. You suggest using another package only because of this issue -- indeed requests or urllib3 are alternatives of pycurl for maybe 90% of the use cases, but they can not do everything that pycurl can; there is a reason why pycurl exists. And this approach also suggests that installing a package linked against two pretty standard C libraries (libcurl & openssl) is an impossible task for pip and poetry. Which is not true, we install these kind of packages all the time. Pycurl is not distributed as wheel in PyPI, and I think for a good reason: to force pip to compile it locally, hence to link it against the library versions available on the target system. If it was distributed as a wheel, it would very often throw an import error like If pycurl is compiled by pip on a correctly configured system it should work just fine. I think
Some packages such as |
Beta Was this translation helpful? Give feedback.
This is not possible currently, and I do not see such a feature ever being on the roadmap.
The python ecosystem is very much moving towards installing things from wheels, not from source.
If you really need something from the curl package, I would build it into a wheel and use that. I would then push those patches upstream.
Otherwise, I'd strongly recommend that you look at using packages that provide similar functionality, and are packaged as wheels, requests, for example.