dstndstn / astrometry.net

Astrometry.net -- automatic recognition of astronomical images
http://astrometry.net
Other
666 stars 187 forks source link

This needs swig to work for me or make py fails #266

Closed knservis closed 1 year ago

knservis commented 1 year ago

https://github.com/dstndstn/astrometry.net/blob/c71156ab866d775cad01a03f301cf4c619834e52/doc/install_astrometry_on_linux.sh#L8

dstndstn commented 1 year ago

If you download one of the source code releases (eg go to https://github.com/dstndstn/astrometry.net/releases/tag/0.91 and download the "astrometry.net-0.91.tar.gz" link), then swig has already been run.

dstndstn commented 1 year ago

ie, swig is only required if you "git clone" the code, rather than downloading a released version.

Feel free to send a Pull Request with an additional line to "apt install swig".

knservis commented 1 year ago

Hi @dstndstn ,

thanks for the response. I did not git clone. Here is what I am doing:

FROM debian:stretch

RUN apt update

RUN apt install -y make build-essential python3 python3-pip netpbm libnetpbm10-dev zlib1g-dev libcairo2-dev libjpeg-dev libcfitsio-dev libbz2-dev wget wcslib-dev 
RUN pip3 install numpy
RUN pip3 install scipy fitsio

RUN mkdir -p /src/astrometry.net-0.91-src/
WORKDIR /src/astrometry.net-0.91-src/
RUN apt install -y curl
RUN curl http://astrometry.net/downloads/astrometry.net-0.91.tar.gz | tar xvzf - 

RUN cd astrometry.net-* && make
RUN apt install -y swig
RUN cd astrometry.net-* && make py
RUN cd astrometry.net-* && make extra
RUN cd astrometry.net-* && make install

This is part of a docker file. If in the above I remove swig it fails at make py.

dstndstn commented 1 year ago

Oh, thanks for this detailed report! Yes, I see, I also need to pre-run 'swig' in the 'solver' directory.

I just released version 0.92, where I have pre-run swig in that directory.

However, when I just tried, it still tried to run swig! I don't know why -- the timestamps should be correct, but python distutils is deciding to try to re-run it.

A hack work-around is to add to your dockerfile,

RUN ln -s /bin/echo /usr/local/bin/swig

just before the 'make py' -- it will run that "fake swig" and continue the build.

knservis commented 1 year ago

Sounds less risky to just install swig.. :-)