Reputation: 999
When I make pip install .
, it takes too much time. I need to do it from time to time (it's my local repo).
But I have the large TrashScripts
folder (~ 10GB) inside my package.
My git repo doesn't have lots of files inside that folder. But sometimes I gather logs, download a lot of files, etc.
Suppose, my package has name MyPackage
. It has the following structure:
--MyPackage
--MyPackage
--module
--module1
--bins
--TrashScripts
--folder1
--folder2
--folder3
setup.py
requirements.txt
MANIFEST.in
MANIFEST.in is the following:
graft MyPackage
include bins/some.dat
PRUNE word in MANIFEST didn't work.
When I use -v
parameter (for pip install .
), it shows me that the first command is creating a temporary folder with copying TrashScripts
folder (and everything inside it!).
How can I prevent pip install .
from copying all files from TrashScripts
folder?
Upvotes: 1
Views: 1590
Reputation: 12335
If you already have your repo locally you can make an editable install:
pip install -e .
This will only put a reference to your local folder into the Python site-packages folder and no data is copied. You can even continue editing and there is no need ever to reinstall the package.
Upvotes: 4