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

python-curl: Add variant for Python3 #8325

Draft
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
1 participant
@BKPepe
Copy link
Contributor

BKPepe commented Mar 2, 2019

Maintainer: @valdi74
Compiled tested: cortexa53, Turris MOX, OpenWrt master
Run tested: cortexa53, Turris MOX, OpenWrt master (will be tested later that's why it's draft)

Description:

  • add Python3 variant (which was suggested in PR #4478 (comment))
  • simplify Makefile
python-curl: Add variant for Python3
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>

@BKPepe BKPepe force-pushed the BKPepe:python3-curl branch 2 times, most recently from d7b0f0b to 4e09d15 Mar 3, 2019

python-curl: build it with OpenSSL library
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>

@BKPepe BKPepe force-pushed the BKPepe:python3-curl branch from 4e09d15 to 120ec06 Mar 3, 2019

@BKPepe

This comment has been minimized.

Copy link
Contributor Author

BKPepe commented Mar 4, 2019

I don't know, how it is possible that PR #6191 was merged as you can see from my 2nd commit, I have applied it as well, but it is just wrong if you didn't compile libcurl yourself and install it! Since 30th December 2016 is used mbedTLS as default for curl openwrt/openwrt@5586800

root@OpenWrt:~# opkg install python-curl
Installing python-curl (7.43.0.2-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/arm_cortex-a9_vfpv3/packages/python-curl_7.43.0.2-1_arm_cortex-a9_vfpv3.ipk
Installing libcurl4 (7.64.0-1) to root...
Downloading http://downloads.openwrt.org/snapshots/packages/arm_cortex-a9_vfpv3/base/libcurl4_7.64.0-1_arm_cortex-a9_vfpv3.ipk
Configuring libcurl4.
Configuring python-curl.
root@OpenWrt:~# python
Python 2.7.15 (default, Mar 02 2019, 09:09:01) 
[GCC 7.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import curl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/curl/__init__.py", line 7, in <module>
    import sys, pycurl
ImportError: pycurl: libcurl link-time ssl backend (none/other) is different from compile-time ssl backend (openssl)
>>> 

If you want to get it to work, you need to remove libcurl4 (OpenWrt base packages) and use the libcurl, which was compiled together with python-curl! I doubt that many users did it.

The thing is that if I just add these patches to detect it, then you can see in log from circleci.

Using curl-config (libcurl 7.64.0)
Not using an SSL library

Nowadays SSL is must have. Otherwise, python3-curl works:
screenshot from 2019-03-04 15-31-53

I'll look, what's necessary to be done to compile python-curl as well with mbedTLS.

@BKPepe BKPepe referenced this pull request Mar 8, 2019

Open

Add support for mbedTLS #553

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.