dansanderson / picotool

Tools and Python libraries for manipulating Pico-8 game files. http://www.lexaloffle.com/pico-8.php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make picotool available on PyPI

franciscod opened this issue · comments

It'd be really nice to do pip install picotool :) What do you think?

I've added a setup.py file for easier installation. I'm not sure I ever want to upload this to PyPI, but I'll consider it if picotool ever goes 1.0. :)

Hi, I followed the new instructions and doing a raw pip install . which generates the files (esp. p8tool) locally. As I see them in my VCS, I assume it's not exactly the intended process? I'm fine with having the built file locally, we could just add p8tool and the build/ folder to .gitignore, then I can manually symlink my ~/.local/bin/p8tool to this local p8tool.

However, I tried a pip install --user . and this one gave the expected result, installing p8tool directly in my ~/.local/bin. Maybe it's what you wanted us to do?

I know you can also sudo pip install . and that may put the binary in some /usr/bin, but I'm trying to work with user folders as much as possible so I didn't try this one. I think this one may also generate local files anyway.

These are just the standard behaviors of pip install, so the instructions are just meant to say "this is how to pip install a package from a directory." I agree that --user is the right method for anyone installing into their system's Python install (vs. a virtual environment). That might be worth mentioning in the docs, especially if I'm not going to upload to PyPI.

(I'm not entirely opposed to uploading to PyPI but I wanted to clean things up before doing so, so it's a pending item. I have an unfinished 0.2 that I haven't committed yet.)

Looks like pip is now able to auto-detect lack of permission when not using sudo and falls back to --user install:

$ pip install .

Defaulting to user installation because normal site-packages is not writeable

Then it installs it to $HOME/.local/bin/p8tool (may be configurable). Note that if you're a super user or has access to normal site-packages for some reason, you will still need --user to explicitly install in user directory.