Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ include requirements*.txt

recursive-include i18n *.jaml *.yaml

recursive-include doc/visual-programming/build/htmlhelp *

include README.md
include README.pypi
include CONTRIBUTING.md
Expand Down
2 changes: 1 addition & 1 deletion doc/visual-programming/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,5 +381,5 @@


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {"https://docs.python.org/": None}
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}

21 changes: 14 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

try:
# need sphinx and recommonmark for build_htmlhelp command
from sphinx.setup_command import BuildDoc
# pylint: disable=unused-import
import sphinx
import recommonmark
have_sphinx = True
except ImportError:
Expand Down Expand Up @@ -393,16 +393,23 @@ def finalize_options(self):
HAVE_BUILD_HTML = os.path.exists("doc/visual-programming/build/htmlhelp/index.html")

if have_sphinx and HAVE_SPHINX_SOURCE:
class build_htmlhelp(BuildDoc):
class build_htmlhelp(Command):
user_options = []

def finalize_options(self):
pass

def initialize_options(self):
super().initialize_options()
self.build_dir = "doc/visual-programming/build"
self.source_dir = "doc/visual-programming/source"
self.builder = "htmlhelp"
self.version = VERSION

def run(self):
super().run()
subprocess.check_call([
"sphinx-build", "-b", "htmlhelp", "-d", "build/doctrees",
"-D", f"version={VERSION}",
"source", "build"
],
cwd="doc/visual-programming"
)
helpdir = os.path.join(self.build_dir, "htmlhelp")
files = find_htmlhelp_files(helpdir)
# add the build files to distribution
Expand Down