Skip to content

Support pip #1983

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

Closed
5 of 6 tasks
BenLewis-Seequent opened this issue Jul 5, 2020 · 7 comments
Closed
5 of 6 tasks

Support pip #1983

BenLewis-Seequent opened this issue Jul 5, 2020 · 7 comments

Comments

@BenLewis-Seequent
Copy link

BenLewis-Seequent commented Jul 5, 2020

To support pip the following are required:

  • __class__ assignment(Support assigning to __class__ #1981)
  • plistlib which requires xml.parsers.expat
  • Fix shutil.get_terminal_size
  • itertools.groupby
  • Fix str.__add__ raising TypeError instead of returning NotImplemented
  • Fix "{x.attr}".format(...)

If the above issues are worked/hacked around, then the pip help text is successfully displayed 🎉:

ben@BenLinux:~/Hobby/RustPython$ RUSTPYTHONPATH=Lib:local_packages/ cargo run --release local_packages/pip 
    Finished release [optimized] target(s) in 0.12s
     Running `target/release/rustpython local_packages/pip`

Usage:   
  pip <command> [options]

Commands:
     install Install packages.
    download Download packages.
   uninstall Uninstall packages.
...
@coolreader18
Copy link
Member

The thing about str.__add__ is that it's actually the slot sq_concat, that gets mapped to the wrapper method __add__. When we do a + b, what needs to happen is:

  1. Check if a has the slot nb_add/magic method __add__
  2. Check if b has nb_add (I think?) or __radd__
  3. Then, look at sq_concat for a (and maybe b if it doesn't have it, but I don't think so).

@coolreader18
Copy link
Member

Also, I've looked into binding to expat, and it might be easier to just skip importing plistlib for the time being, since I think it's used in a very niche way in pip.

@jamestwebber
Copy link
Contributor

Whoa is this all? I was checking the dependencies as described in this post and it seemed a lot hairier. I would guess that to actually pip install will require many more things working.

@BenLewis-Seequent
Copy link
Author

Yes that everything(I think), we have got most of core standard library importable at this point. I'm also expecting pip install to require more changes than this.

@mireille-raad
Copy link
Member

mireille-raad commented Mar 30, 2021

isn't this done? should issue be closed?

@infopensource
Copy link

How can i install this fucking pip!!!!!!!!!!

@mireille-raad
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants