dstndstn / astrometry.net

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

Astrometry.net python package location #220

Closed laheller closed 3 years ago

laheller commented 3 years ago

Is there a way to tell to build system (make install) to put astrometry.net Python package to custom location? It seems that it always puts hardcoded under /usr/lib/python folder, but on most systems there is only /usr/lib/python3.

dstndstn commented 3 years ago

If you set the INSTALL_DIR enviroment variable, that sets a custom location for the whole installation tree. For the Python modules, you can set the PY_INSTALL_BASE_DIR variable. The default is $INSTALL_DIR/lib/python/astrometry.

https://github.com/dstndstn/astrometry.net/blob/main/util/makefile.common#L24

laheller commented 3 years ago

@dstndstn thank you!

laheller commented 3 years ago

@dstndstn Can u provide an example, when or how to use that variable?

After build I tried: make install INSTALL_DIR=/usr PYTHON_SCRIPT="/usr/bin/python3" PY_INSTALL_BASE_DIR="/usr/lib/python3" But unfortunately it still installs to /usr/lib/python instead of the location I expected.

dstndstn commented 3 years ago

My mistake, the variable is PY_BASE_INSTALL_DIR and should have an 'astrometry/' suffix; eg,

make install INSTALL_DIR=/usr PYTHON_SCRIPT="/usr/bin/python3" PY_BASE_INSTALL_DIR="/usr/lib/python3/astrometry"

laheller commented 3 years ago

@dstndstn Thanks again, now it works as expected!