how-lix-os-pkgs/py3-setuptools/default/conf.sh

27 lines
695 B
Bash
Executable File

#!/bin/sh
set -e
# thanks to the alpine linux contributors for demonstrating how to "de-vendor"
# this package.
rm -fr pkg_resources/extern setuptools/extern setuptools/_vendor
echo "
setuptools
pkg_resources" | while read _module; do
find . -name \*.py -exec sed -i \
-e 's/from '$_module.extern' import/import/' \
-e 's/from '$_module.extern'./from /' \
-e 's/import '$_module.extern'./import /' \
-e "s/__import__('$_module.extern./__import__('/" \
{} +
done
sed -e '/tag_build = .post/d' -e '/tag_date = 1/d' -i setup.cfg
sed -i -e "s|^#\!.*/usr/bin/env python|#!/bin/python3|" \
setuptools/command/easy_install.py
python3 bootstrap.py