Re: ReportLab 3.x packaging and deployment

Marius Gedminas <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <20140114120802.GA22548@platonas>
On Tue, Jan 14, 2014 at 11:19:01AM +0000, Andy Robinson wrote:
> On 14 January 2014 11:00, Marius Gedminas <[email protected]> wrote:
> > It would be awesome if I could sudo apt-get install python-reportlab and
> > then somehow make it available in selected virtualenvs, but that's a
> > discussion for another list.
> 
> Dumb questions but can't you...
> 
> 1. sudo apt-get install python-reportlab
> 2. create a virtualenv with no site packages
> 3. make a symlink from the venv's site-packages to the system reportlab?

Yes.

But I generally find

  sudo apt-get build-dep python-reportlab

and then building form source simpler.  (Because I have build scripts
that create the virtualenv and pip install -r requirements.txt for me,
and I don't want to put hacks in the middle of those scripts, and I have
no way to pause the script so I could run a custom command after
virtualenv creation but before pip install tries to pull in ReportLab
via some dependency chain.)

> I concluded long ago that pip can't do everything.  All of our web
> projects (and we have a LOT) have a shell script at the top level to
> build/rebuild the environment.   So we can check if a symlink exists
> and create one if it's missing, and do other "procedural" stuff.

I tend to have Makefiles to build virtualenvs on demand etc.  It helps
that I never have to deploy on Windows.

> A requirements.txt which specifies all dependencies is a wonderful
> thing to have anyway.  And pip is happy enough for pure when you add a
> couple more pure Python packages to tour requirements in an existing
> project overnight.  But it needs a lot of 'nursing through'.   Right
> now I'm working on someone else's financial app needing matplotlib,
> scipy (hence fortran), tables (hence HDF5 which absolutely demands a
> local source build inside the venv) etc etc.

Numpy/scipy are a bit special, but sudo apt-get build-dep helps a lot.

I think people (especially scientists who need things like Numpy/Scipy)
are recommending Conda as a solution for prebuilt binary packages that
match your platform exactly.  I haven't had a chance to try it yet.

Marius Gedminas
-- 
Q:      What's tiny and yellow and very, very, dangerous?
A:      A canary with the super-user password.
signature.asc (application/pgp-signature, 190 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)

iD8DBQFS1SiikVdEXeem148RAt9DAJ9Jx1zLz2I0RpXHsKwroGBpdsbbxgCfZxo8
3h9QuYE5zGa+oH695nnhNlU=
=VcEL
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.