News for hackers. Stuff that matters.
Re:Pipfile for Python by marcosdumay on Tuesday November 22, 2016 @08:55AM (#13014105)
Is it so much trouble? How often do you type 'pip install -r requirements.txt' outside of a script?

Personally, I'm in the "whatever" camp. But you can be certain that such a change will break something.

Re:Pipfile for Python by lukeschlather on Tuesday November 22, 2016 @10:32AM (#13014745)
For me it's more about encouraging good behavior. While it's common to pip install random packages, that should really be the exception rather than the rule. Usually you should make a project, add some packages, and run `pip install`.

Right now, the whole system encourages you to build bespoke environments that are really difficult to replicate. Making the default use requirements.txt encourages you to write down everything you're doing in a reproducible way.

Re:Pipfile for Python by xapata on Tuesday November 22, 2016 @12:03PM (#13015468)
> write down everything you're doing in a reproducible way

Making `pip install` context-sensitive (dependent on the current working directory) would reduce reproducibility. Imagine the instructions to a beginner: (1) download, (2) cd, (3) pip install. Many times the beginner will skip step 2 or accidentally wind up in the wrong directory.

Re:Pipfile for Python by lukeschlather on Tuesday November 22, 2016 @12:34PM (#13015707)
I really think the average beginner is not somebody who knows nothing about packaging, but someone like me who knows a lot about other packaging systems. When I started with pip a few months ago, everything was confusing, largely because pip has confusing conventions that don't match tools like bundler, cargo, and npm that I'm more familiar with.

I do think you're misrepresenting the instructions to the beginner. The instructions to the beginner are (1) download (2) cd (3) run tox.

Beginners shouldn't even need to know what pip is, tox (or another build tool) should handle everything for you.

Re:Pipfile for Python by xapata on Tuesday November 22, 2016 @12:52PM (#13015894)
> The average beginner is ... someone like me

When I say "beginner" I mean someone who is learning their first programming language and may have never opened Terminal or `cmd.exe` before.

> run tox

I thought the argument above was that the command should be `pip install`. This is confusing.

> Beginners shouldn't even need to know what pip is

Ok, in that case, why do you care whether `pip install` has an implicit default mode?

Re:Pipfile for Python by lukeschlather on Tuesday November 22, 2016 @03:38PM (#13017443)
My preference would be that pip install only has one mode. Realistically, there is going to be backwards compatibility stuff, but ideally, even in advanced use you should never have a reason to use anything other than pip install, and the rest should be specified in config files.
Re:Pipfile for Python by xapata on Wednesday November 23, 2016 @01:58AM (#13020682)
You could write a make file that does the install. That'd solve the one-command desire.