-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathsetup.py
More file actions
69 lines (61 loc) · 2.59 KB
/
setup.py
File metadata and controls
69 lines (61 loc) · 2.59 KB
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
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
def get_restbuilder_version():
# load sphinxcontrib.restbuilder from local path.
# (Lots of work, just to get the version info)
from os.path import join, dirname
import sys
restbuilder_path = join(dirname(__file__), 'sphinxcontrib', 'restbuilder.py')
if sys.version_info >= (3, 5):
# requires Python 3.5 or up.
import importlib.util
spec = importlib.util.spec_from_file_location('sphinxcontrib.restbuilder', restbuilder_path)
restbuilder = importlib.util.module_from_spec(spec)
spec.loader.exec_module(restbuilder)
else:
# Python 2.7 support
import imp
restbuilder = imp.load_source('sphinxcontrib.restbuilder', restbuilder_path)
return restbuilder.__version__
long_desc = '''
Sphinx_ extension to build and write reStructuredText_ (reST / rst) files.
This extension is in particular useful to use in combination with the autodoc
extension to automatically generate documentation for use by any rst parser
(such as the GitHub wiki, which does not support the advanced Sphinx directives).
In itself, the extension is fairly straightforward -- it takes the parsed
reStructuredText file from Sphinx_ and outputs it as reStructuredText.
.. _Sphinx: http://sphinx-doc.org/
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
'''
requires = ['Sphinx>=1.4', 'docutils']
setup(
name='sphinxcontrib-restbuilder',
version=get_restbuilder_version(),
url='https://github.com/sphinx-contrib/restbuilder',
download_url='http://pypi.python.org/pypi/sphinxcontrib-restbuilder',
license='BSD 2-Clause',
author='Freek Dijkstra',
author_email='freek@macfreek.nl',
description='Sphinx extension to output reST files.',
long_description=long_desc,
zip_safe=False,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Framework :: Sphinx :: Extension',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Documentation :: Sphinx',
'Topic :: Software Development :: Documentation',
'Topic :: Text Processing :: Markup :: reStructuredText',
],
platforms='any',
python_requires='>=2.7, !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*',
packages=find_packages(exclude=['tests']),
include_package_data=True,
install_requires=requires,
namespace_packages=['sphinxcontrib'],
)