Skip to content

upip: allow == to specify exact version#70

Open
chrisdecker1201 wants to merge 2 commits intopfalcon:masterfrom
chrisdecker1201:feature/define_version
Open

upip: allow == to specify exact version#70
chrisdecker1201 wants to merge 2 commits intopfalcon:masterfrom
chrisdecker1201:feature/define_version

Conversation

@chrisdecker1201
Copy link

As I wanted this feature in micropython (micropython/micropython#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.

@pfalcon
Copy link
Owner

pfalcon commented Nov 30, 2021

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.

@chrisdecker1201
Copy link
Author

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.

@chrisdecker1201
Copy link
Author

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

@chrisdecker1201 chrisdecker1201 changed the title allow == to specify exact version Nov 30, 2021
@pfalcon
Copy link
Owner

pfalcon commented Nov 30, 2021

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'>
>>> 
@chrisdecker1201
Copy link
Author

Okay. I'm getting closer :).

I could not compile pycopy due to this error pfalcon/pycopy#59

@chrisdecker1201
Copy link
Author

It should work now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants