Build and ship inkscape inx files

This commit is contained in:
Florian Festi 2017-02-25 20:01:03 +01:00
parent 41bc4d028f
commit 42ab40da86
3 changed files with 23 additions and 0 deletions

View File

@ -1,3 +1,4 @@
include README.txt LICENSE.txt
include examples/*.svg
include documentation/presentation.odp documentation/TODO.txt
include inkex/*.txt

1
inkex/inkscape.txt Normal file
View File

@ -0,0 +1 @@
Inkscape .inx files get generated here.

View File

@ -1,6 +1,24 @@
#!/usr/bin/env python3
from setuptools import setup, find_packages
from setuptools.command.build_py import build_py
import os
import glob
class CustomBuildExtCommand(build_py):
"""Customized setuptools install command - prints a friendly greeting."""
def buildInkscapeExt(self):
os.system("%s %s" % (os.path.join("scripts", "boxes2inkscape"), "inkex"))
def run(self):
self.execute(self.buildInkscapeExt, ())
if os.name == "posix":
if self.distribution.data_files is None:
self.distribution.data_files = []
self.distribution.data_files.append(
("/usr/share/inkscape/extensions/", [i for i in glob.glob(os.path.join("inkex", "*.inx"))]))
build_py.run(self)
setup(name='boxes',
version='0.1',
@ -11,6 +29,9 @@ setup(name='boxes',
packages=find_packages(),
install_requires=['cairocffi'],
scripts=['scripts/boxes', 'scripts/boxesserver'],
cmdclass={
'build_py': CustomBuildExtCommand,
},
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Console",