Can I use setup.py to ship and install only .pyc files?

Discussion in 'Python' started by Mike Kent, Apr 16, 2009.

  1. Mike Kent

    Mike Kent Guest

    I'd like to ship only the .pyc files for a module. I was hoping the
    standard distutils setup.py could handle this, but so far, I've not
    figured out how.

    After a bit of work, I discovered that if I create a MANIFEST.in file,
    and put 'include mymodule/*.pyc' and 'exclude mymodule/*.py' in it,
    then running 'python setup.py sdist' would generate a tar.gz file for
    me that contained the setup.py file and all my .pyc files, just like I
    wanted. However, when I then extract that tar.gz file, and try to run
    'python setup.py install', it complains about the missing .py files,
    and creates the 'mymodule' directory in the site-packages directory
    but without putting any of the .pyc files in it.

    At this point, I'm stumped. I was hoping someone out there had gone
    down this same route and could tell what I'm doing wrong. Can
    setup.py even handle this?
     
    Mike Kent, Apr 16, 2009
    #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. Axel Foley

    OT - domain registrar-ship

    Axel Foley, Jun 24, 2004, in forum: HTML
    Replies:
    7
    Views:
    411
    Tina - AffordableHOST, Inc.
    Jun 24, 2004
  2. Bill Davy
    Replies:
    0
    Views:
    694
    Bill Davy
    May 12, 2005
  3. Terry
    Replies:
    3
    Views:
    476
    Terry
    Oct 14, 2011
  4. Tina Smith

    Multiple Ship-To Addresses

    Tina Smith, May 19, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    106
    Tina Smith
    May 19, 2005
  5. Nathanial Allan

    Space Ship Operator <=> Odd Behaviour

    Nathanial Allan, Sep 28, 2010, in forum: Ruby
    Replies:
    3
    Views:
    119
    Robert Klemme
    Sep 30, 2010
Loading...

Share This Page