jlaska / pytest-github

Plugin for py.test that associates tests with github issues using a marker
MIT License
18 stars 9 forks source link

pypandoc (1.1.3) fails to install when installing pytest-github (0.0.8) #6

Open jladdjr opened 6 years ago

jladdjr commented 6 years ago

Getting the following error when trying to install the latest pytest-github: https://gist.github.com/jladdjr/79a89ba1ff3b722f87b0294331a2e04a

As a workaround, I downloaded the pytest-github source, removed the requirement from setup.py, and pip installed from source without any issues.

How is pypandoc being used by pytest-github? (I see that it's a tool for converting markdown files - is the library used to generate docs for the plugin?) Wondering if the requirement could be removed (or, if it's really needed, wondering if it still needs to be pinned).

jladdjr commented 6 years ago

Also noticed that pypandoc is the only requirement listed as being outdated: https://requires.io/github/jlaska/pytest-github/requirements/?branch=master

jlaska commented 6 years ago

pypandoc is a requirement ofsetuptools-markdown. It was previously pinned to pypandoc<1.2.0 to workaround a problem (004be4069782c3dbd6ebe2d1e71c753b921ed847). It's used when building and publishing official releases.

In your case, it seems you're missing https://pandoc.org itself. Couple of options forward here, rework things to remove the dependency on setuptools-markdown (and pypandoc). Explore whether the initial issue resulting in a pinned dependency has been resolved. Or {{ other }}?

jladdjr commented 6 years ago

In your case, it seems you're missing https://pandoc.org itself

I did do a brew install pandoc (after originally seeing an error suggesting that I was missing pandoc) and confirmed that I have the latest installed:

ovpn-123-202% pandoc -v
pandoc 2.0.2
Compiled with pandoc-types 1.17.3, texmath 0.10, skylighting 0.4.3.2
Default user data directory: /Users/jladd/.pandoc
Copyright (C) 2006-2017 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

I just created a new virtual env, and tried pip install github again to see what would happen - seeing what looks like the same error:

...
RuntimeError: Couldn't call pandoc to get output formats. Output from pandoc:
    ('pandoc [OPTIONS] [FILES]\n  -f FORMAT, -r FORMAT  --from=FORMAT, --read=FORMAT                    \n  -t FORMAT, -w FORMAT  --to=
FORMAT, --write=FORMAT                     \n  -o FILE               --output=FILE                                   \n
        --data-dir=DIRECTORY                            \n                        --base-header-level=NUMBER                      \n
                     --indented-code-classes=STRING                  \n  -F PROGRAM            --filter=PROGRAM
        \n
...

That output seems to suggest that pandoc is called and responding with help text. If pandoc is being called, wonder if it's receiving the right arguments.

chrismeyersfsu commented 6 years ago

Doesn't look like setuptools-markdown depends on a particular version of pypandoc.

At this point in time, the biggest problem seems to be that getting the binary version of pandoc that pypandoc>1.2.0 interacts with is hard to find. The < 1.2.0 version relies on pandoc -h outputting formats. Newer version of pandoc -h outputs the help.

New version of pypandoc account for the older way of calling pandoc and the new way of calling pandoc.

This is all to say, I think it's ok to remove your <1.2.0 requirement of pypandoc.