mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
* setup: On Python 2.4, don't egg-depend on docutils if a docutils is
already installed -- else it will be overwritten.
This commit is contained in:
parent
e212d0a0b1
commit
649ce723c1
3
CHANGES
3
CHANGES
@ -13,6 +13,9 @@ Changes in trunk
|
||||
* sphinx.builder: Handle unavailability of TOC relations (previous/
|
||||
next chapter) more gracefully in the HTML builder.
|
||||
|
||||
* setup: On Python 2.4, don't egg-depend on docutils if a docutils is
|
||||
already installed -- else it will be overwritten.
|
||||
|
||||
|
||||
Release 0.1.61843 (Mar 24, 2008)
|
||||
================================
|
||||
|
25
setup.py
25
setup.py
@ -1,10 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import ez_setup
|
||||
ez_setup.use_setuptools()
|
||||
import sphinx
|
||||
|
||||
import sys
|
||||
from setuptools import setup, Feature
|
||||
|
||||
import sphinx
|
||||
|
||||
long_desc = '''
|
||||
Sphinx is a tool that makes it easy to create intelligent and beautiful
|
||||
documentation for Python projects (or other documents consisting of
|
||||
@ -32,6 +34,25 @@ are already present, work fine and can be seen "in action" in the Python docs:
|
||||
and inclusion of appropriately formatted docstrings.
|
||||
'''
|
||||
|
||||
requires = ['Pygments>=0.8', 'docutils>=0.4']
|
||||
|
||||
if sys.version_info < (2, 4):
|
||||
print 'ERROR: Sphinx requires at least Python 2.4 to run.'
|
||||
sys.exit(1)
|
||||
|
||||
if sys.version_info < (2, 5):
|
||||
# Python 2.4's distutils doesn't automatically install an egg-info,
|
||||
# so an existing docutils install won't be detected -- in that case,
|
||||
# remove the dependency from setup.py
|
||||
try:
|
||||
import docutils
|
||||
if int(docutils.__version__[2]) < 4:
|
||||
raise ValueError('docutils not recent enough')
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
del requires[-1]
|
||||
|
||||
setup(
|
||||
name='Sphinx',
|
||||
version=sphinx.__version__,
|
||||
@ -66,5 +87,5 @@ setup(
|
||||
'sphinx-quickstart = sphinx.quickstart:main'
|
||||
]
|
||||
},
|
||||
install_requires=['Pygments>=0.8', 'docutils>=0.4']
|
||||
install_requires=requires,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user