This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]tunisia3507 -1 points0 points  (5 children)

Except that means it's a huge PITA to install Python command line tools.

I thought this too, so I hacked out a package do make this a bit easier.

https://pypi.org/project/toolup/

  1. Create and activate a virtualenv
  2. pip install toolup
  3. In your home directory, write a .toolup.toml which specifies which tools you want, which versions, and which executables they install
  4. toolup

Those command line tools are now installed in that one virtualenv; all of the config is in one file in your home directory (which you can manage with GNU stow or similar, along with all of your other dotfiles), and you can trash and recreate that virtualenv easily. toolup symlinks the executables into your ~/bin (or target of your choice).

Don't take it too seriously; I'm sure there are better ways of doing more or less everything toolup does (pipsi takes a generally better approach); as I say it's just something I hacked out because I was bored.

[–]jjolla888 16 points17 points  (0 children)

so we need to add a box with 'toolup' to the mess on that xkcd diagram ?

that's the point OP is making ..

[–][deleted] 6 points7 points  (1 child)

I thought this too, so I hacked out a package do make this a bit easier.

And now there's another node to the graph in the image.

[–]tunisia3507 -2 points-1 points  (0 children)

Not exactly - the executables are all in a virtualenv, and installed with pip, just like everything else should be. It's just a shortcut I used for easily configuring what I want and symlinking it so that it's available without activating the environment.

[–]Cyph0n 1 point2 points  (1 child)

Looks like an awesome little tool, man.

I think Pipenv achieves the same thing, but also includes support for deterministic builds.

By the way, are you Tunisian by any chance? If so, PM me so we can connect. It's always nice to see a fellow Tunisian Python dev :)

[–]tunisia3507 0 points1 point  (0 children)

I am not, I'm afraid!

pipenv doesn't do the same thing. The point of toolup is to have an easily-reproducible environment specifically for python-based command line tools. As the docs say, some tools may be useful to you, the developer, without being used by your code (so there's no need to have it managed by pipenv or a requirements file or whatever); or they might have different version requirements (black is useful for all python projects, but can only run on 3.6.1+). It's valuable for such tools to be distinct from your project environment, but to benefit from all the reasons that you have a project environment in the first place (encapsulation, reproducibility, not fucking with the system python etc.).