Hacker News new | ask | show | jobs
by Znafon 1044 days ago
Yes, you can do this: https://pip.pypa.io/en/stable/topics/vcs-support/
1 comments

That is pretty awesome!

Why is all the "wheels", "eggs", "PyPi" ... stuff needed then?

Wheels are essentially zip files with all the code required to run it contained in one handy little file for all platforms that the package maintainer chooses to build for. Instead of having to download the source of the packages and building on your machines, you have a cache-able neat little file that contains potentially everything you need to use the package. It makes package installations way faster because it skips the build steps and will ship all the binaries required to run the package (ideally). Eggs were this but are not in use anymore in favor of using wheels. Pypi is the package repository for python packages just like npm
Because so much Python code binds to C extensions that you will need to compile for the correct platform. For instance the new version of Pydantic is now backed by Rust. To avoid everyone having to compile the rust code on their platform, you can upload it pre-compiled for linux, windows etc.
Some packages require build-time dependencies not everyone has, like cryptography now requiring Rust. Some packages like SciPy take a very long time to build, and require a Fortran compiler.
pypi is needed because those personal webservers will inevitably go down. why not github? well, it didn’t use to exist before pypi and it microsoft may still pull a good one

eggs and wheels solve binary distribution between other things, so you can install something that requires compilation without having a compiler or the development libraries installed and to avoid bundling files unnecessary during runtime.

a lot of Python packages contain parts written in native code (often C or Rust) for performance reasons.

pip _can_ compile the code at install-time if your PC has the right build tools -- or it can download pre-built binaries for your host in the form of a "wheel".

pypi has a little more metadata than a git repo, and a place to host version-controlled binaries.

New college grad needs something todo?
Probably Ruby owns the award for the worst package names. Can you guess what Sorbet is doing in Ruby ? Or Oniguruma ? Or Ahoy ? Or Figaro ?