shiv
shiv copied to clipboard
What is the right path for --site-packages?
Dear developers,
I was wondering what is the right path to specify --site-packages. Is it the path of the virtualenvironment or the path of size-packages? Concretely, which one is correct?
-
shiv --site-packages .venv/lib/python3.11/site-packages/ --compressed -p '/usr/bin/env python3.11' -o executable-name -e path.to.main.py -
shiv --site-packages .venv/ --compressed -p '/usr/bin/env python3.11' -o executable-name -e path.to.main.py
Thank you so much.
Based on my limited experience, your first example is correct, it should be the full path to the site-packages folder.
It seems to be a bug..
I'm doing this:
shiv --compressed -e myproject.cli:cli -o myproject.pyz
-p '/usr/bin/env python3.12' --no-build-isolation
--site-packages .venv/lib/python3.12/site-packages
But shiv is downloading packages again
Collecting python-dotenv>=0.21.0 (from pydantic-settings->myproject==4.1.0rc1)
Downloading https://artifactory/api/pypi/python/packages/packages/5f/ed/539768cf28c661b5b068d66d96a2f155c4971a5d55684a514c1a0e0dec2f/python_dotenv-1.1.1-py3-none-any.whl (20 kB)
Building wheels for collected packages: airspeed