On Mon, 20 Jul 2009 20:22:41 -0400, "P.J. Eby" <[email protected]> wrote:
At 05:55 PM 7/20/2009 -0400, Jean-Paul Calderone wrote:
Hello all,

I'm trying to figure out how to include some extra DLLs which are required
by an extension module I'm trying to package (pyOpenSSL).

From what I can tell, the DLLs need to be in the same directory as the
extension modules themselves (the .pyd files).  Does anyone know if this
is the best place for them?

Based on my current understanding, I've used the data_files feature of
distutils to put the DLLs into site-packages/OpenSSL/.

Use package_data instead; it should do the right thing with both distutils and setuptools. (It is available in the distutils as of Python 2.4; for 2.3 you'd have to use setuptools.)


Can package_data include files which aren't in the source tree?  I naively
tried
   package_data = {
       'OpenSSL': ['C:/OpenSSL/ssleay32.dll',
                   'C:/OpenSSL/libeay32.dll']}

And got an egg which included neither ssleay32.dll nor libeay32.dll.  Should
I just copy these files into the source tree at the beginning of setup.py?
The Python distutils documentation for package_data says the paths are
relative to the package they're for, so it sounds like the absolute paths
above aren't expected to work.  (I also tried with \s, though the setuptools
docs say to use / regardless of platform, with the same outcome).

Thanks,

Jean-Paul
_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to