Drew, What I've been doing is using sitecustomize to inject pymel to the front of the python path at startup. The `downside` is that pymel shows up in the python path universally but some of the utils that are included I've been learning/finding great use for in other places. The Path class in particular - love that thing. So it's not really that much of a `downside` after all.
Ian On Thu, Jan 21, 2010 at 12:18 PM, Drew <drewskill...@gmail.com> wrote: > Hi Chad, > > Thanks to you and Jason for helping me out here. > > Do you know if .pth files can have env variables in them? Our pymel > install location will vary from project to project (all project data > is lumped under a project specific directory), so if i do hack the > maya install it would be great if it could play nice when you're > switching between projects. > > Even if it does support env vars, i'm still not super comfortable > hacking the maya install itself. I prefer to keep all the maya > customization we do easily tractable from the maya.env. For example a > tools programmer troubleshooting problems a year from now and not > realizing that custom scripts/plugins are being referenced from the > install directory itself. That said, it sounds like the .pth is > probably our best option right now. (and fyi - i am using maya 2008). > > For the record, my ideal option would be a PYMELPATH env var > (definable either though windows or the maya.env) that makes all this > magic sauce work. Though I'm sure there are some good reasons why > it's not setup that way. > > Thx again! > Drew > > > > On Jan 20, 11:16 pm, Chad Dombrova <chad...@gmail.com> wrote: >> hi zero, >> we know this ordering can be a bit tricky to accomplish for those who are >> not using the "easy" install method, especially on a windows machine where >> PYTHONPATH might be set as a system environment variable that the user >> cannot override. to help out in these situations, we've added a third >> install option to the 1.0 docs, for those who have write access to their >> maya site-packages directory: >> http://www.luma-pictures.com/tools/pymel/docs/1.0/install.html#manual... >> >> let us know if that does not solve the problem. there is another variant to >> this 3rd option that we haven't fully explored, but it would only work for >> maya 2010, since .pth location restrictions were relaxed in python 2.6. >> >> -chad >> >> On Jan 20, 2010, at 10:34 PM, Count Zer0 wrote: >> >> >> >> > Posting for Drew Skillman of DoubleFine from tech-artists.org forum: >> >> > "We're running into some trouble with the new deployment scheme for >> > 1.0. Specifically, pymel now needs to be imported prior to the maya >> > libs, which means it needs to appear before those maya libs in >> > sys.path. >> >> > This is actually tricky to accomplish if you already have PYTHONPATH >> > defined as an environment variable, and aren't in a position to change >> > it. This is because if PYTHONPATH is defined, adding it to the >> > maya.env does nothing (i'm using maya 2008 and carefully verified >> > this). >> >> > I can move the 2 necessary PyMel folders into the folder that's >> > currently defined in PYTHONPATH, but that's pretty ugly since our maya >> > tools are supposed to live elsewhere (not to mention the confusion of >> > having those 2 folders piled in with a bunch of other modules). >> >> > So my question for you guys is does anyone know another way to get >> > PyMel added to the system paths before the standard maya libs, without >> > relying on PYTHONPATH (or hacking the maya install itself)." >> >> > Any help would be appreciated, I'll post response in other forum if >> > anybody has a good solution. >> >> > -jason >> > -- >> >http://groups.google.com/group/python_inside_maya > > -- > http://groups.google.com/group/python_inside_maya > -- http://groups.google.com/group/python_inside_maya