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

Re: Migrating unmanaged Python library extension from ‘python-central’ to ‘python-support’



+ Ben Finney (Wed, 15 Apr 2009 21:21:01 +1000):

> > > * Copy the file from ‘writers/manpage.py’ into ‘usr/lib/$(shell
> > >   pyversions -d)/site-packages/docutils/writers/.’. If I omit this step,
> > >   there is no indication that the modules should be in the
> > >   ‘docutils/writers/’ system library directory.

> > You’re not qualifying the destination directory. Do you mean
> > debian/tmp/usr/lib/...?

> I'm not sure what you mean by “qualify”; all the directory names
> (including the ones you suggest?) are relative, if that's what you mean.

No, with “qualify” I don’t mean “make absolute”, of course. But when
talking about a path when packaging, it’s very relevant if it’s
debian/tmp/usr/lib/foo, or debian/foo/usr/lib/foo. Writing "usr/lib/foo"
alone misses very important information.

Except that, in this case, it was really "usr/lib/foo", which is just...
well, unusual.

> I'm cribbing from Cyril Brulebois's suggestion, which puts the module in
> ‘usr/lib/$(shell pyversions -d)/site-packages/docutils/writers/’ and has
> that directory specified to ‘dh_install’.

> > In that case, just use debian/<pkgname>/usr/lib... instead, and skip
> > the dh_install step.

> That does work, thank you.

> This goes against the suggestions earlier that ‘dh_install’ is the right
> tool; I'm curious as to why you advise the opposite.

dh_install would have been the tool of choice for this task, except that
your destination directory is not a static string: it depends on the
output of some command. Because of this, it can’t be sensibly used for
this. (If pysupport looked in some directory which does not embed the
version number, that’d be another story; but I don’t know about that.)

Cheers,

-- 
- Are you sure we're good?
- Always.
        -- Rory and Lorelai


Reply to: