FAQ
HI all,

I'd like to be able to use distutils to install a package within the
wxPython package:

wx.lib.MyPackage

I want to be able to do this so folks can upgrade a package of mine that
is in the wxPython library, without changing it's location.

In looking through the distutils docs, it looks like I cannot specify a
sub-package location for my package, It will only put it in
site-packages, not site-packages.wx.lib

Is there a way to do this?

thanks,
-Chris


--
Christopher Barker, Ph.D.
Oceanographer

NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker at noaa.gov

Search Discussions

  • Thomas Heller at May 13, 2004 at 7:22 pm

    Christopher Barker <Chris.Barker at noaa.gov> writes:

    HI all,

    I'd like to be able to use distutils to install a package within the
    wxPython package:

    wx.lib.MyPackage

    I want to be able to do this so folks can upgrade a package of mine
    that is in the wxPython library, without changing it's location.

    In looking through the distutils docs, it looks like I cannot specify
    a sub-package location for my package, It will only put it in
    site-packages, not site-packages.wx.lib

    Is there a way to do this?
    You should look into the pkgutil module, which is in Python 2.3. It is
    supposed to support such schemes. Although I don't know if it requires
    changes to wxPython itself.

    Thomas
  • Jorge Godoy at May 13, 2004 at 7:32 pm

    On Qui 13 Mai 2004 15:21, Christopher Barker wrote:

    HI all,

    I'd like to be able to use distutils to install a package within the
    wxPython package:

    wx.lib.MyPackage

    I want to be able to do this so folks can upgrade a package of mine that
    is in the wxPython library, without changing it's location.

    In looking through the distutils docs, it looks like I cannot specify a
    sub-package location for my package, It will only put it in
    site-packages, not site-packages.wx.lib

    Is there a way to do this?
    Chris,


    Look at my previous post about distutils and RPM.

    I'm doing something like that, only that I'm copying files because they are
    not python scripts but images. And the other difference is that they are on
    my own package...

    You can try using the following construction:

    setup(
    name="name",
    version="0.1",
    (...)
    packages=['wx.lib.YourPackage'],
    package_dir = {'wx.lib.YourPackage': '.'},
    (...)


    Here you tell that your package has the 'wx.lib.YourPackage' name and is
    located in the same directory as the setup script. You can put it somewhere
    else.


    I hope this helps.


    Be seeing you,
    --
    Godoy. <godoy at ieee.org>


    From http Thu May 13 21:35:34 2004
    From: http (Paul Rubin)
    Date: 13 May 2004 12:35:34 -0700
    Subject: Generators: section 9.10 of the python tutorial
    References: <mailman.527.1084471592.25742.python-list@python.org>
    Message-ID: <7xk6zgce7t.fsf@ruckus.brouhaha.com>

    "David Stockwell" <winexpert at hotmail.com> writes:
    Section 9.10 of the tutorial discusses the yield keyword. When I
    tried using it I get the following SyntaxError.

    What does this error mean? Does it mean we can't use yield in our
    code?
    It means you're using an older version of Python in which yield isn't
    a standard built-in keyword. Try putting

    from __future__ import generators

    at the very top of your source file to enable the yield statement.
    The special import is there so that old code that uses "yield" as
    (say) a variable name won't suddenly break.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMay 13, '04 at 6:21p
activeMay 13, '04 at 7:32p
posts3
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase