[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Python applications: private dirs and PYTHONPATH issue



Hi Piotr,

On Wed, Sep 10, 2014 at 07:09:37PM +0200, Piotr Ożarowski wrote:
> [Andreas Tille, 2014-09-10]
> > Copying dicompyler.egg-info to /tmp/buildd/dicompyler-0.4.2/debian/dicompyler/usr/share/dicompyler/dicompyler-0.4.2.egg-info
> > running install_scripts
> > Installing dicompyler script to /tmp/buildd/dicompyler-0.4.2/debian/dicompyler/usr/share/dicompyler
> > error: [Errno 21] Is a directory: '/tmp/buildd/dicompyler-0.4.2/debian/dicompyler/usr/share/dicompyler/dicompyler'
> > E: pybuild pybuild:256: install: plugin distutils failed with: exit code=1: /usr/bin/python setup.py install --root /tmp/buildd/dicompyler-0.4.2/debian/dicompyler --install-lib=/usr/share/dicompyler/ --install-scripts=/usr/share/dicompyler
> > dh_auto_install: pybuild --install -i python{version} -p 2.7 --dir . --dest-dir /tmp/buildd/dicompyler-0.4.2/debian/dicompyler returned exit code 13
> > debian/rules:14: recipe for target 'binary' failed
> > make: *** [binary] Error 13
> > 
> > I have tried this before but due to this failure I decided for manual
> > moving.  Is this a bug in pybuild or did I simply something wrong?
> 
> ah, module name and script name is the same, try this instead:
> 
>  export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/dicompyler/
>  export PYBUILD_AFTER_INSTALL=mv {destdir}/usr/bin/dicompyler {destdir}/usr/share/dicompyler/run

Any chance to find this magic spell somewhere documented?  I admit I
feel a bit helpless to find these settings myself.

> and symlink /usr/share/dicompyler/run to /usr/bin/dicompyler

This works really nicely since it also checks for dependencies at
runtime (I admit I'm amazed and I'm happy that I asked).  Unfortunately
I have no idea how to deal with this:

$ dicompyler
Traceback (most recent call last):
  File "/usr/bin/dicompyler", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2876, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 449, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 745, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 639, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pil>=1.1.7


I have

$ LANG=C apt-cache policy python-pil | grep Installed
  Installed: 2.5.1-1
$ LANG=C apt-cache show python-pil | grep -e Provides -e Replaces | sort | uniq
Provides: python-pillow, python2.7-pil
Replaces: python-imaging (<< 1.1.7+2.0.0-1.1)

So why is "pil>=1.1.7" not fullfilled?

Kind regards

         Andreas.


-- 
http://fam-tille.de


Reply to: