[reportlab-users] easy_install reportlab

Marius Gedminas marius at gedmin.as
Thu Dec 10 06:32:25 EST 2009

On Wed, Dec 09, 2009 at 03:40:38PM +0000, Andy Robinson wrote:

> We've just made some changes which should hopefully allow the above to

> work a bit better. However, it's not perfect. Here is how we think

> it will work for our version 2.4 in January - comments welcome, and

> there are daily builds below you can try out now.


> 1. ReportLab still uses distutils, not setuptools.

You may want to skip setuptools and try Distribute -- it's a setuptools
fork, with additional bug fixes and Python 3 support, which seems to be
gearing up to replace setuptools. It's backwards-compatible with
setuptools, and it's more actively maintained.


AFAIU most of the Python packaging world (myself included) still uses
setuptools, because of inertia, and because it works well enough for

> 2. "easy_install reportlab" should (when it's been released) fetch it

> and compile our C extensions (renderPM and _rl_accel). Previously,

> this failed under easy_install (even thought it worked with "setup.py

> install" because setuptools does not support some of the ways we were

> laying out C code previously.

There's a point that bears repeating:

* binary eggs are good for Win32 systems, since people usually don't
have a C compiler

* binary eggs are bad for Linux systems, since there's no well-defined
ABI and extensions compiled on one Linux distro will probably not
work on a different one.

So I'm happy to hear that you plan to only upload sdists to PyPI and
have the users build the C extensions for their systems.

> 3. We do NOT list the Python Imaging Library (PIL) as a dependency,

> because setuptools cannot correctly download and install it. When you

> install PIL via setuptools, it appears to work but you cannot

> successfully execute "from PIL import Image", only "import Image".

> So, we're just going to tell people clearly in our manuals and

> download pages to install PIL. If we feel really brave we might

> suggest a change to the effbot to get around this.

That would be great!

I've seen many projects using repackaged versions of reportlab and PIL
that were made easy_install-compatible in some way.

I once built a reportlab tarball myself, containing a snapshot of svn
revision 3484, which can be successfully easy_installed, but I don't
remember what exactly I did to make it that way. I'm sure I wrote it
down somewhere, but I cannot find where :( I remember that I was
planning to go upstream with this, but never got around to it.

(The tarball is at http://ivija.pov.lt/download/. I needed a certain
bugfix and couldn't wait until reportlab 2.4 got released.)

> 4. Note that even if we could sort out (3), we still need PIL to have

> been compiled with FreeType2, and there is no way we know of for the

> reportlab setup script to make requests like that of dependent

> packages.


> 5. easy_install, as usual, unpacks things into a temporary directory,

> then installs just the libraries into the relevant site_packages area.

> So, if we refer people to our (copious) docs and tests, they will

> have a hard time finding them. By contrast people who manually get

> the distro will have them in their temporary area. I am not sure

> what "easy" developers expect in terms of docs and tests and would

> welcome .

I assume you mean you would welcome feedback.

I don't really expect docs/tests with packages that are installed using
easy_install. I expect to find docs on the web, in some easy-to-find
location (e.g. http://pypi.python.org -> find the package -> look for
"Home page" link in the metadata, or a documentation link directly in
the long_description) and, to some extent, with pydoc.

Some people strongly propagate shipping the tests directly in a
subpackage, so you'd have


etc. I believe pygame ships both tests and examples in their package
this way, and you can even run their testsuite with

python -m pygame.tests.__main__

(I wonder if Python 2.7 will let me to simply do python -m pygame.tests;
Python 2.6 says it cannot directly execute a pacakge.)

Also, to make the tests/examples more easily accessible, you may want to
set the zip_safe flag to False in your setup.py. Many people (myself
included) think installing zipped eggs is a bad idea (inconvenient,
slower than unzipped eggs) and are a bit unhappy with easy_install for
attempting to use zipped eggs by default.

> 6. At this moment we have done nothing about RTL (Arabic etc). If

> this makes it in, which is far from certain, it will introduce another

> "optional C dependency" on pyfribidi or PyICU.



> To try out the current state of affairs you can grab a daily version with


> easy_install http://www.reportlab.org/ftp/reportlab-daily-unix.tar.gz

> or

> easy_install http://www.reportlab.org/ftp/reportlab-daily-win32.zip

Seems to work, at least easy_install didn't complain.

Marius Gedminas
NT 5.0 is the last nail in the Unix coffin. Interestingly, Unix isn't in the
coffin... It's wondering what the heck is sealing itself into a wooden box 6
feet underground...
-- Jason McMullan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20091210/4c8dc5e3/attachment-0001.pgp>

More information about the reportlab-users mailing list