Commits

jaraco  committed 1eaa228

Added support for regenating the HTML docs on the fly when creating the windows executable

  • Participants
  • Parent commits cf12fa3

Comments (0)

Files changed (1)

File eodsfetch/setup-eodsfetch.py

 from distutils.core import setup
 import py2exe
 
-setup(console=['eodsfetch.py'],
-       script_args=('py2exe',),
-       data_files=[('.',['eodsfetch.bat'])]
-      )
+def publish_readme():
+	"""Generate html readme from the ReStructuredText docs"""
+	readme_src = 'readme.rst'
+	readme_docs = [readme_src]
+	try:
+		from docutils.core import publish_file
+		readme_html = 'readme.html'
+		publish_file(
+			source_path = readme_src,
+			destination_path = readme_html,
+			)
+		readme_docs.append(readme_html)
+	except ImportError:
+		pass
+	return readme_docs
+
+setup(
+	console=['eodsfetch.py'],
+	script_args=('py2exe',),
+	data_files=[('.',['eodsfetch.bat'] + publish_readme())],
+)