Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #70832 > unrolled thread

optimized compile with egg files

Started byMatyas <msustik@gmail.com>
First post2014-05-01 18:00 -0700
Last post2014-05-01 18:00 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  optimized compile with egg files Matyas <msustik@gmail.com> - 2014-05-01 18:00 -0700

#70832 — optimized compile with egg files

FromMatyas <msustik@gmail.com>
Date2014-05-01 18:00 -0700
Subjectoptimized compile with egg files
Message-ID<b7c68fcb-4072-4cc6-b000-2313e8eae6f5@googlegroups.com>
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!

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web