diff --git a/0001-Unbundle-Random123.patch b/0001-Unbundle-Random123.patch index d5b7d20..d4b620f 100644 --- a/0001-Unbundle-Random123.patch +++ b/0001-Unbundle-Random123.patch @@ -1,7 +1,7 @@ From b5a4df18e249b9b0181698e3353b57e1063ebede Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Wed, 19 Jun 2019 18:35:39 +0100 -Subject: [PATCH 1/7] Unbundle Random123 +Subject: [PATCH 1/4] Unbundle Random123 --- configure.ac | 2 +- diff --git a/0002-Unbundle-readline.patch b/0002-Unbundle-readline.patch index b0bea03..0cccb38 100644 --- a/0002-Unbundle-readline.patch +++ b/0002-Unbundle-readline.patch @@ -1,7 +1,7 @@ From 6acd994ba41f05cef28c789c9125f264f0d4e9cc Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Wed, 19 Jun 2019 18:37:49 +0100 -Subject: [PATCH 2/7] Unbundle readline +Subject: [PATCH 2/4] Unbundle readline --- configure.ac | 3 +-- diff --git a/0003-Install-ivstream-header.patch b/0003-Install-ivstream-header.patch deleted file mode 100644 index 8dbdf2d..0000000 --- a/0003-Install-ivstream-header.patch +++ /dev/null @@ -1,22 +0,0 @@ -From a9e73c36d673e02d5cf946a4356d2feec04993d2 Mon Sep 17 00:00:00 2001 -From: "Ankur Sinha (Ankur Sinha Gmail)" -Date: Wed, 19 Jun 2019 22:15:36 +0100 -Subject: [PATCH 3/7] Install ivstream header - ---- - src/ivos/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/ivos/Makefile.am b/src/ivos/Makefile.am -index 03884ffc..dc21173c 100755 ---- a/src/ivos/Makefile.am -+++ b/src/ivos/Makefile.am -@@ -8,4 +8,4 @@ SUBDIRS = InterViews OS - - AM_CXXFLAGS = @MINGW_CFLAG@ - --EXTRA_DIST = ivstrm.h -+include_HEADERS = ivstrm.h ivstream.h --- -2.21.0 - diff --git a/0003-Remove-duplicate-file-installation.patch b/0003-Remove-duplicate-file-installation.patch new file mode 100644 index 0000000..d946ae5 --- /dev/null +++ b/0003-Remove-duplicate-file-installation.patch @@ -0,0 +1,25 @@ +From 73683d594350e10d30f65b163db7b8aafc54313b Mon Sep 17 00:00:00 2001 +From: "Ankur Sinha (Ankur Sinha Gmail)" +Date: Sun, 23 Jun 2019 18:31:52 +0100 +Subject: [PATCH 3/4] Remove duplicate file installation + +--- + src/nrniv/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/nrniv/Makefile.am b/src/nrniv/Makefile.am +index 97e9cdaf..aff9aef4 100755 +--- a/src/nrniv/Makefile.am ++++ b/src/nrniv/Makefile.am +@@ -162,7 +162,7 @@ noinst_HEADERS = ndatclas.h nrnclass.h nrnmenu.h nrnoc2iv.h ppshape.h \ + multisplitcontrol.h nvector_nrnthread.h \ + bbsavestate.h nrnbbcore_write.h nrnsection_mapping.h\ + nrnmusic.cpp nrndae.h matrixmap.h \ +- structpool.h nrnhash_alt.h ++ nrnhash_alt.h + + ## We have to play a trick on automake to get it to install the .o files in + ## an architecture-dependent subdirectory. (Apparently automake's authors +-- +2.21.0 + diff --git a/0004-Build-python-bits-in-the-source-tree.patch b/0004-Build-python-bits-in-the-source-tree.patch new file mode 100644 index 0000000..4a59dba --- /dev/null +++ b/0004-Build-python-bits-in-the-source-tree.patch @@ -0,0 +1,46 @@ +From c1f3492e0ba9a985cd786fc975670c31bc2e8a4c Mon Sep 17 00:00:00 2001 +From: "Ankur Sinha (Ankur Sinha Gmail)" +Date: Mon, 15 Jul 2019 23:43:16 +0100 +Subject: [PATCH 4/4] Build python bits in the source tree + +--- + src/neuronmusic/setup.py.in | 2 +- + src/nrnpython/setup.py.in | 3 +-- + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/src/neuronmusic/setup.py.in b/src/neuronmusic/setup.py.in +index ddc21c68..9a91d421 100644 +--- a/src/neuronmusic/setup.py.in ++++ b/src/neuronmusic/setup.py.in +@@ -29,6 +29,6 @@ neuronmusic_module = Extension( + + setup(name="neuronmusic", version="@PACKAGE_VERSION@", + description = "NEURON+MUSIC python interface", +- package_dir = {'':instdir+'/share/nrn/lib/python'}, ++ package_dir = {'':nrn_srcdir+'/share/nrn/lib/python'}, + ext_modules=[neuronmusic_module] + ) +diff --git a/src/nrnpython/setup.py.in b/src/nrnpython/setup.py.in +index 19bec5f2..3e2560a1 100644 +--- a/src/nrnpython/setup.py.in ++++ b/src/nrnpython/setup.py.in +@@ -19,7 +19,6 @@ destdir = os.getenv("DESTDIR") + if not destdir: + destdir = "" + +-instdir = destdir + "@prefix@" + if nrn_srcdir[0] != '/' : + nrn_srcdir = '../../' + nrn_srcdir + +@@ -125,7 +124,7 @@ if build_rx3d: + + setup(name="NEURON", version="@PACKAGE_VERSION@", + description = "NEURON bindings for python", +- package_dir = {'':instdir+'/share/nrn/lib/python'}, ++ package_dir = {'':nrn_srcdir+'/share/lib/python'}, + packages=packages, + data_files = [('neuron', [nrn_srcdir + '/share/lib/python/neuron/help_data.dat'])], + ext_modules=ext_modules +-- +2.21.0 + diff --git a/0004-Install-all-headers.patch b/0004-Install-all-headers.patch deleted file mode 100644 index d051c34..0000000 --- a/0004-Install-all-headers.patch +++ /dev/null @@ -1,270 +0,0 @@ -From 3b8051545b49878a3f0ab917408f64e5f259b4bb Mon Sep 17 00:00:00 2001 -From: "Ankur Sinha (Ankur Sinha Gmail)" -Date: Sun, 23 Jun 2019 18:19:28 +0100 -Subject: [PATCH 4/7] Install all headers - ---- - src/gnu/Makefile.am | 2 +- - src/ivoc/Makefile.am | 2 +- - src/memacs/Makefile.am | 2 +- - src/mesch/Makefile.am | 2 +- - src/modlunit/Makefile.am | 2 +- - src/ni_pci_6229/Makefile.am | 2 +- - src/nmodl/Makefile.am | 2 +- - src/nrniv/Makefile.am | 2 +- - src/nrnoc/Makefile.am | 5 +---- - src/nrnpython/Makefile.am | 2 +- - src/oc/Makefile.am | 6 +----- - src/readline/Makefile.am | 2 +- - src/scopmath/Makefile.am | 3 +-- - src/sparse13/Makefile.am | 3 +-- - src/sundials/cvodes/Makefile.am | 2 +- - src/sundials/ida/Makefile.am | 2 +- - src/sundials/shared/Makefile.am | 2 +- - src/uxnrnbbs/Makefile.am | 2 +- - 18 files changed, 18 insertions(+), 27 deletions(-) - -diff --git a/src/gnu/Makefile.am b/src/gnu/Makefile.am -index 533cf878..27f7d682 100755 ---- a/src/gnu/Makefile.am -+++ b/src/gnu/Makefile.am -@@ -18,7 +18,7 @@ libneuron_gnu_la_SOURCES = ACG.cpp Binomial.cpp Complex.cpp DiscUnif.cpp \ - Normal.cpp Poisson.cpp RNG.cpp Random.cpp RndInt.cpp SmplHist.cpp \ - SmplStat.cpp Uniform.cpp Weibull.cpp builtin.cpp d_avec.cpp d_vec.cpp - --noinst_HEADERS = ACG.h Binomial.h Complex.h DiscUnif.h Erlang.h \ -+pkginclude_HEADERS = ACG.h Binomial.h Complex.h DiscUnif.h Erlang.h \ - Geom.h HypGeom.h LogNorm.h MLCG.h NegExp.h Normal.h Poisson.h RNG.h \ - Random.h RndInt.h SmplHist.h SmplStat.h Uniform.h Weibull.h \ - neuron_gnu_builtin.h d_avec.h d_defs.h d_vec.h neuron_gnu_std.h -diff --git a/src/ivoc/Makefile.am b/src/ivoc/Makefile.am -index 4ab2fdd2..8c0b2a6f 100755 ---- a/src/ivoc/Makefile.am -+++ b/src/ivoc/Makefile.am -@@ -61,7 +61,7 @@ libivoc_la_SOURCES = ivoc.cpp xmenu.cpp graph.cpp rubband.cpp grmanip.cpp \ - ocpointer.cpp gifimage.cpp ocnoiv1.cpp grglyph.cpp mlinedit.cpp \ - $(sysdep_sources) ivocman1.cpp ocptrvector.cpp - --noinst_HEADERS = apwindow.h axis.h bndedval.h cbwidget.h checkpnt.h \ -+pkginclude_HEADERS = apwindow.h axis.h bndedval.h cbwidget.h checkpnt.h \ - datapath.h dbrowser.h epsprint.h field.h fourier.h \ - graph.h hocmark.h idraw.h ivoc.h ivocconf.h mymath.h htlist.h \ - objcmd.h oc2iv.h ocbox.h ocbrowsr.h occlass.h ocdeck.h ocfile.h \ -diff --git a/src/memacs/Makefile.am b/src/memacs/Makefile.am -index 57ae9354..c59b7bbf 100755 ---- a/src/memacs/Makefile.am -+++ b/src/memacs/Makefile.am -@@ -16,7 +16,7 @@ libmemacs_la_SOURCES = ansi.c basic.c bind.c buffer.c display.c file.c \ - search.c spawn.c tcap.c termio.c window.c word.c - - ## The list of header files that also have to go into the distribution. --noinst_HEADERS = ebind.h edef.h efunc.h epath.h estruct.h redef.h intfunc.h -+pkginclude_HEADERS = ebind.h edef.h efunc.h epath.h estruct.h redef.h intfunc.h - - ## Extra stuff that should be put in a distribution but doesn't get - ## compiled. -diff --git a/src/mesch/Makefile.am b/src/mesch/Makefile.am -index 0b4faae2..5cd86d22 100755 ---- a/src/mesch/Makefile.am -+++ b/src/mesch/Makefile.am -@@ -14,5 +14,5 @@ libmeschach_la_SOURCES = arnoldi.c bdfactor.c bkpfacto.c chfactor.c \ - zmatio.c zmatlab.c zmatop.c zmemory.c znorm.c zqrfctr.c zschur.c \ - zsolve.c zvecop.c - --noinst_HEADERS = err.h iter.h machine.h matlab.h matrix.h matrix2.h \ -+pkginclude_HEADERS = err.h iter.h machine.h matlab.h matrix.h matrix2.h \ - meminfo.h oldnames.h sparse.h sparse2.h zmatrix.h zmatrix2.h -diff --git a/src/modlunit/Makefile.am b/src/modlunit/Makefile.am -index 88c10563..309a6ab3 100755 ---- a/src/modlunit/Makefile.am -+++ b/src/modlunit/Makefile.am -@@ -5,7 +5,7 @@ modlunit_SOURCES = parse1.y lex.l consist.c declare.c init.c io.c \ - units1.c version.c - - ## The list of .h files that are needed in the distribution. --noinst_HEADERS = extargs.h extdef.h model.h symbol.h units.h parse1.h \ -+pkginclude_HEADERS = extargs.h extdef.h model.h symbol.h units.h parse1.h \ - macmunit.h modlunit.h - - ## for building a dos version -diff --git a/src/ni_pci_6229/Makefile.am b/src/ni_pci_6229/Makefile.am -index 5362243b..fead6aa7 100644 ---- a/src/ni_pci_6229/Makefile.am -+++ b/src/ni_pci_6229/Makefile.am -@@ -35,6 +35,6 @@ $(NOD)/ai.o $(NOD)/ao.o - - libni6229_la_LIBADD = $(LO) - --noinst_HEADERS = nrndaq.h -+pkginclude_HEADERS = nrndaq.h - - EXTRA_DIST = notes_niddk run .runinfo test1.hoc test5.hoc -diff --git a/src/nmodl/Makefile.am b/src/nmodl/Makefile.am -index 2d14a3b6..29281fba 100755 ---- a/src/nmodl/Makefile.am -+++ b/src/nmodl/Makefile.am -@@ -19,7 +19,7 @@ EXTRA_DIST = cout.c lex.c nmodl.mak - AM_YFLAGS = -d - - ## The list of .h files that are needed in the distribution. --noinst_HEADERS = extdef.h extdef2.h extdef5.h modl.h symbol.h parse1.h \ -+pkginclude_HEADERS = extdef.h extdef2.h extdef5.h modl.h symbol.h parse1.h \ - difeqdef.h macnmodl.h carbonnmodl.h nmodlfunc.h - - -diff --git a/src/nrniv/Makefile.am b/src/nrniv/Makefile.am -index 97e9cdaf..45b48b8d 100755 ---- a/src/nrniv/Makefile.am -+++ b/src/nrniv/Makefile.am -@@ -152,7 +152,7 @@ nrniv_DEPENDENCIES = \ - - - ## Header files that must be included in the distribution: --noinst_HEADERS = ndatclas.h nrnclass.h nrnmenu.h nrnoc2iv.h ppshape.h \ -+pkginclude_HEADERS = ndatclas.h nrnclass.h nrnmenu.h nrnoc2iv.h ppshape.h \ - rot3band.h rotate3d.h secbrows.h shape.h shapeplt.h singlech.h \ - linmod.h nrnste.h arraypool.h structpool.h \ - kschan.h kssingle.h nonlinz.h nrnhash.h \ -diff --git a/src/nrnoc/Makefile.am b/src/nrnoc/Makefile.am -index 8d38192b..154d3681 100755 ---- a/src/nrnoc/Makefile.am -+++ b/src/nrnoc/Makefile.am -@@ -101,10 +101,7 @@ hocusr.h: $(nsrc)/nrnoc/neuron.h $(nsrc)/oc/mk_hocusr_h.py $(nsrc)/nrnoc/options - ## Header files that need to be installed: - pkginclude_HEADERS = neuron.h md1redef.h md2redef.h section.h nrnoc_ml.h \ - cabvars.h membdef.h membfunc.h nrniv_mf.h nrn_ansi.h nrncvode.h \ -- options.h nrnredef.h multisplit.h multicore.h nmodlmutex.h -- --## Header files that need to be included in the distribution but not installed: --noinst_HEADERS = hocusr.h \ -+ options.h nrnredef.h multisplit.h multicore.h nmodlmutex.h hocusr.h \ - osxdlfcn.h osxdlfcn.c multicore.c \ - nonvintblock.h nrndae_c.h - -diff --git a/src/nrnpython/Makefile.am b/src/nrnpython/Makefile.am -index 1bf86d8c..52b452e3 100755 ---- a/src/nrnpython/Makefile.am -+++ b/src/nrnpython/Makefile.am -@@ -27,7 +27,7 @@ libnrnpython@npy_pyver10@_la_SOURCES = nrnpython.cpp nrnpy_hoc.cpp nrnpy_nrn.cpp - - librxdmath_la_SOURCES = rxdmath.c $(EXTEND) - --noinst_HEADERS = nrnpython.h nrnwrap_Python.h nrnpy_reg.h \ -+pkginclude_HEADERS = nrnpython.h nrnwrap_Python.h nrnpy_reg.h \ - nrnpy_hoc_2.h nrnpy_hoc_3.h \ - nrnpy_nrn_2.h nrnpy_nrn_3.h hoccontext.h \ - nrnpy_utils.h rxd.h grids.h -diff --git a/src/oc/Makefile.am b/src/oc/Makefile.am -index 7c673b85..2e0d3640 100755 ---- a/src/oc/Makefile.am -+++ b/src/oc/Makefile.am -@@ -62,11 +62,7 @@ oc_LDADD = libocxt.la liboc.la \ - pkginclude_HEADERS = hoc.h hoclist.h hocdec.h hocassrt.h nrnisaac.h \ - oc_ansi.h hocparse.h ocfunc.h ocmisc.h nrnjava.h hocgetsym.h \ - nrnpthread.h hoc_membf.h nrnran123.h scoplib_ansi.h nrnapi.h \ -- nrnassrt.h -- --## Header files that need to be copied into the distribution but do not need --## to be installed: --noinst_HEADERS = code.h equation.h hocmodl.h hocstr.h \ -+ nrnassrt.h code.h equation.h hocmodl.h hocstr.h \ - profile.h redef.h parse.h mcran4.h nrnmpi.h nrnrt.h isaac64.h \ - nrnfilewrap.h nrn_vsscanf.c classreg.h - -diff --git a/src/readline/Makefile.am b/src/readline/Makefile.am -index 53dab988..60438d2c 100755 ---- a/src/readline/Makefile.am -+++ b/src/readline/Makefile.am -@@ -3,7 +3,7 @@ lib_LTLIBRARIES = libreadline.la - - libreadline_la_SOURCES = readline.c history.c funmap.c keymaps.c - --noinst_HEADERS = chardefs.h emacs_keymap.h history.h keymaps.h \ -+pkginclude_HEADERS = chardefs.h emacs_keymap.h history.h keymaps.h \ - readline.h vi_keymap.h - - install-exec-hook: -diff --git a/src/scopmath/Makefile.am b/src/scopmath/Makefile.am -index 6de7c306..de8758e0 100755 ---- a/src/scopmath/Makefile.am -+++ b/src/scopmath/Makefile.am -@@ -14,11 +14,10 @@ libscopmath_la_SOURCES = abort.c adams.c adeuler.c adrunge.c advance.c \ - ssimplic_thread.c - - ## Header files that need to be included in the distribution: --noinst_HEADERS = errcodes.h f2c.h scopenv.h newton_struct.h -+pkginclude_HEADERS = errcodes.h f2c.h scopenv.h newton_struct.h scoplib.h - - EXTRA_DIST = scpmth.mak - --pkginclude_HEADERS = scoplib.h - - AM_CPPFLAGS = -DHOC=1 - AM_CFLAGS = @MINGW_CFLAG@ -diff --git a/src/sparse13/Makefile.am b/src/sparse13/Makefile.am -index 04bcdd17..b99b98c3 100755 ---- a/src/sparse13/Makefile.am -+++ b/src/sparse13/Makefile.am -@@ -8,9 +8,8 @@ libsparse13_la_SOURCES = spalloc.c spbuild.c spfactor.c spoutput.c \ - cspalloc.c cspbuild.c cspfactor.c cspoutput.c \ - cspsolve.c csputils.c - --pkginclude_HEADERS = spmatrix.h spconfig.h cspmatrix.h cspredef.h -+pkginclude_HEADERS = spmatrix.h spconfig.h cspmatrix.h cspredef.h spdefs.h - --noinst_HEADERS = spdefs.h - - - -diff --git a/src/sundials/cvodes/Makefile.am b/src/sundials/cvodes/Makefile.am -index 5178f3b8..a88ca359 100755 ---- a/src/sundials/cvodes/Makefile.am -+++ b/src/sundials/cvodes/Makefile.am -@@ -16,7 +16,7 @@ libcvodes_la_SOURCES = \ - cvodesio.c \ - cvspgmr.c - --noinst_HEADERS = \ -+pkginclude_HEADERS = \ - cvband.h \ - cvband_impl.h \ - cvbandpre.h \ -diff --git a/src/sundials/ida/Makefile.am b/src/sundials/ida/Makefile.am -index 0bf005d0..17aff4ab 100755 ---- a/src/sundials/ida/Makefile.am -+++ b/src/sundials/ida/Makefile.am -@@ -14,7 +14,7 @@ libida_la_SOURCES = \ - idaio.c \ - idaspgmr.c - --noinst_HEADERS = \ -+pkginclude_HEADERS = \ - idaband.h \ - idaband_impl.h \ - idabbdpre.h \ -diff --git a/src/sundials/shared/Makefile.am b/src/sundials/shared/Makefile.am -index e1d22cc5..4d71b36c 100755 ---- a/src/sundials/shared/Makefile.am -+++ b/src/sundials/shared/Makefile.am -@@ -25,7 +25,7 @@ libshared_la_SOURCES = band.c dense.c iterative.c \ - nvector.c nvector_serial.c smalldense.c spgmr.c sundialsmath.c \ - $(PARSRC1) - --noinst_HEADERS = band.h dense.h iterative.h \ -+pkginclude_HEADERS = band.h dense.h iterative.h \ - nvector.h nvector_serial.h smalldense.h spgmr.h \ - sundialsmath.h sundialstypes.h \ - $(PARINC1) -diff --git a/src/uxnrnbbs/Makefile.am b/src/uxnrnbbs/Makefile.am -index 8bf07048..f5e10ac2 100755 ---- a/src/uxnrnbbs/Makefile.am -+++ b/src/uxnrnbbs/Makefile.am -@@ -10,4 +10,4 @@ bin_PROGRAMS = mos2nrn - - mos2nrn_SOURCES = mos2nrn.cpp - --noinst_HEADERS = nrnbbs.h -+pkginclude_HEADERS = nrnbbs.h --- -2.21.0 - diff --git a/0005-Disable-python-bits-in-install-exec-hook.patch b/0005-Disable-python-bits-in-install-exec-hook.patch deleted file mode 100644 index 7d7df5a..0000000 --- a/0005-Disable-python-bits-in-install-exec-hook.patch +++ /dev/null @@ -1,36 +0,0 @@ -From ab6649fc16e0d4a4c02b0697efd25a309502478f Mon Sep 17 00:00:00 2001 -From: "Ankur Sinha (Ankur Sinha Gmail)" -Date: Wed, 19 Jun 2019 21:45:15 +0100 -Subject: [PATCH 5/7] Disable python bits in install exec hook - ---- - Makefile.am | 13 ------------- - 1 file changed, 13 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 6e7b64d6..9f5c4deb 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -67,19 +67,6 @@ mswin: - - endif - --if BUILD_NRNPYTHON --install-exec-hook: -- echo "enter install-exec-hook in nrn/Makefile.am" -- if test "@ac_pysetup@" != "no" ; then \ -- cd src/nrnpython ; \ -- $(PYTHON) setup.py install @ac_pysetup@ ;\ -- fi -- if test "@ac_diagnose@" != "no" ; then \ -- sh bin/nrndiagnose.sh ; \ -- fi -- echo "leave install-exec-hook in nrn/Makefile.am" --endif -- - ALPHADIR = hines@neuron.yale.edu:/home/htdocs/ftp/neuron/versions/alpha - - if MAKE_RPMS --- -2.21.0 - diff --git a/0006-Remove-duplicate-file-installation.patch b/0006-Remove-duplicate-file-installation.patch deleted file mode 100644 index 9b7389e..0000000 --- a/0006-Remove-duplicate-file-installation.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7cd0cc04b21ef57b6e7d83adfe7a13f8cbb39125 Mon Sep 17 00:00:00 2001 -From: "Ankur Sinha (Ankur Sinha Gmail)" -Date: Sun, 23 Jun 2019 18:31:52 +0100 -Subject: [PATCH 6/7] Remove duplicate file installation - ---- - src/nrniv/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/nrniv/Makefile.am b/src/nrniv/Makefile.am -index 45b48b8d..1c2e40a3 100755 ---- a/src/nrniv/Makefile.am -+++ b/src/nrniv/Makefile.am -@@ -162,7 +162,7 @@ pkginclude_HEADERS = ndatclas.h nrnclass.h nrnmenu.h nrnoc2iv.h ppshape.h \ - multisplitcontrol.h nvector_nrnthread.h \ - bbsavestate.h nrnbbcore_write.h nrnsection_mapping.h\ - nrnmusic.cpp nrndae.h matrixmap.h \ -- structpool.h nrnhash_alt.h -+ nrnhash_alt.h - - ## We have to play a trick on automake to get it to install the .o files in - ## an architecture-dependent subdirectory. (Apparently automake's authors --- -2.21.0 - diff --git a/0007-Install-nrnmpiuse-header.patch b/0007-Install-nrnmpiuse-header.patch deleted file mode 100644 index 7898154..0000000 --- a/0007-Install-nrnmpiuse-header.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d6254235e7a94a8981071a7fe0504f7c215bf304 Mon Sep 17 00:00:00 2001 -From: "Ankur Sinha (Ankur Sinha Gmail)" -Date: Sun, 23 Jun 2019 19:33:47 +0100 -Subject: [PATCH 7/7] Install nrnmpiuse header - ---- - src/oc/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/oc/Makefile.am b/src/oc/Makefile.am -index 2e0d3640..de42b72a 100755 ---- a/src/oc/Makefile.am -+++ b/src/oc/Makefile.am -@@ -64,7 +64,7 @@ pkginclude_HEADERS = hoc.h hoclist.h hocdec.h hocassrt.h nrnisaac.h \ - nrnpthread.h hoc_membf.h nrnran123.h scoplib_ansi.h nrnapi.h \ - nrnassrt.h code.h equation.h hocmodl.h hocstr.h \ - profile.h redef.h parse.h mcran4.h nrnmpi.h nrnrt.h isaac64.h \ -- nrnfilewrap.h nrn_vsscanf.c classreg.h -+ nrnfilewrap.h nrn_vsscanf.c classreg.h nrnmpiuse.h - - ## files that depend on the existence of parse.h - ## this allows parallel make -j to work at the beginning when parse.h --- -2.21.0 - diff --git a/neuron.spec b/neuron.spec index 058b639..5bbb951 100644 --- a/neuron.spec +++ b/neuron.spec @@ -1,8 +1,4 @@ -# This is a serial build of NEURON without Python or other bindings. -# Both the MPI builds and Python bindings require NEURON to be already -# installed in the system---they are build as post-installation hooks. So, we -# first package a serial version of NEURON and then package those separately -# after using this package as a BR +# This is a serial build of NEURON %global _description %{expand: NEURON is a simulation environment for modeling individual neurons and networks of neurons. It provides tools for conveniently building, managing, and using @@ -22,17 +18,20 @@ Please install the %{name}-devel package to compile nmodl files and so on. # fails somehow, disabled by default %bcond_with metis +# Music support +%bcond_with music + # IV uses libtiff from 1995 and threfore has not been packaged yet %bcond_with iv Name: neuron Version: 7.7.1 -Release: 6%{?dist} +Release: 8%{?dist} Summary: A flexible and powerful simulator of neurons and networks License: GPLv3+ URL: http://www.neuron.yale.edu/neuron/ -Source0: https://github.com/neuronsimulator/%{tarname}/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/neuronsimulator/%{tarname}/archive/%{version}/%{name}-%{version}.tar.gz Patch0: 0001-Unbundle-Random123.patch # libstdc++ bundled is from 1988: seems heavily modified. Headers from there @@ -42,12 +41,8 @@ Patch0: 0001-Unbundle-Random123.patch # version # Unbundle readline Patch1: 0002-Unbundle-readline.patch -Patch2: 0003-Install-ivstream-header.patch -Patch3: 0004-Install-all-headers.patch -Patch4: 0005-Disable-python-bits-in-install-exec-hook.patch -Patch5: 0006-Remove-duplicate-file-installation.patch -Patch6: 0007-Install-nrnmpiuse-header.patch - +Patch2: 0003-Remove-duplicate-file-installation.patch +Patch3: 0004-Build-python-bits-in-the-source-tree.patch # Random123 does not build on these, so neither can NEURON # https://github.com/neuronsimulator/nrn/issues/114 @@ -71,8 +66,6 @@ BuildRequires: libtool BuildRequires: metis-devel %endif BuildRequires: ncurses-devel -# Required by mk_hocusr.py -BuildRequires: python3 BuildRequires: readline-devel BuildRequires: Random123-devel @@ -97,9 +90,18 @@ BuildArch: noarch %description doc Documentation for %{name} +%package -n python3-%{name} +Summary: Python3 interface to %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-Cython + +%description -n python3-%{name} %_description + %prep -%autosetup -n %{tarname}-%{version} -p1 -S git +%autosetup -n %{tarname}-%{version} -S git # Remove executable perms from source files find src -type f -executable ! -name "*.sh" | xargs chmod -x @@ -146,26 +148,56 @@ popd %global metis_flags " " %endif +# --disable-pytsetup simply prevents the post-exec hook where it wants to run +# python setup.py. We do that ourselves in our two sections %configure %{iv_flags} %{metis_flags} \ --with-gnu-ld --disable-pysetup \ ---disable-rpm-rules --without-paranrn \ ---without-nrnpython +--with-nrnpython=%{__python3} \ +--disable-rpm-rules --without-paranrn sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool && \ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %make_build - +# For cythonisation +%make_build -C share/lib/python + +# MUSIC support +%if %{with music} +%make_build -C src/neuronmusic +pushd src/neuronmusic +%{py3_build} +popd +%endif %install %make_install -# Installs it even when we're not providing nrnpy -rm -fv $RPM_BUILD_ROOT/%{_bindir}/*nrnpy* -f + +# Music support +%if %{with music} +pushd src/neuronmusic +%{py3_install} +popd +%endif + + +# Bits from the post install hook +# It requires the libraries before to be installed, not just built, so it must +# be done here. The only alternative is a different package that requires this, +# but this is simpler + +# It can't find these somehow. +RPM_LD_FLAGS="%{?__global_ldflags} -L$RPM_BUILD_ROOT/%{_libdir}" +pushd src/nrnpython/ +%{py3_build} +%{py3_install} +popd + # Remove installed libtool copy rm -fv $RPM_BUILD_ROOT/%{_datadir}/%{tarname}/libtool # Move to includedir -mv $RPM_BUILD_ROOT/%{_libdir}/nrnconf.h $RPM_BUILD_ROOT/%{_includedir}/nrnconf.h +mv $RPM_BUILD_ROOT/%{_libdir}/nrnconf.h $RPM_BUILD_ROOT/%{_includedir}/%{tarname}/nrnconf.h # Post install clean up # Remove stray object files @@ -174,7 +206,8 @@ mv $RPM_BUILD_ROOT/%{_libdir}/nrnconf.h $RPM_BUILD_ROOT/%{_includedir}/nrnconf.h find . $RPM_BUILD_ROOT/%{_libdir}/ -name "*.o" -exec rm -f '{}' \; # Remove libtool archives find . $RPM_BUILD_ROOT/%{_libdir}/ -name "*.la" -exec rm -f '{}' \; - +# Remove duplicate files. These are installed in the correct python locations already +rm -rf $RPM_BUILD_ROOT/%{_datadir}/%{tarname}/lib/python/%{name} # Rename oc to hoc to prevent conflicts with origin-client binary oc # rhbz: 1696118 @@ -206,6 +239,8 @@ mv $RPM_BUILD_ROOT/%{_bindir}/oc $RPM_BUILD_ROOT/%{_bindir}/hoc %{_bindir}/nrnoc %{_bindir}/nrnoc_makefile %{_bindir}/nrnocmodl +%{_bindir}/nrnpyenv.sh +%{_bindir}/set_nrnpyenv.sh %{_bindir}/hoc %{_bindir}/sortspike # Libs @@ -223,10 +258,14 @@ mv $RPM_BUILD_ROOT/%{_bindir}/oc $RPM_BUILD_ROOT/%{_bindir}/hoc %{_libdir}/libnrnmpi.so.0 %{_libdir}/libnrnoc.so.0.0.0 %{_libdir}/libnrnoc.so.0 +%{_libdir}/libnrnpython.so.0.0.0 +%{_libdir}/libnrnpython.so.0 %{_libdir}/liboc.so.0.0.0 %{_libdir}/liboc.so.0 %{_libdir}/libocxt.so.0.0.0 %{_libdir}/libocxt.so.0 +%{_libdir}/librxdmath.so.0.0.0 +%{_libdir}/librxdmath.so.0 %{_libdir}/libsparse13.so.0.0.0 %{_libdir}/libsparse13.so.0 %{_libdir}/libscopmath.so.0 @@ -240,6 +279,15 @@ mv $RPM_BUILD_ROOT/%{_bindir}/oc $RPM_BUILD_ROOT/%{_bindir}/hoc %dir %{_datadir}/%{tarname} %{_datadir}/%{tarname}/lib +# Python bits +%files -n python3-%{name} +# A data file resides here +%{python3_sitelib}/%{name} +# The libraries are here +%{python3_sitearch}/%{name} +# Egg info +%{python3_sitearch}/NEURON-7.7-py%{python3_version}.egg-info + %files devel %license Copyright %doc README.md @@ -251,24 +299,29 @@ mv $RPM_BUILD_ROOT/%{_bindir}/oc $RPM_BUILD_ROOT/%{_bindir}/hoc %{_libdir}/libnrniv.so %{_libdir}/libnrnmpi.so %{_libdir}/libnrnoc.so +%{_libdir}/libnrnpython.so %{_libdir}/liboc.so %{_libdir}/libocxt.so +%{_libdir}/librxdmath.so %{_libdir}/libsparse13.so %{_libdir}/libscopmath.so %{_libdir}/libivos.so # Bundles %{_libdir}/libsundials.so -%{_includedir}/nrnconf.h -%{_includedir}/ivstream.h -%{_includedir}/ivstrm.h - %files doc %license Copyright %{_datadir}/%{tarname}/examples %{_datadir}/%{tarname}/demo %changelog +* Mon Jul 15 2019 Ankur Sinha - 7.7.1-8 +- Enable Python build also + +* Sat Jul 13 2019 Ankur Sinha - 7.7.1-7 +- Test a fixed python setup +- https://github.com/neuronsimulator/nrn/issues/238#issuecomment-505191230 + * Sun Jun 23 2019 Ankur Sinha - 7.7.1-6 - Add another patch