OS X PyFR origin/develop branch: documention make failure

Peter, Freddie, et. al.,

I’m getting an error when attempting to make the documentation or run the pyfr/main.py scripts. I believe it may be due to the new python 3.3 dependency, but I wasn’t certain. If I have both python and python3 executables installed on my system pointing to 2.7.9 and 3.4.2; respectively, how do I ensure that PyFR uses python3 instead of python? The stack trace for the error I’m seeing is as follows:

Traceback (most recent call last):
File "/Users/zdavis/Applications/PyFR/pyfr/scripts/pyfr", line 6, in <module>
import pyfr.scripts.mesh
File "/Users/zdavis/Applications/PyFR/pyfr/scripts/mesh.py", line 10, in <module>
from pyfr.readers import BaseReader, get_reader_by_name, get_reader_by_extn
File "/Users/zdavis/Applications/PyFR/pyfr/readers/__init__.py", line 3, in <module>
from pyfr.readers.base import BaseReader
File "/Users/zdavis/Applications/PyFR/pyfr/readers/base.py", line 10
class BaseReader(object, metaclass=ABCMeta):
^
SyntaxError: invalid syntax

Best Regards,

Zach Davis

Hi Zach,

To avoid conflicts between different version of python and other dependencies I would suggest using virtualenv:

http://docs.python-guide.org/en/latest/dev/virtualenvs/

I am planning to add something to the User Guide in the near future suggesting the use of virtualenvs.

Cheers

Peter

Hi Peter,

That seems to have resolved my earlier issue—thanks! I’ve got another one with regards to generating the documentation:

(venv)[zdavis@Minerva doc]$ make latexpdf

sphinx-build -b latex -d build/doctrees src build/latex
Making output directory...
Running Sphinx v1.2.3
Exception occurred:
File "/Users/zdavis/Applications/PyFR/venv/lib/python3.4/site-packages/sphinx/application.py", line 333, in setup_extension
mod = __import__(extension, None, None, ['setup'])
File "/Users/zdavis/Applications/PyFR/doc/ext/tikz.py", line 166
except OSError, err:
^
SyntaxError: invalid syntax
The full traceback has been saved in /var/folders/x1/5xnw6dh50s78d6hcc234g8vh0000gn/T/sphinx-err-w21_0s8_.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <[https://bitbucket.org/birkenfeld/sphinx/issues/](https://bitbucket.org/birkenfeld/sphinx/issues/)>. Thanks!
make: *** [latexpdf] Error 1

Best Regards,

Zach Davis

Hi Zach,

Can you try with Sphinx 1.3b3 and see if that fixes things?

Cheers

Peter

Hi Zach,

Looks as if 2to3 never found its way into the doc/ext directory. Can
you try running:

2to3 doc/ext > changes.patch && patch -p0 < changes.patch

and try again?

Regards, Freddie.

Hi Freddie,

Here’s the output I get from your instructions:

(venv)[zdavis@Minerva doc]$ 2to3 doc/ext > changes.patch && patch -p0 < changes.patch

RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: Can't open doc/ext: [Errno 2] No such file or directory: 'doc/ext'
RefactoringTool: No files need to be modified.
RefactoringTool: There was 1 error:
RefactoringTool: Can't open doc/ext: [Errno 2] No such file or directory: 'doc/ext’

Peter,

I’m looking for that specific version in the pip repository. I’ll let you know what happens once I locate it.

Best Regards,

Zach Davis

Hi Zach,

Can you try running it from the root PyFR directory?

Regards, Freddie.

Hi Freddie,

My bad…that worked. Thanks!

Best Regards,

Zach Davis