Skip to content

Commit

Permalink
SYN
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-shawley committed May 31, 2016
0 parents commit 1897ed2
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build/
dist/
*.egg-info/
__pycache__/
*.pyc
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
graft requires
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sphinx-swagger
==============

Generates a swagger API definition directly from `httpdomain`_ based
documentation.

.. _httpdomain: https://pythonhosted.org/sphinxcontrib-httpdomain/
2 changes: 2 additions & 0 deletions requires/development.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-r installation.txt
wheel
2 changes: 2 additions & 0 deletions requires/installation.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Sphinx>=1.4,<2
sphinxcontrib.httpdomain==1.5.0
33 changes: 33 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env python

import os.path

import setuptools

import sphinxswagger


def read_requirements(name):
requirements = []
with open(os.path.join('requires', name)) as req_file:
for line in req_file:
if '#' in line:
line = line[:line.index('#')]
line = line.strip()
if line.startswith('-r'):
requirements.extend(read_requirements(line[2:].strip()))
elif line and not line.startswith('-'):
requirements.append(line)
return requirements


setuptools.setup(
name='sphinx-swagger',
version=sphinxswagger.__version__,
description='Generate swagger definitions from sphinx docs',
long_description='\n'+open('README.rst').read(),
author='Dave Shawley',
author_email='[email protected]',
packages=setuptools.find_packages(),
install_requires=read_requirements('installation.txt'),
)
2 changes: 2 additions & 0 deletions sphinxswagger/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version_info = (0, 0, 0)
__version__ = '.'.join(str(v) for v in version_info)

0 comments on commit 1897ed2

Please sign in to comment.