Support installing the package inside a virtual environment.#40
Support installing the package inside a virtual environment.#40bartfeenstra wants to merge 6 commits intowendlers:masterfrom
Conversation
There was a problem hiding this comment.
Hi,
I don't get why the procedure for setting up a VENV should be as described here. Wouldn’t it be sufficient to do the following from within the mpfshell sources dir?
python3 -m virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
python setup.py install
Or maybe I am missing the point here?
|
Hi! I'm not sure I understand your question. Aren't the commands you shared here pretty much the same as the one in the PR, with the exception of a few clarifications as the python executable and virtual environment paths are up to the user? I guess it's a matter of how detailed you'd like the instructions to be. |
|
Hi, I don't see how anything is installed in the venv here .. So might be that only the activation is missing here. But still, then we don't need |
|
The activation was indeed missing and I had indeed missed the other documentation further in the file. I tried reproducing my original problem with the shebang ('fixed' by passing I also noticed you published the package on PyPI today (thanks!), so perhaps it would be best to recommend that approach combined with a virtual environment at the top of the file. The instructions could be made shorter and less likely to fail this way. What do you think of that? |
|
Hi,
And
|
The change to
setup.pyis necessary, but I'd have to look up the exact reason. Without the change, though, running this package using an environment-provided Python executable (which is what virtual environments do) is not possible on my system (testing on Python 2.7).The README now includes step-by-step instructions on how to set this up.
This PR works well with #39.
If #39 is merged before this one, this PR must first update README.md to change the manual Python package installations to
pip install -r requirements.txt.