Here's a small patch against the 'Release 7.3' branch to account for the DESTDIR environment variable during install:
https://www.dropbox.com/s/lf58yyn8kdhh15f/destdir.patch
This is essential for MacPorts (see the destroot entry here), but may also be useful for packaging on other platforms.
Respect DESTDIR during install
Re: Respect DESTDIR during install
Thanks for the patches. I was unaware of DESTDIR. I do have a question, though, before I commit. In nrn/src/Makefile.am in four places
you replace
with
and I am wondering about the extra '/' and whether it should be
Just a few weeks ago I had a problem with a path that began with '//'. But I want to verify that your install tests succeed without the extra '/'.
you replace
Code: Select all
$(prefix)
Code: Select all
$(DESTDIR)/$(bindir)
Code: Select all
$(DESTDIR)$(bindir)
Re: Respect DESTDIR during install
Sorry. For $(prefix) above I meant $(bindir). That is in three places and $(prefix) is in one place.
Re: Respect DESTDIR during install
Yes you're right, these path separators are unnecessary. Updated incremental patches are here (separator fix is at the bottom):hines wrote:Thanks for the patches. I was unaware of DESTDIR. I do have a question, though, before I commit. In nrn/src/Makefile.am in four places
you replacewithCode: Select all
$(prefix)
and I am wondering about the extra '/' and whether it should beCode: Select all
$(DESTDIR)/$(bindir)
Just a few weeks ago I had a problem with a path that began with '//'. But I want to verify that your install tests succeed without the extra '/'.Code: Select all
$(DESTDIR)$(bindir)
https://www.dropbox.com/s/x8pmkvc2alt9h ... -all.patch
Re: Respect DESTDIR during install
Thanks again. I pushed the patches (slightly modified so that the absence of a DESTDIR does not affect setup.py).
http://www.neuron.yale.edu/hg/neuron/nr ... b4d7b9ecb1
http://www.neuron.yale.edu/hg/neuron/nr ... b4d7b9ecb1
Re: Respect DESTDIR during install
Oops, didn't realize that os.getenv returns None if it can't find the variable, thanks for catching that.hines wrote:Thanks again. I pushed the patches (slightly modified so that the absence of a DESTDIR does not affect setup.py).
http://www.neuron.yale.edu/hg/neuron/nr ... b4d7b9ecb1
There's also the option to call getenv with a default value:
Code: Select all
destdir = os.getenv("DESTDIR", "")