neuronsimulator / nrn

NEURON Simulator
http://nrn.readthedocs.io
Other
381 stars 114 forks source link

More informative error when cannot import hoc module #2984

Closed nrnhines closed 1 month ago

nrnhines commented 1 month ago

Extracted relevant fragments for neuron module __init__.py from

commit f58692e91dbc77b20fda846b1f2deb8b68eeaffe
Author: Olli Lupton <oliver.lupton@epfl.ch>
Date:   Thu Apr 20 16:13:40 2023 +0200

    Update Python library handling (#2317)

This does not include the changes to nrn/src/nrniv/pyenv.cpp (launching nrniv) where the master version states in load_nrnpython

        // It's possible to get this far with an incompatible version, if nrnpy_pyversion and
        // friends were set from the environment to bypass nrnpyenv.sh, and nrniv -python was
        // launched.
nrnhines commented 1 month ago

dirs_exist_ok keyword arg was added to shutil.copytree in python version 3.8. Should we no longer attempt to build a wheel for 3.7?

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

azure-pipelines[bot] commented 1 month ago

✔️ a79a7a366381c55ecd618b95b9780c15253a1b9f -> Azure artifacts URL

mgeplf commented 1 month ago

Should we no longer attempt to build a wheel for 3.7?

Python 3.7 was end of life more than a year ago (2023-06-27), so I don't think it's needed.

nrnhines commented 1 month ago

I fixed nrn/setup.exe so that it would work for Python 3.7. Mostly because I was thinking the windows installer for 8.2 was being built for python 3.7 to 3.12 and I wanted to keep that behavior. Currently for 8.2, which are the python 3.7 wheels that we attempt to build?

mgeplf commented 1 month ago

Currently for 8.2, which are the python 3.7 wheels that we attempt to build?

I don't happen to know the answer to that, I was just commenting that there is no longer support from python for 3.7, so I would say it's not needed for others to maintain compatibility with it.