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

Add setup.py to allow pip install #458

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

phistrom
Copy link

@phistrom phistrom commented Mar 22, 2024

Clone this repository and use python setup.py install . After install, gyb can be used on the command line anywhere (client_secrets.json and oauth2service.json need to be in the current directory or use --config-folder).

For installation, you could also use pip install git+https://github.com/GAM-team/got-your-back.git if this PR is accepted. (pip install got-your-back might be possible if Mr. Lee wishes to use twine to upload the package to PyPI).

While I would have liked to import from gyb.py on line 4 of setup.py, the packages in that module may not have been installed yet, leading to an import error. In an effort to modify as little of the original code as possible, I copied the values of the __author__, __email__, __program_name__, and __version__ to get around this.

Line 56 of setup.py adds gyb to the PATH. Tested on Windows (Python 3.12), MacOS (Python 3.11), and the python:3.12-slim Docker container (Debian Linux).

The original gyb.py script was modified as minimally as possible to allow setup.py to make an entry point script. The behavior should be precisely the same whether or not it was installed with pip.

Relevant issues:
#239
#379

After install, "gyb" can be used on the command line anywhere.
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.

None yet

1 participant