main.cpp.rst files are not handled by generate script
Hi, How do I convert the main.cpp.rst files to main.cpp now? Is this feature still being worked on? I can't build the latest trunk.
Comments (16)
-
-
reporter Yes that script is missing a line to convert
.cpp.rst
files.rstfiles += [f for f in files if len(f) > 8 and f[-8:] == ".cpp.rst"]
-
It's done in CMakeLists.txt.
-
- changed title to main.cpp.rst files are not handled by generate script
-
Also, the GLOBRECURSE mechanism in CMakeLists.txt converts more files than it should, including e.g. other build directories.
-
reporter Maybe this is not working on MSYS2 then.
-
When running cmake, do you see this?
-- Generating demo source files -- -------------------------------------------------- extract written to /home/martinal/dev/fenics-dev/dolfin/demo/documented/eigenvalue/python/demo_eigenvalue.py ... extract written to /home/martinal/dev/fenics-dev/dolfin/demo/documented/built-in-meshes/cpp/main.cpp
-
reporter I am seeing this
-- -- Generating demo source files from reStructuredText -- -------------------------------------------------- -- -- Generating demo source files -- -------------------------------------------------- -- Performing Test HAVE_NO_MULTLINE -- Performing Test HAVE_NO_MULTLINE - Success
-
Then the code in CMakeLists.txt doesn't work for you... No idea why.
-
reporter yes on windows you should problaby specify the python exe like this
execute_process(COMMAND ${PYTHON_EXECUTABLE} ./utils/pylit/pylit.py ${rst_file}
in the `CMakeLists.txt'. It works from cmake now.
-
I would like to run pylit via the Python interpreter, but we need to check that it works with py3.
-
It does with the edits I made recently.
-
Great, I'll make the change then.
-
I had to fix pylit when trying to build dolfin with py3, because I was using a virtualenv where python=python3. It's good to keep this in mind: don't trust that python=python2.
-
I've started avoiding
python
andpip
in favour ofpython2
,python3
, etc, because of inconsistencies across platforms. -
- changed status to resolved
Use detected Python interpreter when running pylit. Fixes
#755.→ <<cset b31ef0ea4038>>
- Log in to comment
There's a script ./cmake/scripts/generate-demo-files, it should be executed when you run cmake.
To convert just one .rst file you're editing you can run
python <dolfin>/utils/pylit/pylit.py
on the file.