Skip to content

Commit ddb045c

Browse files
committed
setup: Use older version of pypandoc for setuptools-markdown
`setuptools-markdown` relies on a deprecated function `pypandoc.convert`. This patch explicitly requests an older version of `pypandoc` until a patch has been released for `setuptools-markdown`: - msabramo/setuptools-markdown#21 In addition, the environment variable `NO_PANDOC` has been introduced to allow to build and install `docker-inside` without adding `setuptools-markdown` and `pypandoc` as a build time dependency (`setup_requires`).
1 parent 2cf2595 commit ddb045c

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

setup.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,22 @@
2121
else:
2222
__version__ = "{0}.{1}".format(__version__, build_id)
2323

24+
setup_extra = dict()
25+
if os.environ.get("NO_PANDOC", "") == "": # use pandoc
26+
setup_extra['long_description_markdown_filename'] = 'README.md'
27+
setup_extra['setup_requires'] = [
28+
'setuptools-markdown>=0.4.1',
29+
# pypandoc.convert is deprecated but setuptools-markdown still relies on it
30+
# -> so use an older version of pypandoc that still provides this until
31+
# https://github.com/msabramo/setuptools-markdown/pull/21 is released
32+
'pypandoc>=1.2.0,<1.3.0'
33+
]
34+
2435

2536
setup(
2637
name='docker-inside',
2738
version=__version__,
2839
description='Run a docker container with you workspace and user',
29-
long_description_markdown_filename='README.md',
3040
url="https://github.com/boon-code/docker-inside",
3141
license=__license__,
3242
author=__author__,
@@ -56,5 +66,5 @@
5666
"docker>=2.7.0",
5767
"dockerpty>=0.4.1"
5868
],
59-
setup_requires=['setuptools-markdown'],
69+
**setup_extra
6070
)

0 commit comments

Comments
 (0)