This repository has been archived by the owner on Mar 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
73 lines (62 loc) · 2.4 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup script for pyqode.rst
"""
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
from pyqode.rst import __version__
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
if self.pytest_args:
self.pytest_args = self.pytest_args.replace('"', '').split(' ')
else:
self.pytest_args = []
print('running test command: py.test "%s"' % ' '.join(
self.pytest_args))
errno = pytest.main(self.pytest_args)
sys.exit(errno)
cmdclass = {'test': PyTest}
DESCRIPTION = 'Adds RestructuredText support to pyqode.core'
def readme():
if 'bdist_deb' in sys.argv:
return DESCRIPTION
return str(open('README.rst').read())
setup(
name='pyqode.rst',
namespace_packages=['pyqode'],
version=__version__,
packages=[p for p in find_packages() if 'test' not in p],
keywords=['RestructuredText', 'editor', 'pyqode'],
url='https://github.com/pyQode/pyqode.rst',
license='MIT',
author='Colin Duquesnoy',
author_email='[email protected]',
description=DESCRIPTION,
long_description=readme(),
install_requires=['pyqode.core', 'restructuredtext_lint', 'docutils'],
tests_require=['pytest-cov', 'pytest-pep8', 'pytest'],
cmdclass=cmdclass,
classifiers=[
'Development Status :: 1 - Planning',
'Environment :: X11 Applications :: Qt',
'Environment :: Win32 (MS Windows)',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development :: Libraries :: Application Frameworks',
'Topic :: Software Development :: Widget Sets',
'Topic :: Text Editors :: Integrated Development Environments (IDE)'])