Skip to content

Commit

Permalink
Fix documentation path
Browse files Browse the repository at this point in the history
  • Loading branch information
PrimozGodec committed Mar 20, 2024
1 parent e267649 commit 055cc2a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,20 @@

def include_documentation(local_dir, install_dir):
global DATA_FILES
if 'bdist_wheel' in sys.argv and not path.exists(local_dir):
print("Directory '{}' does not exist. "
"Please build documentation before running bdist_wheel."
.format(path.abspath(local_dir)))
sys.exit(0)

doc_files = []
for dirpath, dirs, files in walk(local_dir):
doc_files.append((dirpath.replace(local_dir, install_dir),
[path.join(dirpath, f) for f in files]))
for dirpath, _, files in walk(local_dir):
doc_files.append(
(
dirpath.replace(local_dir, install_dir),
[path.join(dirpath, f) for f in files],
)
)
DATA_FILES.extend(doc_files)


if __name__ == '__main__':
include_documentation('doc/_build/htmlhelp', 'help/orange3-worldhappiness')
include_documentation('doc/_build/html', 'help/orange3-worldhappiness')
setup(
name=NAME,
version=VERSION,
Expand Down

0 comments on commit 055cc2a

Please sign in to comment.