Commit 1429b75
authored
Fix Python extension library name (#3679)
When generating the name of the NEURON Python libraries (like `hoc.cp313.so`),
we make use of `CMAKE_LIBRARY_ARCHITECTURE`. On Fedora with the clang compiler,
`CMAKE_LIBRARY_ARCHITECTURE` is set to `x86_64-redhat-linux-gnu`, but Python
does not recognize this extension when importing:
```
$ python -c 'import importlib.machinery;print(importlib.machinery.EXTENSION_SUFFIXES)'
['.cpython-313-x86_64-linux-gnu.so', '.abi3.so', '.so']
```
The solution is to not rely on `CMAKE_LIBRARY_ARCHITECTURE` and just always set
the extension to `${ARCH}-linux-gnu`, which should be importable in Python on
all "reasonable" Linux platforms.1 parent 191e426 commit 1429b75
1 file changed
Lines changed: 1 addition & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 128 | + | |
144 | 129 | | |
145 | 130 | | |
146 | 131 | | |
| |||
0 commit comments