rob-smallshire / cartouche

A Sphinx extension to convert help() friendly docstrings to Sphinx markup
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

setup.py imports code that tries to load sphinx #10

Closed rob-smallshire closed 11 years ago

rob-smallshire commented 11 years ago

Original author: stevet...@gmail.com (October 05, 2012 18:28:36)

What steps will reproduce the problem?

  1. pip install cartouche or in source folder python setup.py install before sphinx is installed

What is the expected output? What do you see instead?

I expect the sphinx requirement to be resolved automatically, instead it just explodes because setup.py tries to import sphinx when it is importing the version number from the code.

Please provide any additional information below.

This line is the problem:

from cartouche import __version__ as version

You can't do that. if you replace it with this line:

version = 0.9

it works! it gives pip a chance to resolve the sphinx requirement automatically.

Original issue: http://code.google.com/p/cartouche/issues/detail?id=10