lofar-astron / RMextract

extract TEC, vTEC, Earthmagnetic field and Rotation Measures from GPS and WMM data for radio interferometry observations
GNU General Public License v3.0
31 stars 22 forks source link

Make RMextract Python3.12 compatible #55

Closed gmloose closed 2 months ago

gmloose commented 3 months ago

Use scikit-build to build the C++ and Fortran extensions. Use pyproject.toml for all configurations, except for a few settings that must still be done in setup.py.

tammojan commented 2 months ago

Looks good! I've tested installing this in a clean ubuntu 22.04 docker.

A bit confusing is the message Building wheels for collected packages: UNKNOWN. I'm not sure where the UNKNOWN is from:

Building wheels for collected packages: UNKNOWN
  Building wheel for UNKNOWN (pyproject.toml) ... done
  Created wheel for UNKNOWN: filename=UNKNOWN-0.4.5.dev14+gdc748f8-cp310-cp310-linux_x86_64.whl size=10057976 sha256=7b331020f3b8a96c6f7aceec13f82f4e7f9180b8dbb43000bc66c3c3adc4465f
  Stored in directory: /tmp/pip-ephem-wheel-cache-167l20sq/wheels/6e/03/2c/86eb0e9219107144688a58de67602b28dc16c9357e8f533297
Successfully built UNKNOWN
Installing collected packages: UNKNOWN
Successfully installed UNKNOWN-0.4.5.dev14+gdc748f8

A missing dependency seems to be PySocks, without it I get

/usr/local/lib/python3.10/dist-packages/RMextract/getIONEX.py
ModuleNotFoundError: No module named 'socks
gmloose commented 2 months ago

Looks good! I've tested installing this in a clean ubuntu 22.04 docker.

A bit confusing is the message Building wheels for collected packages: UNKNOWN. I'm not sure where the UNKNOWN is from:

Building wheels for collected packages: UNKNOWN
  Building wheel for UNKNOWN (pyproject.toml) ... done
  Created wheel for UNKNOWN: filename=UNKNOWN-0.4.5.dev14+gdc748f8-cp310-cp310-linux_x86_64.whl size=10057976 sha256=7b331020f3b8a96c6f7aceec13f82f4e7f9180b8dbb43000bc66c3c3adc4465f
  Stored in directory: /tmp/pip-ephem-wheel-cache-167l20sq/wheels/6e/03/2c/86eb0e9219107144688a58de67602b28dc16c9357e8f533297
Successfully built UNKNOWN
Installing collected packages: UNKNOWN
Successfully installed UNKNOWN-0.4.5.dev14+gdc748f8

That shouldn't happen! What Python version are you using? And did you update pip before running pip install?

A missing dependency seems to be PySocks, without it I get

/usr/local/lib/python3.10/dist-packages/RMextract/getIONEX.py
ModuleNotFoundError: No module named 'socks

Hm, did I forget to add PySocks? If I recall correctly, it was recently added to setup.py, so I thought I had copied it over to pyproject.toml.

gmloose commented 2 months ago

I tried to reproduce what you did, but it works for me. I don't get UNKNOWN as package name, and PySocks (which is also mentioned in the dependencies in pyproject.toml) gets properly installed.