Skip to content
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

Comparison to existing library #1

Open
freeman-lab opened this issue Nov 14, 2015 · 2 comments
Open

Comparison to existing library #1

freeman-lab opened this issue Nov 14, 2015 · 2 comments

Comments

@freeman-lab
Copy link
Owner

There's a python package by @emallson called nppm with similar interests but a different approach.

https://github.com/emallson/nppm

That library introduces a npm-like package.json, and seems to focus on dependency / environment management, as opposed to streamlining the process of creating and publishing, which was the primary interest here. Still, definitely worth exploring overlap / opportunities.

@danielballan
Copy link

See also https://pypi.python.org/pypi/flit

@emallson
Copy link

Hey! I got the notification about this issue and thought I'd chime in.

You got my focus right: my motivation was frustrations with keeping the requirements.txt up-to-date. This is a continual problem that I have with python projects that I rarely encounter in node because of how simple npm makes it. I had several instances where I was given a requirements.txt that was incomplete, and had to spend time digging through the code to determine the complete dependency list. This was doubly frustrating for dependencies that were only imported late in a long-running process (e.g. joblib being imported to save the output of an algorithm that took hours to run)

At this point, nppm is sort-of abandonware. I am not actively using or updating it, but if any issues come up I'll fix them.

I'm definitely interested in the overlap of these two projects because in some sense they are two sides of the same coin. Dependency management is crucial for publishing working modules, and having published working modules is necessary for dependency management to be useful. One idea I explored but never wrote code for was the possibility of having a generic setup.py that would read relevant information from my package.json to be able to publish a package.

One limitation of my approach was that by building on top of pip, I could not introduce the strict version-checking that I wanted. For example, with pip if you specify a dependency on A that depends on B-1.2 and later specify a dependency on B-2.4, the version of the second dependency will be silently ignored (if memory serves) instead of producing a warning or error. Ideally, this would produce a warning. I'm sure there are other problems (like it breaking with every pip version bump because I (ab)use some internal APIs), but that one sticks out in my memory as one that couldn't be fixed without dropping or modifying pip.

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

3 participants