My addition to this topic would be a similar approach to Justin’s. Host
packages individually and modify PYTHONPATH based on your criteria, such as
project. Each project could then define their own paths, pointing to their
relevant versions of their relevant packages.

/hulk/scripts/pakA/__init__.py
/hulk/scripts/pakB/1.4.7/pakB/__init__.py
/hulk/scripts/pakB/1.4.8/pakB/__init__.py
/hulk/metadata.json --> {'PYTHONPATH': 'scripts/:scripts/pakB/1.4.7'}

And then, it could also be useful, in cases where you’d like per-shot or
per-asset overrides of your PYTHONPATH, to get metadata to cascade.

/hulk/metadata.json
/hulk/shots/1000/metadata.json --> {'PYTHONPATH': '../../scripts/pakB/1.4.8'}

Here, shot 1000 introduces additional dependencies which would be added to
the initial /hulk/metadata.json. At this point, you can establish a
foundation metadata container at the root of each project (or all projects)
and override essentials as you go.

You could roll your own cascade mechanism, or you could have a look at a
library I'm working on called openmetadata;

# This would be the gist of itimport openmetadata as om
location = om.Location('/hulk/shots/1000')
pythonpath = om.Entry('PYTHONPATH', parent=location)
om.inherit(pythonpath)print
pythonpath'/projects/hulk/scripts/:/projects/hulk/scripts/pakB/1.4.8'

Here is a github <https://github.com/abstractfactory/openmetadata>
link and here’s
an 
example<https://github.com/abstractfactory/openmetadata/blob/master/openmetadata/examples/inheritance.py>on
how to set up the metadata for inheritance.

Best,
Marcus


On 13 May 2014 09:30, Justin Israel <[email protected]> wrote:

> We manage versions with a custom packaging and deploy system that is
> integrated with the environment management system. The eggs can be annoying
> because they require being reliant on either having pth files being updated
> or having the eggs added to the path as opposed to just a normal package.
> I think if you have the versions and packaging managed externally then the
> eggs are superfluous.
>  On May 13, 2014 7:52 PM, "Fredrik Averpil" <[email protected]>
> wrote:
>
>> Thanks guys for all your input. How come you don't use eggs?
>> I thought eggs with egg-infos were supposed to be the easy way to
>> maintain versions and distribute modules?
>>
>> Fredrik
>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/CAD%3DwhWMxKgHOat0ua%2BO4msn21Xc2BBXpOg46Ytdx-zXi4Bj-XQ%40mail.gmail.com<https://groups.google.com/d/msgid/python_inside_maya/CAD%3DwhWMxKgHOat0ua%2BO4msn21Xc2BBXpOg46Ytdx-zXi4Bj-XQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0jiVCH1hQ8%3DyURDL9vtcOwkkSVkmOsAbpLHseyFVJ_RA%40mail.gmail.com<https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0jiVCH1hQ8%3DyURDL9vtcOwkkSVkmOsAbpLHseyFVJ_RA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Marcus Ottosson*
[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAuk5Y7KmpXkLPZnkpjrXi0ceZqp%3DMuVfswQ1HYv745OQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to