Skip to content

Commit

Permalink
Build and ship inkscape inx files
Browse files Browse the repository at this point in the history
  • Loading branch information
florianfesti committed Feb 25, 2017
1 parent 41bc4d0 commit 42ab40d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include README.txt LICENSE.txt
include examples/*.svg
include documentation/presentation.odp documentation/TODO.txt
include inkex/*.txt
1 change: 1 addition & 0 deletions inkex/inkscape.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Inkscape .inx files get generated here.
21 changes: 21 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -11,6 +29,9 @@
packages=find_packages(),
install_requires=['cairocffi'],
scripts=['scripts/boxes', 'scripts/boxesserver'],
cmdclass={
'build_py': CustomBuildExtCommand,
},
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Console",
Expand Down

0 comments on commit 42ab40d

Please sign in to comment.