Skip to content

Commit

Permalink
Build Cython extensions out-of-source (#3302)
Browse files Browse the repository at this point in the history
Also remove unused setup.py.in
  • Loading branch information
JCGoran authored Jan 8, 2025
1 parent d68acad commit 9500741
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 42 deletions.
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def setup_package():
]

if Components.MUSIC:
extensions += [
music_extensions = [
CyExtension(
"neuronmusic",
["src/neuronmusic/neuronmusic.pyx"],
Expand All @@ -444,6 +444,9 @@ def setup_package():
**extension_common_params,
)
]
for ext in music_extensions:
ext.cython_c_in_temp = True
extensions.append(ext)

if Components.RX3D:
include_dirs = ["share/lib/python/neuron/rxd/geometry3d", numpy.get_include()]
Expand All @@ -467,7 +470,7 @@ def setup_package():

logging.info("RX3D compile flags %s" % str(rxd_params))

extensions += [
rxd_extensions = [
CyExtension(
"neuron.rxd.geometry3d.graphicsPrimitives",
["share/lib/python/neuron/rxd/geometry3d/graphicsPrimitives.pyx"],
Expand All @@ -490,6 +493,9 @@ def setup_package():
**rxd_params,
),
]
for ext in rxd_extensions:
ext.cython_c_in_temp = True
extensions.append(ext)

logging.info("RX3D is %s", "ENABLED" if Components.RX3D else "DISABLED")

Expand Down
40 changes: 0 additions & 40 deletions src/neuronmusic/setup.py.in

This file was deleted.

0 comments on commit 9500741

Please sign in to comment.