modification to allow one to package boxes for Debian
This commit is contained in:
parent
715a2aca0b
commit
b288f58057
13
setup.py
13
setup.py
|
@ -45,6 +45,19 @@ class CustomBuildExtCommand(build_py):
|
||||||
self.execute(self.updatePOT, ())
|
self.execute(self.updatePOT, ())
|
||||||
self.execute(self.generate_mo_files, ())
|
self.execute(self.generate_mo_files, ())
|
||||||
self.execute(self.buildInkscapeExt, ())
|
self.execute(self.buildInkscapeExt, ())
|
||||||
|
|
||||||
|
if 'FAKEROOTKEY' in os.environ:
|
||||||
|
# we are probably running under fakeroot
|
||||||
|
# so we are probably building a Debian package
|
||||||
|
# let us define a simple path!
|
||||||
|
path="/usr/share/inkscape/extensions"
|
||||||
|
self.distribution.data_files.append(
|
||||||
|
(path,
|
||||||
|
[i for i in glob.glob(os.path.join("inkex", "*.inx"))]))
|
||||||
|
self.distribution.data_files.append((path, ['scripts/boxes']))
|
||||||
|
else:
|
||||||
|
# we are surely not building a Debian package
|
||||||
|
# then here is the default behavior:
|
||||||
try:
|
try:
|
||||||
path = check_output(["inkscape", "-x"]).decode().strip()
|
path = check_output(["inkscape", "-x"]).decode().strip()
|
||||||
if not os.access(path, os.W_OK): # Can we install globaly
|
if not os.access(path, os.W_OK): # Can we install globaly
|
||||||
|
|
Loading…
Reference in New Issue