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

Questions on virtual environment #7

Open
dev-abir opened this issue Nov 8, 2020 · 4 comments
Open

Questions on virtual environment #7

dev-abir opened this issue Nov 8, 2020 · 4 comments

Comments

@dev-abir
Copy link
Contributor

dev-abir commented Nov 8, 2020

Why the project directory needs to be a virtualenv? I have my virtualenv elsewhere.

I am not very experienced in python, is it a convention just to put virtualenv in the project directory, and gitignore/delete them manually later?(I don't think so...)

To get path of virtualenv, one can just use VIRTUAL_ENV environment variable, it is much robust(though I am not sure whether it works with all virtual environment packages or not). Moreover should we enforce everyone to use a virtualenv?

@mbideau
Copy link
Owner

mbideau commented Nov 8, 2020

Hi @dev-abir,

The project directory doesn't have to be a Python virtualenv at all.
You can have your Python virtualenv wherever you want.

It is not a convention to mix the virtualenv and the sources, it might even be a bad practice, but I put it like that in the README because it is convenient/easy to setup this way.

I don't think it is worth mentioning in the README that the Python virtualenv can be elsewhere because I think that most experienced Python user will know how to customize their Python environment.

What do you think ?
Did it break your user experience or make it really hard to make the program to work ?

Again, thank you for your feedback 🙏

@dev-abir
Copy link
Contributor Author

dev-abir commented Nov 8, 2020

I just needed to change just 2 lines to run run_some_tests.sh, nothing else

The script assumes that the source directory is the virtualenv... And spits errors, if not so...

You can just change python_bin="$project_dir"/bin/python3 to python_bin="$VIRTUAL_ENV"/bin/python3 to make it more robust.

@mbideau
Copy link
Owner

mbideau commented Nov 8, 2020

I changed the path of the python3 binary according to your suggestion in commit 9161038.

Can you test your setup with it and tell me if it is okay for you ?

Thank you in advance 🙏

@dev-abir
Copy link
Contributor Author

I have added some comments on your commit see this

Not sure, if it's the right place... Maybe I should have told that here...

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

No branches or pull requests

2 participants