Skip to content

Instantly share code, notes, and snippets.

@SonoSooS
Created December 21, 2016 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SonoSooS/738bcc4e27107d4e4c8484771b48828d to your computer and use it in GitHub Desktop.
Save SonoSooS/738bcc4e27107d4e4c8484771b48828d to your computer and use it in GitHub Desktop.
Python distutils bug workaround
#!/bin/bash
while :; do
ASD="$(env CC=gcc python3 setup.py build 2>/dev/null)"
if [ $? -eq 0 ]; then
echo "yay, success"
break
fi
CMD="$(echo "$ASD" | tail -n1 | sed 's/^x86_64-linux-gnu-gcc/gcc/')"
eval $CMD
if [ $? -ne 0 ]; then
echo "error, ffs"
echo "$ASD"
break
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment