2020-02-28 19:45:23 +00:00
|
|
|
poetry2nix-fixup-hook() {
|
2022-02-05 21:32:09 +12:00
|
|
|
|
2020-02-28 19:45:23 +00:00
|
|
|
# Including tests in the output is a common mistake
|
|
|
|
if [ -z "${dontFixupTests-}" ]; then
|
2022-02-05 21:32:09 +12:00
|
|
|
rm -rf $out/@pythonSitePackages@/tests
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Including files in site-packages is a common packaging mistake
|
|
|
|
#
|
|
|
|
# While we cannot remove all normal files dumped in site-packages
|
|
|
|
# we can clean up some common mistakes
|
|
|
|
if [ -z "${dontFixupSitePackages-}" ]; then
|
|
|
|
for f in @filenames@; do
|
|
|
|
rm -f $out/@pythonSitePackages@/$f
|
|
|
|
done
|
2020-02-28 19:45:23 +00:00
|
|
|
fi
|
2022-02-05 21:32:09 +12:00
|
|
|
|
2020-02-28 19:45:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
postFixupHooks+=(poetry2nix-fixup-hook)
|