Is there a way to set the optimization level from the setuptools setup.py file? Is there any way to set the optimization level within setuptools? 
I've got lots of __debug__ style logging that isn't needed on release.
You control the use of .pyc vs .pyo with the -O switch on the Python command line.  Python won't even attempt to use .pyo files without the -O switch, so compiling your .py files to .pyo files at setup time won't help: you need to invoke your program with the -O switch, or the PYTHONOPTIMIZE environment variable.
Python Setuptools Distribute: Optimize Option in setup.py?