Skip to content

Minimal packaging for img2braille#8

Open
tueda wants to merge 2 commits intoTheFel0x:mainfrom
tueda:minimal-packaging
Open

Minimal packaging for img2braille#8
tueda wants to merge 2 commits intoTheFel0x:mainfrom
tueda:minimal-packaging

Conversation

@tueda
Copy link
Copy Markdown

@tueda tueda commented Aug 25, 2024

Since PR #7 still seems to be in the early draft stage, I would like to suggest another path to turn this program into a package. This PR allows the program to be installable via pip (or pipx) from GitHub:

pip install git+https://github.com/TheFel0x/img2braille.git

with fairly small changes, though it is not designed to be used as a library module.

(To make it installable from PyPI, you still need to upload it.)

The idea is basically to bundle a single file package (famous example: six). Because script.py is too general for a unique name, I renamed it to img2braille.py. pyproject.toml contains the package information (you need to review author information, etc).
The main "function" is added to img2braille.py for the main entry point of the executable (the whole program code is executed when img2braille is imported).

The following commands shows what happens (using my branch for now):

python3 -m venv .venv
. .venv/bin/activate
pip install git+https://github.com/tueda/img2braille.git@minimal-packaging
img2braille -h

I think this PR can be merged if @GideonBear agrees (I have marked it as "Draft" for now).

tueda added 2 commits August 25, 2024 12:52
The following pip command should work:

  pip install git+https://github.com/TheFel0x/img2braille.git

This installs the main executable as `img2braille`.
@GideonBear
Copy link
Copy Markdown
Contributor

Hey @tueda, tbh I'm probably never going to continue with #7 😅, so do what you (and @TheFel0x) want I guess. If you need anything else from me lmk!

@tueda
Copy link
Copy Markdown
Author

tueda commented Oct 5, 2024

OK, then I will convert this draft pull request to a regular pull request.

@tueda tueda marked this pull request as ready for review October 5, 2024 05:15
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

Successfully merging this pull request may close these issues.

2 participants