Skip to content

Commit

Permalink
bugfix setup
Browse files Browse the repository at this point in the history
  • Loading branch information
yocabon committed Jan 20, 2021
1 parent 0dfee27 commit 3720927
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from subprocess import check_call
import os
import tempfile
import sys

HERE = path.normpath(path.dirname(__file__))

Expand All @@ -24,12 +25,13 @@ def read_doc(filepath):
with tempfile.TemporaryDirectory() as tmpdirname:
xml_filepath = path.join(tmpdirname, 'README.xml')
md_filepath = path.join(tmpdirname, 'README.md')
check_call(['asciidoctor', '-b', 'docbook', filepath, '-o', xml_filepath])
check_call(['pandoc', '-f', 'docbook', '-t', 'markdown_strict', xml_filepath, '-o', md_filepath])
use_shell = sys.platform.startswith("win")
check_call(['asciidoctor', '-b', 'docbook', filepath, '-o', xml_filepath], shell=use_shell)
check_call(['pandoc', '-f', 'docbook', '-t', 'markdown_strict', xml_filepath, '-o', md_filepath], shell=use_shell)
content = read_file(md_filepath)

except FileNotFoundError:
warnings.warn('cannot convert asciidoc to markdown.')
warnings.warn(f'cannot convert asciidoc to markdown.')
content = read_file(filepath)

return content
Expand All @@ -42,7 +44,7 @@ def read_doc(filepath):
setuptools.setup(
# description
name='kapture',
version="1.0.12",
version="1.0.13",
author="naverlabs",
author_email="[email protected]",
description="kapture: file format for SfM",
Expand Down

0 comments on commit 3720927

Please sign in to comment.