Skip to content

Conversation

@mmarchetti
Copy link
Contributor

Description

We exclude some directories from bundling, including common virtual environment directories (env, venv, .env, and .venv). With the change in #198, virtual environment directories are excluded based on the presence of bin/python, so the exclusion by name is no longer needed.

Testing Notes / Validation Steps

In the directory you are going to deploy, create a virtualenv with one of the names listed above. Ensure that it is not included in the bundle.

@shapiromatron
Copy link

On windows, there is a scripts/python.exe - would this not work on windows? - see #285, I cant seem to ignore my venv on windows

@mmarchetti mmarchetti linked an issue Oct 16, 2023 that may be closed by this pull request
@mmarchetti mmarchetti requested review from tdstein and removed request for bcwu October 16, 2023 12:26
@github-actions
Copy link

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
4294 2791 65% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
rsconnect/bundle.py 80% 🟢
TOTAL 80% 🟢

updated for commit: 749a839 by action🐍

@mmarchetti
Copy link
Contributor Author

#472 fixes Windows virtualenv detection so this can be merged.

@kgartland-rstudio
Copy link
Contributor

kgartland-rstudio commented Oct 16, 2023

validated on Windows with an env, .env, venv, .venv virtualenv in deploy directory.

bundle dir on Connect:

total 1040
drwxr-x--- 3 rstudio-connect rstudio-connect   4096 Oct 16 13:36 ./
drwx------ 4 root            root              4096 Oct 16 13:36 ../
-rw-r----- 1 rstudio-connect rstudio-connect    504 Mar 22  2023 README.md
-rw-r----- 1 rstudio-connect rstudio-connect   2331 Oct 10 13:49 main.py
-rw-r----- 1 rstudio-connect rstudio-connect    725 Jan  1  1970 manifest.json
-rw-r----- 1 rstudio-connect rstudio-connect 981128 Mar 22  2023 prices.csv
drwxr-x--- 2 rstudio-connect rstudio-connect   4096 Oct 16 13:36 python/
-rw-r----- 1 rstudio-connect rstudio-connect     37 Jan  1  1970 requirements.txt
-rw-r----- 1 rstudio-connect rstudio-connect  49453 Mar 22  2023 thumbnail.jpg
``

@mmarchetti mmarchetti merged commit 21acd6b into master Oct 16, 2023
@mmarchetti mmarchetti deleted the mm-limit-excludes branch October 16, 2023 16:52
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.

preserve .env files; ignore .env directories

5 participants