Packaging python bits with setuptools that depend on non-distutil packages

Yaakov Nemoy loupgaroublond at gmail.com
Tue May 5 01:32:17 UTC 2009


2009/5/4 Kevin Kofler <kevin.kofler at chello.at>:
> loupgaroublond at gmail.com wrote:
>> To make a short story long, i'm sure there are ways to include code
>> snippets in dbus, rpm, and possibly other packages that also generate egg
>> info. This would at least let me declare those packages as dependencies.
>> The bigger issue i have though, is how can i import them in some generic
>> fashion into virtualenv?
>
> The Fedora way is to use mock to create your chroot. RPM is the package
> management tool around here, not python-distutils.

With python that's not entirely the case. If you're using mock to create such an environment to do development work, you're essentially going to have to copy your source code into mock, do your development from inside mock and then copy the good results out of mock when you're done. The difference between using mock and virtualenv is that one creates a new chroot to do certain kinds of automated work in, and the other creates a virtual environment in place on top of your current file system.

The advantages of this is that you can ask setuptools to include your development directory in the current working environment. You can do your development on your development tree, and have any changes you make show up live in your environment. With a compiled language it's not obvious why you want to do this, but in a 'interpreted' language like python, the benefits are easy to see.

I could rig together something similar on top of mock that is transparent to the user, but why bother?

-Yaakov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 270 bytes
Desc: OpenPGP digital signature
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20090504/be5d11ce/attachment.bin 


More information about the devel mailing list