kernsuite / packaging

Use this repository to report issues with packages or request new packages
13 stars 4 forks source link

incorrect casacore version reported + can't pip install python-casacore #221

Closed o-smirnov closed 4 years ago

o-smirnov commented 4 years ago

@tammojan already noted this in #218, but I want to open an issue so that the problem is visible up front (also for others who come to report it).

Anyway, pip install --no-binary python-casacore python-casacore doesn't work, and the version reported is super confusing.

    RuntimeError: Your casacore version is too old. Minimum is 3.1.1, you have 2.5.0
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/oms/.venv/test/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xz8rmppo/python-casacore/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xz8rmppo/python-casacore/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-q6fc_sj_/install-record.txt --single-version-externally-managed --compile --install-headers /home/oms/.venv/test/include/site/python3.6/python-casacore Check the logs for full command output.

(test) oms@tshikovski:~$ dpkg -la | grep casacore
ii  casacore-data                                 20190909-000001-1                                all          Casacore data files
ii  casacore-dev:amd64                            3.0.0-4kern2                                     amd64        CASA core library development files
ii  casacore-doc                                  3.0.0-4kern2                                     all          CASA core library (documentation)
ii  casacore-tools                                3.0.0-4kern2                                     amd64        Tools built with CASA
ii  python-casacore                               3.0.0-1kern1                                     amd64        Python 2 bindings to the casacore library
tammojan commented 4 years ago

The version reported is confusing indeed; casacore 3.0.0 reports that it's 2.5.0. I'm afraid I can't fix that. Otherwise, I hope that the warning is informative: python-casacore 3.3.0 needs casacore >= 3.1.1. I'll put this in the README as well.

gijzelaerr commented 4 years ago

so 3.0.0 reports the version wrongly as 2.5.0, but the version is too old anyway. So or use an older python-casacore, or wait for @Athanaseus to upload casacore 3.3.0 to the new KERN-6.

o-smirnov commented 4 years ago

Is there any way to add an additional failure message to the python-casacore build?

At the moment installing python-casacore from PyPI into a virtualenv on Ubuntu 18.04 fails with that super unhelpful (and misleading) message. It confuses me, and I'm on this discussion with you, imagine how much it will confuse a regular user.

An error message to the tune of "please pip install python-casacore==3.2.0 if you're using KERN-5 and Ubuntu 18" would be very hepful.

Otherwise I have to go pin a python-casacore version in all my packages, which is also a pain...

Athanaseus commented 4 years ago

I successfully uploaded the latest casacore on KERN-6.

sudo add-apt-repository ppa:kernsuite/kern-6
sudo apt-get update

NB: Other packages are progressively being added. It's not official until a release announcement is made.

gijzelaerr commented 4 years ago

great work @Athanaseus ! awesome

gijzelaerr commented 4 years ago

The error message is going to be improved upstream, meanwhile casacore 3.3.0 is available in KERN-6. closing this issue.