How to install with -O?

Michael Gilfix mgilfix at eecs.tufts.edu
Fri Nov 29 15:20:59 EST 2002


  Hi Aahz. So, I can just set the PYTHONOPTIMIZE variable in my
setup.py and python will take care of itself (both in unix n'
windows)? Perhaps I should work on a distutils patch...

                    -- Mike

On Thu, Nov 28 @ 19:56, Aahz wrote:
> In article <mailman.1038511660.30945.python-list at python.org>,
> Michael Gilfix  <mgilfix at eecs.tufts.edu> wrote:
> >
> >  Hi all. I've been using __debug__ in my python programs with the
> >hope to byte-compile my programs with -O on install and remove the
> >__debug__ code. However, I haven't figured out quite how to do this
> >with distutils, and some searching through the documentation didn't
> >reveal anything. Has anyone solved this problem?
> 
> Unfortunately, there are only two ways to force optimized mode: running
> "python -O" and setting PYTHONOPTIMIZE.

-- 
Michael Gilfix
mgilfix at eecs.tufts.edu

For my gpg public key:
http://www.eecs.tufts.edu/~mgilfix/contact.html




More information about the Python-list mailing list