Best practices for simultaneously installed versioned packages?

Benjamin Kaplan benjamin.kaplan at case.edu
Mon Jan 4 17:16:39 CET 2010


On Mon, Jan 4, 2010 at 6:09 AM, Larry Hastings <larry at hastings.org> wrote:
>
> I'm writing a package for Python 3--let's call it "spacegoblin".  I fear
> someday I may need multiple versions installed and available simultaneously,
> even within one version of Python.  So I want to plan ahead for that
> possibility.  What would be the best way to allow this?  Right now I install
> the package with the version in the name, like "spacegoblin_1_0" and
> "spacegoblin_1_1".  But I have an uneasy sense that I'm doing something
> stupid... mainly because I've never seen anyone do this before.
>
> A coworker said they did it like "spacegoblin.1_0" and "spacegoblin.1_1" at
> a previous employer.  That seems like an improvement, though not the "yes
> that's obviously right" answer I'm holding out for.  Your thoughts?
>
> Thanks,
>
>
> /larry/
>
> p.s. Before you ask: no, I don't want to use "virtualenv" for this.
>

wxpython installs a "wxversion" module which has functions like
getInstalled(), ensureMinimal(version), and select(version). You can
call wxversion.select before importing wx and it will make sure that
the correct version is imported. You might want to look up what they
did.



More information about the Python-list mailing list