optimized compile with egg files

Discussion in 'Python' started by Matyas, May 2, 2014.

  1. Matyas

    Matyas Guest

    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!
    Matyas, May 2, 2014
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nagaraj
    Replies:
    1
    Views:
    842
    Lionel B
    Mar 1, 2007
  2. Stef Mientki
    Replies:
    4
    Views:
    397
  3. Catherine
    Replies:
    2
    Views:
    308
    John Nagle
    Oct 8, 2007
  4. R. Bernstein
    Replies:
    3
    Views:
    361
    R. Bernstein
    Dec 21, 2008
  5. Patrick

    Optimized count of files in tree

    Patrick, Aug 12, 2007, in forum: Perl Misc
    Replies:
    7
    Views:
    89
    Martijn Lievaart
    Aug 13, 2007
Loading...

Share This Page