blob: 5fe9e6a52f6d4f0aeadd955d5b5d0ef659e8ffcc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/usr/bin/python
from __future__ import print_function
import os
import sys
# check where to look for the inkscape files to bundle
# - btool builds used [root]/inkscape
# - cmake builds use [root]/build/inkscape unless "DESTDIR" is specified
def get_inkscape_dist_dir():
# fisrt check the environment variable
sourcedir = os.getenv('INKSCAPE_DIST_PATH')
if sourcedir is None:
sourcedir = ''
if not os.path.isdir(sourcedir):
sourcedir = '..\\..\\inkscape'
if not os.path.isdir(sourcedir):
sourcedir = '..\\..\\build\\inkscape'
if not os.path.isdir(sourcedir):
print("could not find inkscape distribution files, please set environment variable 'INKSCAPE_DIST_PATH'")
sys.exit(1)
return sourcedir
|