Hacker News new | ask | show | jobs
by pseudalopex 2175 days ago
What's the matter with publishing to PyPI or hosting your own instance?

The Python ecosystem makes publishing binary packages easy. node-pre-gyp might come close if you use S3.

The most used NPM packages[1] overlap with Python's argparse, datetime, glob, os, shutil, uuid, and xml modules.

[1] https://www.npmjs.com/browse/depended

1 comments

>What's the matter with publishing to PyPI

This is a succinct guide to publishing a PIP package: https://medium.com/@joel.barmettler/how-to-upload-your-pytho...

An npm publish requires you to run `npm publish`, assuming your `package.json` points to the entrypoint of your code. Remember: `package.json` is pre-populated when you start your project with `npm init`.

Also, I was able to run my own NPM instance with a zero-config tool, I expect Python has parity there.

Anyways, pip... Just the other day, I went to use a Python project I had been regularly using, and without any changes to Python, my OS, pip, or the project, it completely started failing. Some errors that the `ssl` module wasn't available. How can a module not be available? There was no easy solution, all to something triggered by nothing. This install was literally done thru a source-controlled script too. It's a pretty awful situaton.

Anyways, NPM has never so wholly failed me, and in the worst cases where it fails it usually has helpful messages directing the user what to do.

That plus tools `npx` make it pretty clear to me, Python is literally version and dependency hell. NPM has had this all on lock for years now