Commit graph

14 commits

Author SHA1 Message Date
Michael Schwarz
ba3bc0513e Don’t mask exceptions when process.kill() fails. 2015-10-02 00:26:00 +02:00
Michael Schwarz
215ffeb9bb Fixed asymptote export.
stdout was not being redirected into a pipe.
2015-10-02 00:25:49 +02:00
Michael Schwarz
a1f09b7f86 Abstraction which allows a running process to be used as a context manager. 2015-09-16 01:50:24 +02:00
Michael Schwarz
096db19a9a Wrap all Python main functions with decorator.
This decorator check if a module was called as the main module and catches exceptions.
2015-09-16 01:50:23 +02:00
Michael Schwarz
93f9696491 Check for Asymptote not writing a PDF file.
If no drawing commands are called in an Asymptote script, no PDF output is created and no error is generated. This confuses the build process, which expect a target to exist after its commands were called.

With this change, the Python wrapper checks whether a PDF was actually written and throws an error otherwise.
2015-09-16 01:50:23 +02:00
Michael Schwarz
57c9e9dc90 Prevent Python stack trace when an external command failed.
This catches the OSError thrown by the subprocess module and wraps it so that in the end only an error message is printed, explaining which command failed.
2015-09-16 01:41:45 +02:00
Michael Schwarz
987fa08ce6 New workaround for temp dir on different device.
Currently, on setups where the project dir is on a different file system as the system temporary directory, a temporary directory is instead created on the project dir. This is not very nice.

With this change, we still create temporary files in the system temporary directory but copy instead of move files from and to the temporary directory, if necessary, which solves the problems.
2015-09-16 01:40:00 +02:00
Michael Schwarz
63632560b6 Revert "support: Workaround for tempdir on different mount."
This reverts commit 3d21efd489.
2015-09-15 18:59:35 +02:00
Michael Schwarz
5a1604ce20 Use Python script to run Asymptote. 2015-08-07 02:03:33 +02:00
Michael Schwarz
3d21efd489 support: Workaround for tempdir on different mount.
This adds a workaround for setups where the user has checked out the project on a different mount point than where the temporary directory is located.
2015-07-12 18:57:21 +02:00
Michael Schwarz
fb72dca77a Fix make jobserver warning.
When running the make file with a number of jobs, the following warning was generated by the make process used to parse the dependency makefile generated by OpenSCAD:

make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.

With this change, the variables MAKELEVEL and MAKEFLAGS are removed from the environment before starting the child make process.
2015-03-15 16:34:59 +01:00
Michael Schwarz
c74efa59dc Rewritten unit conversion methods of inkex.py to properly handle viewport settings. 2014-12-21 02:15:45 +01:00
Michael Schwarz
f9fa53eef8 Added support for recording dependencies while compiling OpenSCAD files. 2014-12-12 11:44:29 +01:00
Michael Schwarz
60b25ad13d Extracted common functions to separate module. 2014-12-10 22:18:14 +01:00