Build and ship inkscape inx files
This commit is contained in:
parent
41bc4d028f
commit
42ab40da86
|
@ -1,3 +1,4 @@
|
||||||
include README.txt LICENSE.txt
|
include README.txt LICENSE.txt
|
||||||
include examples/*.svg
|
include examples/*.svg
|
||||||
include documentation/presentation.odp documentation/TODO.txt
|
include documentation/presentation.odp documentation/TODO.txt
|
||||||
|
include inkex/*.txt
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Inkscape .inx files get generated here.
|
21
setup.py
21
setup.py
|
@ -1,6 +1,24 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
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',
|
setup(name='boxes',
|
||||||
version='0.1',
|
version='0.1',
|
||||||
|
@ -11,6 +29,9 @@ setup(name='boxes',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
install_requires=['cairocffi'],
|
install_requires=['cairocffi'],
|
||||||
scripts=['scripts/boxes', 'scripts/boxesserver'],
|
scripts=['scripts/boxes', 'scripts/boxesserver'],
|
||||||
|
cmdclass={
|
||||||
|
'build_py': CustomBuildExtCommand,
|
||||||
|
},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Development Status :: 4 - Beta",
|
"Development Status :: 4 - Beta",
|
||||||
"Environment :: Console",
|
"Environment :: Console",
|
||||||
|
|
Loading…
Reference in New Issue