upip: allow == to specify exact version
As I wanted this feature in micropython (https://github.com/micropython/micropython/pull/8033) I think It would be nice to have it here too.
I can't test it because I could not find out how to get the ussl library.
Maybe someone can test it for me or explain me how I get the ussl library.
Thanks for the patch, but for starters, what is the usecase for it?
Then, it clearly has a mistake in the code.
Also, see https://github.com/pfalcon/pycopy-lib#contributing for contribution guidelines (format of commit messages, etc.)
or explain me how I get the ussl library.
It's builtin. I.e., when you build https://github.com/pfalcon/pycopy/ binary, you have it.
I really like to define the exact version of a package. So this change would be nice. If I write a script which installs all my packages, I'm not sure (at the moment) that I'll get the same or working program.
If I can specify the exact version, I can make sure I've always the same outcome.
I'll check for the error in the merge request.
I've problem getting it all to run. Maybe you can help me.
I've installed ssl, ussl and upip
make install MOD=ssl
make install MOD=cpython-ussl
make install MOD=upip
But I'm getting this error when I execute this script
import sys
sys.path.append("")
from upip import install
packages = [
"micropython-uuid==0.1",
]
install(packages, "modules")
AttributeError: 'module' object has no attribute 'SSLContext'
And when I look into ussl I don't find any SSLContext class only in ssl. But I'm sure that's all because I do not understand everything at the moment :)
Yeah, https://www.chiark.greenend.org.uk/~sgtatham/bugs.html is dedicated to such matters ;-)
$ pycopy
Pycopy v3.6.0-111-gf540e689dd on 2021-09-16; linux version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> import ussl
>>> ussl.SSLContext
<class 'SSLContext'>
>>>
Okay. I'm getting closer :).
I could not compile pycopy due to this error https://github.com/pfalcon/pycopy/issues/59
It should work now :)