python,python3: add option to keep egg-info dirs for python packages

That way some python packages can choose
to keep their egg-info dirs, if they want to, or they're needed.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
Alexandru Ardelean
2017-10-02 15:43:52 +03:00
parent 64db240f13
commit 074d2863be
6 changed files with 16 additions and 4 deletions

View File

@@ -47,7 +47,8 @@ process_filespec "$src_dir" "$dst_dir" "$filespec" || {
}
# delete egg-info directories
find "$dst_dir" -name "*.egg-info" | xargs rm -rf
[ "$PYTHON3_KEEP_EGGINFO" == "1" ] || \
find "$dst_dir" -name "*.egg-info" | xargs rm -rf
if [ "$mode" == "sources" ] ; then
# Copy only python source files