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. Advertisements

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. Ralph Krausse

    Chicken or Egg, XML or XSD

    Ralph Krausse, Sep 2, 2004, in forum: XML
    Replies:
    3
    Views:
    671
  2. Sebastjan Trepca

    Egg with option to install extra packages

    Sebastjan Trepca, Apr 19, 2006, in forum: Python
    Replies:
    0
    Views:
    349
    Sebastjan Trepca
    Apr 19, 2006
  3. Manuzhai
    Replies:
    0
    Views:
    669
    Manuzhai
    Jun 12, 2006
  4. Nagaraj
    Replies:
    1
    Views:
    1,191
    Lionel B
    Mar 1, 2007
  5. Stef Mientki
    Replies:
    4
    Views:
    520
  6. Catherine
    Replies:
    2
    Views:
    495
    John Nagle
    Oct 8, 2007
  7. R. Bernstein
    Replies:
    3
    Views:
    597
    R. Bernstein
    Dec 21, 2008
  8. Patrick

    Optimized count of files in tree

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