[Distutils] Third-party packages inside a project
rasky at develer.com
Wed Nov 14 16:02:49 CET 2007
On 11/14/2007 3:00 PM, Phillip J. Eby wrote:
> At 02:37 PM 11/14/2007 +0100, Giovanni Bajo wrote:
>> On 11/14/2007 1:19 PM, Phillip J. Eby wrote:
>>>> I was wondering if someone could suggest a fix, especially for #1: I
>>>> can't believe there's no way to ask distutils/setuptools to install a
>>>> project-specific package (I am aware of the chapter "Custom
>>>> Locations" in EasyInstall docs, but that's more about installing
>>>> packages at user-level instead of system-level; it doesn't cover the
>>>> project-level which I need).
>>> setup.py install --single-version-externally-managed
>>> --record=somefile ...
>>> The above incantation (along with whatever other options you want)
>>> will let you install setuptools-based packages "the old fashioned
>>> way". You will be responsible for installing the packages'
>>> dependencies in the same way, however. You'll also be responsible
>>> for any uninstallation prior to upgrading versions of those packages.
>> That's fine since it's exactly how it was working before. I'm happy
>> there is a "backward-compatibility" option, but it's a pity there's no
>> way to fix it in a way that still allows to fully use setuptools.
> Well, there is such a thing, I just assumed you didn't want it. The -m
> option to easy_install can install packages without a .pth file, but
> then to use them, your package must also be using setuptools and declare
> its dependencies, or explicitly use require() to add the packages to
> sys.path at runtime.
You're right. --single-version-externally-managed seems like a better
fit for my usecase. After all, I don't have to manage multiple versions
of the same package within the same project.
More information about the Distutils-SIG