Masking a dist package with a copy in my own package

Discussion in 'Python' started by Sam Simmons, Jan 21, 2012.

  1. Sam Simmons

    Sam Simmons Guest

    Hey all,

    I'm using twisted in a project and have run into a class that's in version 11.1 but not 8.2 in OSX. I was thinking to get it working for mac users I could just extract the 11.1 twisted package and through it under my package.e.g.

    project/
    __init__.py
    twisted/
    __init__.py
    ...

    When running anything, it imports from the local 11.1 twisted, but zope throws a warning:

    /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/zope/__init__.py:1: UserWarning: Module twisted was already imported from /path/to/project/twisted/__init__.pyc, but /System/Library/Frameworks/Python..framework/Versions/2.6/Extras/lib/python is being added to sys.path
    __import__('pkg_resources').declare_namespace(__name__)

    Is there an elegant way to give mac users vers 11.1 other than copying in package and possibly renaming it?

    Thanks!
    Sam Simmons, Jan 21, 2012
    #1
    1. Advertising

  2. Sam Simmons

    Sam Simmons Guest

    I just installed 2.7... should have done this a while ago. pip finally works!

    Thanks!
    Sam Simmons, Jan 22, 2012
    #2
    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. MS
    Replies:
    3
    Views:
    1,522
  2. Steve Pinard

    sort() doesn't work on dist.keys() ?

    Steve Pinard, Jul 10, 2003, in forum: Python
    Replies:
    5
    Views:
    440
    Greg Fortune
    Jul 11, 2003
  3. Christopher Barker

    Can I use dist-utils to install a sub-package?

    Christopher Barker, May 13, 2004, in forum: Python
    Replies:
    2
    Views:
    323
    Jorge Godoy
    May 13, 2004
  4. Anastasios Hatzis

    distutils: different names in src and dist/build

    Anastasios Hatzis, Feb 8, 2007, in forum: Python
    Replies:
    1
    Views:
    265
    Richard Jones
    Feb 8, 2007
  5. Jeffrey Barish

    Problem using copy.copy with my own class

    Jeffrey Barish, Apr 22, 2008, in forum: Python
    Replies:
    7
    Views:
    354
    Jeffrey Barish
    Apr 24, 2008
Loading...

Share This Page