optimized compile with egg files

M

Matyas

Our project is using setuptools to compile. I noticed that by default

python setup.py build

will create .pyc files which I assume are archived into the egg file. I do not know yet how to verify what is in the egg file.

I tried using

python setup.py build_py -O1
python setup.py install --user -O1

in my attempt to compile to .pyo files. Indeed the output indicates that .pyo files are created (I can see them in build/lib.macos-10.9-x86_64-2.7/...)

However I still see the some files being bytecompiled to .pyc files as well. I am not sure where these end up, I cannot find them.

Well I guess I hope for some direction on how to compile optimized using setuptools.

Then how to run the optimized version of the modules? Often we use nosetests to run and nosetests does not take a -O parm like python. Also ipython does not like -O either.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top