kopia lustrzana https://github.com/jaseg/gerbolyze
Small fixes, find svg-flatten in user pip install
rodzic
1e9d0c62f9
commit
18d857668e
|
@ -426,7 +426,7 @@ def load_side(side_matches):
|
|||
|
||||
for layer, elems in layers.items():
|
||||
if len(elems) > 1 and layer != 'drill':
|
||||
raise SystemError(f'Multiple files found for layer {layer}: {", ".join(side_matches[layer]) }')
|
||||
raise SystemError(f'Multiple files found for layer {layer}: {", ".join(str(x) for x in side_matches[layer]) }')
|
||||
|
||||
unitses = set(layer.cam_source.units for items in layers.values() for _path, layer in items)
|
||||
if len(unitses) != 1:
|
||||
|
@ -551,6 +551,8 @@ def svg_to_gerber(infile, outfile, layer=None, trace_space:'mm'=0.1, vectorizer=
|
|||
candidates = [
|
||||
# somewhere in $PATH
|
||||
'svg-flatten',
|
||||
# in user-local pip installation
|
||||
Path.home() / '.local' / 'bin' / 'svg-flatten',
|
||||
# next to our current python interpreter (e.g. in virtualenv
|
||||
str(Path(sys.executable).parent / 'svg-flatten'),
|
||||
# next to this python source file in the development repo
|
||||
|
|
|
@ -352,16 +352,22 @@ int main(int argc, char **argv) {
|
|||
int usvg_rc=-1;
|
||||
for (int i=0; i<3; i++) {
|
||||
const char *usvg_envvar;
|
||||
if (i == 0) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
if ((usvg_envvar = getenv("USVG")) == NULL) {
|
||||
continue;
|
||||
} else {
|
||||
command_line[0] = "usvg";
|
||||
}
|
||||
} else if (i == 1) {
|
||||
break;
|
||||
|
||||
case 1:
|
||||
command_line[0] = "usvg";
|
||||
} else {
|
||||
break;
|
||||
|
||||
case 2:
|
||||
command_line[0] = loc_in_home.c_str();
|
||||
break;
|
||||
}
|
||||
|
||||
struct subprocess_s subprocess;
|
||||
|
|
Ładowanie…
Reference in New Issue