[oi-dev] What to do with python module dependancies?

Till Wegmueller toasterson at gmail.com
Sun Jul 18 16:51:09 UTC 2021


Hey Gary

There is two ways for a IPS package to have dependencies.
One manual in the .p5m file in the folder. Simply define a dependency 
action to the FMRI and set the conditional level.

Two automatically. The .p5m file in the folder is taken as input to the 
Packaging process, so everything you put there is run through pkgmogrify 
and pkgdepend utilities. These modify the file with transforms and 
automatically detected dependencies in turn. Have a look at the 
pkgdepend man page for details how that utility works. So anyhting 
pkgdepend does not detect has to be added to the .p5m file to assist the 
process. Another thing you can do is to add the package FMRI's to the 
REQUIRED_PACKAGES variable in the Makefile which will install the 
packages in the system during packaging. This can help the pkgdepend 
utility to detect dependencies if they are conditional.

Also note that there have been problems in the past for pkgdepend to 
detect conditional imports in python. So Adding them manually to the 
.p5m file may be required.

Greetings
Till

On 18.07.21 13:01, Gary Mills wrote:
> On Sun, Jul 18, 2021 at 03:08:38PM +0100, Peter Tribble wrote:
>>
>>     I've also noticed the setup.py builds quite happily whether
>>     dependencies
>>     are present or not.
>>     All I do is look at the requires.txt file. Usually present in the
>>     .egg-info
>>     directory, which may be present in the source or in the build tree.
>>     (Some modules are smart enough to handle the fact that dependencies
>>     vary between python versions, too.)
> 
> Thanks for the information; it was quite helpful.  I found the file
> that you mentioned.  It lists the two modules that I've already
> discovered, and two others conditionally.
> 
> Do I need to create the IPS dependancies myself, or does this happen
> automatically?
> 
> 



More information about the oi-dev mailing list