-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
93 lines (81 loc) · 2.79 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# -*- coding: utf-8 -*-
"""\
============================
robotframework-drupallibrary
============================
RobotFramework keywords and utilities for Drupal testings
"""
from setuptools import setup, find_packages
import os, sys
version = '1.0.0-dev'
this_directory = os.path.abspath(os.path.dirname(__file__))
def read(*names):
fpath = os.path.join(this_directory, *names)
if not os.path.isfile(fpath):
# Sphinx docs are not in sdist
return ''
return open(fpath, 'r').read().strip()
long_description = '\n\n'.join(
[read(*paths) for paths in (('README.rst',),
('docs', 'contributors.rst'),
('docs', 'changes.rst'))]
)
dev_require = ['Sphinx', 'sphinxcontrib-robotdoc']
if sys.version_info < (2, 7):
dev_require += ['unittest2']
try:
from sphinx.setup_command import BuildDoc
except ImportError:
# We won't have it
class BuildDoc(object):
def run(self):
print "Sphinx is not installed here"
print "Please run \"pip install robotframework-drupallibrary[dev]\" first"
class CustomSphinxBuilder(BuildDoc):
"""Customized command for build_sphinx
"""
def run(self):
# We need to create some assets in the source tree first...
from robot.libdoc import libdoc
out_file = os.path.join(self.source_dir, 'robot-doc.html')
libdoc('DrupalLibrary::None', out_file)
# ... before running the regular Sphinx builder
BuildDoc.run(self)
setup(name='robotframework-drupallibrary',
version=version,
description="robotframework keywords and utilities for Drupal testings",
long_description=long_description,
classifiers=[
"Programming Language :: Python",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Quality Assurance",
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7"
],
keywords='robotframework drupal',
author='Gilles Lenfant',
author_email='[email protected]',
url='https://github.com/alterway/robotframework-drupallibrary',
license='GPLv3',
packages=find_packages('src'),
package_dir = {'': 'src'},
include_package_data=True,
zip_safe=False,
install_requires=[
'setuptools',
'robotframework-selenium2library',
'lxml'
],
entry_points={
},
tests_require=dev_require,
test_suite='tests.all_tests',
extras_require={
'dev': dev_require
},
cmdclass={
'build_sphinx': CustomSphinxBuilder
}
)