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

Re: Application libraries private, Distutils metadata available for console scripts and introspection



On 1 September 2015 at 17:35, Ben Finney <ben+debian@benfinney.id.au> wrote:
> Robert Collins <robertc@robertcollins.net> writes:
>
>> PKG resources should find it anywhere in the python path.
>
> That's exactly the point, though. The packages are private to this
> application, and should not be available for import by other programs.

Right - I did not suggest they should be.

> On the other hand, the Distutils metadata (the ‘foo-1.2.3.egg-info’
> directory) should be available for the program.

How is this the other hand? The Distutils data should be available to
and only to the programs that are allowed to access the packages.

> What I'd like is for the distribution to be installed such that:
>
> * its modules are private (‘--install-lib=/usr/share/FooApp/’), and
>
> * its distribution metadata is discoverable (‘--install-metadata=???’
>   except there doesn't seem to be such an option).

The distribution metadata is located via the python path; whatever
mechanism is making FooApp accessible to the program *should* also
make the metadata accessible, as long as:

>> I'd the path correct within the all processes?
>
> I don't know. I would not expect to need to alter how the program is run
> in order for it to find its own distribution metadata.

That is one of two options for what is happening to make packages in
/usr/share/FooApp/ accessible. Confirming it (or denying it) will let
us debug the issue.

-Rob

-- 
Robert Collins <rbtcollins@hp.com>
Distinguished Technologist
HP Converged Cloud


Reply to: