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

Added setuptools structure to enable installation #26

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rikwade
Copy link

@rikwade rikwade commented Feb 17, 2021

Added setup.py for setuptools installation support using Pip
Changed pico_generator to include a main() function for script execution when installed
GIF and TSV copied to installation directory
Changed pico_generator to read TSV file from current installation directory
Added section to README for Pip installation

@JamesH65
Copy link
Contributor

@lurch These changes look sane to me but I am not a Python expert, any comments from you?

README.md Outdated Show resolved Hide resolved
@lurch
Copy link
Contributor

lurch commented Mar 8, 2021

Sorry, I hadn't seen this before, oops. The changes to pico_project.py look good (although you'll obviously need to rebase onto the latest changes), but I'm afraid I've never written a setup.py script. Don't most projects that use pip use it to install stuff from PyPI? Is it absolutely necessary to move the repo-files into a subdirectory?

@JamesH65 JamesH65 added the question Further information is requested label Mar 10, 2021
@rikwade
Copy link
Author

rikwade commented Mar 10, 2021

Don't most projects that use pip use it to install stuff from PyPI? Is it absolutely necessary to move the repo-files into a subdirectory?

Yes, making the package available on PyPi is also possible. Ref: https://packaging.python.org/tutorials/packaging-projects/. Structure is similar to the one I'm making.

I would have preferred to have kept the files in the root directory. It seems that having a subdirectory with the Python package (application in our case) name is "standard". Refs:
https://docs.python-guide.org/writing/structure/
https://realpython.com/python-application-layouts/

@lurch
Copy link
Contributor

lurch commented Mar 10, 2021

Fair enough, always good to adhere to standards 🙂

rikwade added 2 commits March 11, 2021 23:36
…ng setuptools

Re-structured directory tree to permit setuptools installation
Added "main" function definition in pico_project.py to permit executable installation using setuptools
Updated pico_configs.tsv configuration file read function to read from python script installation directory
@rikwade
Copy link
Author

rikwade commented Mar 11, 2021

Sorry, I hadn't seen this before, oops. The changes to pico_project.py look good (although you'll obviously need to rebase onto the latest changes), but I'm afraid I've never written a setup.py script. Don't most projects that use pip use it to install stuff from PyPI? Is it absolutely necessary to move the repo-files into a subdirectory?

Have rebased as requested and put pip installation as "optional" and at the foot of the README.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
pico_project/pico_project.py Outdated Show resolved Hide resolved
Updated pico_project to move default tsv file specification to argparse
function.
pico_project/pico_project.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants