cvangysel / pytrec_eval

pytrec_eval is an Information Retrieval evaluation tool for Python, based on the popular trec_eval.
http://ilps.science.uva.nl/
MIT License
290 stars 32 forks source link

python 3.7 support #9

Closed seanmacavaney closed 5 years ago

seanmacavaney commented 5 years ago

I get the following error when I attempt to install under python 3.7:

src/pytrec_eval.cpp:150:72: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
                 query_document_pairs[pair_idx].docno = PyUnicode_AsUTF8(inner_key);
                                                        ~~~~~~~~~~~~~~~~^~~~~~~~~~~
error: command 'gcc' failed with exit status 1

Steps to reproduce:

conda create -n py37 python=3.7
source activate py37
pip install pytrec_eval

Works fine under python 3.6.

Ricocotam commented 5 years ago

Hi, I just made a PR about this #10

cvangysel commented 5 years ago

This problem was resolved in #10. I added Python 3.7 as one of the default testing profile on the CI system. Thanks @Ricocotam for figuring out the fix!

I'll push out a new version of this package to PyPI soon.