-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathsetup.py
53 lines (46 loc) · 1.7 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# sudo zypper in python-setuptools
# http://docs.python.org/2/distutils/setupscript.html#installing-additional-files
#
import sys,os,glob,re
from distutils.core import setup
from setuptools.command.test import test as TestCommand
inkex_dir='/usr/share/inkscape/extensions'
sys.path.append(inkex_dir) # gears-dev wants to import inkex.py
import importlib
g = importlib.import_module('gears-dev') # import 'gears-dev' as g
## Unfinished.
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
#import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
setup(name='inkscape-gears-dev',
version = g.__version__,
description="Inkscape extension for generating gears. Development version.",
author="Jürgen Weigert, et.al.",
author_email="juewei@fabmail.org",
url='https://github.com/jnweiger/inkscape-gears-dev',
scripts=['gears-dev.py', 'gears-dev.inx', 'README.md'],
license='GPL-2.0',
classifiers=[
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Environment :: Console',
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
],
cmdclass={'test': PyTest},
long_description="".join(open('README.md').readlines()),
# tests_require=['pytest'],
#packages=['inkscape-extensions-extra' ],
install_dir=inkex_dir,
#
)