Merge pull request #1445 from minrk/nosphinx

Don't build sphinx docs for sdists, it makes our source distributions unnecessarily large (and their generation much slower).  Online access to docs is pervasive these days, and our docs are also much easier to build now, reducing the justification for keeping built docs in the source download.
pull/37/head
Fernando Perez 14 years ago
commit 4b73021647

@ -154,35 +154,6 @@ if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'):
'cd docs/man && gzip -9c pycolor.1 > pycolor.1.gz'),
]
# Only build the docs if sphinx is present
try:
import sphinx
except ImportError:
pass
else:
# The Makefile calls the do_sphinx scripts to build html and pdf, so
# just one target is enough to cover all manual generation
# First, compute all the dependencies that can force us to rebuild the
# docs. Start with the main release file that contains metadata
docdeps = ['IPython/core/release.py']
# Inculde all the reST sources
pjoin = os.path.join
for dirpath,dirnames,filenames in os.walk('docs/source'):
if dirpath in ['_static','_templates']:
continue
docdeps += [ pjoin(dirpath,f) for f in filenames
if f.endswith('.txt') ]
# and the examples
for dirpath,dirnames,filenames in os.walk('docs/example'):
docdeps += [ pjoin(dirpath,f) for f in filenames
if not f.endswith('~') ]
# then, make them all dependencies for the main html docs
to_update.append(
('docs/dist/index.html',
docdeps,
"cd docs && make dist")
)
[ target_update(*t) for t in to_update ]

@ -288,7 +288,7 @@ def target_update(target,deps,cmd):
command if target is outdated."""
if target_outdated(target,deps):
system(cmd)
os.system(cmd)
#---------------------------------------------------------------------------
# Find scripts

Loading…
Cancel
Save