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

gitignore: Add Python venv folder #24803

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

nexton-winjeel
Copy link
Contributor

I often use a Python virtual environment to ensure I'm using the correct versions of Python modules. This PR adds the default venv folder to the .gitignore.

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Aug 29, 2023

Hey there, Ardupilot already creates a virtual environment in ~/venv_ardupilot, which is the default. Have you tried using that one?

@nexton-winjeel
Copy link
Contributor Author

Hi @Ryanf55, my issue is that I've got a couple of different forks, so I want to be able to set a venv per repo, not per machine.

Copy link
Contributor

@khancyr khancyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Environments

.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

from https://github.com/github/gitignore/blob/4488915eec0b3a45b5c63ead28f286819c0917de/Python.gitignore#L125

Not sure why we would need to check subdirectory ?

@nexton-winjeel nexton-winjeel force-pushed the upstream/ignore-python-venv branch from 9287371 to 2ce5c4a Compare August 29, 2023 12:06
@nexton-winjeel
Copy link
Contributor Author

Not sure why we would need to check subdirectory ?

Do you mean why did I add **/venv/ rather than venv/? Because I wanted to be able to create a venv on a per-vehicle basis, and I thought I needed the ** to achieve that.

Updated.

@nexton-winjeel
Copy link
Contributor Author

@khancyr: I've updated to include all the different Python environment folders.

@tridge tridge merged commit 2e84e27 into ArduPilot:master Sep 6, 2023
@nexton-winjeel nexton-winjeel deleted the upstream/ignore-python-venv branch September 7, 2023 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants