[Maya-Python] Sphinx issues with OpenMaya?

2016-09-07 Thread Mark Jackson
Morning all, I'm trying to get our API docs updated and to do so I've always run Sphinx to generate the docs but from an old laptop that was 32bit and running Maya2012. I'm trying to get the whole thing running again from 2016 but running into issues whenever the Sphinx build process hits OpenMay

Re: [Maya-Python] Sphinx issues with OpenMaya?

2016-09-07 Thread Marcus Ottosson
DLL load failed errors are typically due to your Python version trying to load a module that wasn't compiled for it. Have a look in your environment for things like PySide/PyQt and that your Python actually running is `mayapy`. On 7 September 2016 at 09:31, Mark Jackson wrote: > Morning all, >

Re: [Maya-Python] Sphinx issues with OpenMaya?

2016-09-07 Thread Mark Jackson
Yeah thats what I thought, but I grabbed everything via setuptools and everything is pathed up and using the correct interpreter. Like I mentioned the unitTests are all running so the environment should be fine else they'd bail also, or so I'd have thought. Not sure if it's a mismatch in the build

Re: [Maya-Python] Sphinx issues with OpenMaya?

2016-09-07 Thread Cesar Saez
Don't you mock Maya modules during docs generation? Sphinx most likely doesn't need anything from Maya other than being able to import your modules, I totally recommend to take a look at mock for these kind of things. Cheers -- You received this message because you are subscribed to the Google G

Re: [Maya-Python] Sphinx issues with OpenMaya?

2016-09-07 Thread Marcus Ottosson
Have a look at trying to narrow it down to something reproducible. For example, delete half the pages of your Sphinx documentation, and see if it still breaks. Keep deleting half of half until you've got the smallest amount of lines that still throw the error. Then post the whole sequence of comma

Re: [Maya-Python] Sphinx issues with OpenMaya?

2016-09-07 Thread Christopher Crouzet
If it isn't the case already, I'd do as Cesar said—maybe there are better implementations but here's an example of “mocking” the Maya module for Sphinx: https://github.com/christophercrouzet/banana.maya/blob/master/doc/conf.py#L11 On 7 September 2016 at 16:46, Marcus Ottosson wrote: > Have a lo

Re: [Maya-Python] Sphinx issues with OpenMaya?

2016-09-07 Thread Marcus Ottosson
He did say OpenMaya was needed for his MetaData implementation. But if not, I would also suggest stripping the dependency from your documentation generator. Mocking is one way of doing that. On 7 September 2016 at 10:52, Christopher Crouzet < christopher.crou...@gmail.com> wrote: > If it isn't t

Re: [Maya-Python] Sphinx issues with OpenMaya?

2016-09-07 Thread Cesar Saez
No need to reinvent the wheel, there's a std/production proved mock module! (it's part of python3 std Library iirc). pip install mock You basically replace Maya entries on sys.modules by a MagicMock instance (check the docs for more info, there are convenience functions to do it and everything...

Re: [Maya-Python] Sphinx issues with OpenMaya?

2016-09-07 Thread Christopher Crouzet
Marcus: I have no idea what this MetaData implementation refers to? Cesar: True but I personally like avoiding unnecessary external dependencies for such simple needs (the module `mock` is not part of `mayapy` which is Python 2). Otherwise it feels like coding in JavaScript using one line NPM modu

Re: [Maya-Python] Sphinx issues with OpenMaya?

2016-09-07 Thread Christopher Crouzet
PS: the mock code isn't mine and I failed to credit the original author in my repository, so here it is for now: http://stackoverflow.com/a/23573376/1640404. I'll add the link in a future commit. On 7 September 2016 at 17:13, Christopher Crouzet < christopher.crou...@gmail.com> wrote: > Marcus:

Re: [Maya-Python] Sphinx issues with OpenMaya?

2016-09-07 Thread Marcus Ottosson
> Marcus: I have no idea what this MetaData implementation refers to? Hi Christopher, Mark was referring to this by name in the original question as one of the requirements for his document generation. For completeness, here it is again. > all our unitTests run fine and those all call the same M

Re: [Maya-Python] Sphinx issues with OpenMaya?

2016-09-07 Thread Christopher Crouzet
Yes, I did see this but I've got no idea what it refers to. I'd be curious to know what kind of “testing” code would have its place within a doc generation process? On 7 September 2016 at 17:25, Marcus Ottosson wrote: > > Marcus: I have no idea what this MetaData implementation refers to? > > H

Re: [Maya-Python] Sphinx issues with OpenMaya?

2016-09-07 Thread Marcus Ottosson
I also don't know what his code does precisely, but I wouldn't be so quick to dismiss. It's possible he has executable documentation; in which code snippets within his documentation are executed at build time to produce actual output, rather than hard-code it. That way he would also become notifie

Re: [Maya-Python] Sphinx issues with OpenMaya?

2016-09-07 Thread Mark Jackson
Thanks for all the replies guys, currently all our testing / unitTesting all goes through nose and coverage, I keep thinking about moving some of that to doctest side of things but thats all got side-lined for a while. Mock sounds like something I should be looking into, but I still can't get my h

Re: [Maya-Python] Sphinx issues with OpenMaya?

2016-09-07 Thread Marcus Ottosson
Mark, what does the actual command that you are running look like that produces the error? On 7 September 2016 at 11:46, Mark Jackson wrote: > Thanks for all the replies guys, currently all our testing / unitTesting > all goes through nose and coverage, I keep thinking about moving some of > tha

Re: [Maya-Python] Sphinx issues with OpenMaya?

2016-09-07 Thread Mark Jackson
looks like easy_install failed to pull down a missing module 'markupsafe' which seems to have fixed it. all building now. thanks guys, going to take a look at mock this week I think. On 7 September 2016 at 12:01, Marcus Ottosson wrote: > Mark, what does the actual command that you are running l