You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Craig Peterein <cr...@peterein.org> on 2002/10/31 01:59:11 UTC

[PATCH] DESTDIR support for python swig targets

Pretty self-explainatory.

Craig

* Makefile.in
  (swig-py-ext): Support DESTDIR for compiling.
  (install-swig-py-ext): Support DESTDIR for installation.

Index: Makefile.in
===================================================================
--- Makefile.in	(revision 3584)
+++ Makefile.in	(working copy)
@@ -264,14 +264,14 @@
 	    -I$(SWIG_SRC_DIR)                                      \
 	    -I$(abs_srcdir)/subversion/include $(SVN_APR_INCLUDES) \
 	    -S$(SWIG_SRC_DIR)                                      \
-	    -L$(prefix)/lib -L$(SVN_APR_PREFIX)/lib                \
+	    -L$(DESTDIR)$(prefix)/lib -L$(SVN_APR_PREFIX)/lib      \
             build --build-base=$(SWIG_BUILD_DIR)/python/build)
 
 install-swig-py-ext:
 	(cd $(SWIG_BUILD_DIR)/python;                       \
 	 $(PYTHON) $(SWIG_SRC_DIR)/python/setup.py          \
 	    -S$(SWIG_SRC_DIR)                               \
-            install --prefix $(prefix))
+            install --prefix $(DESTDIR)$(prefix))
 
 ### Build a tarball.
 dist: 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] DESTDIR support for python swig targets

Posted by cm...@collab.net.
cmpilato@collab.net writes:

> > > * Makefile.in
> > >   (swig-py-ext): Support DESTDIR for compiling.
> > >   (install-swig-py-ext): Support DESTDIR for installation.
> > 
> > Aplicado.  Gracias.
> 
> Thousands of all those who actually *know* Spanish for whatever that
> really translates to.  Something like "I am a graceful avacado" ...

And thousands of APOLOGIES TO all those who actually know *English*
... alright, I'm shutting the laptop *right now* -- I promise.

--C-Muck

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] DESTDIR support for python swig targets

Posted by cm...@collab.net.
cmpilato@collab.net writes:

> "Craig Peterein" <cr...@peterein.org> writes:
> 
> > Pretty self-explainatory.
> > 
> > Craig
> > 
> > * Makefile.in
> >   (swig-py-ext): Support DESTDIR for compiling.
> >   (install-swig-py-ext): Support DESTDIR for installation.
> 
> Aplicado.  Gracias.

Thousands of all those who actually *know* Spanish for whatever that
really translates to.  Something like "I am a graceful avacado" ...

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] DESTDIR support for python swig targets

Posted by cm...@collab.net.
"Craig Peterein" <cr...@peterein.org> writes:

> Pretty self-explainatory.
> 
> Craig
> 
> * Makefile.in
>   (swig-py-ext): Support DESTDIR for compiling.
>   (install-swig-py-ext): Support DESTDIR for installation.

Aplicado.  Gracias.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] DESTDIR support for python swig targets

Posted by Gustavo Niemeyer <ni...@conectiva.com>.
> Isn't $(prefix) typically an absolute path like "/usr" or "/usr/local"?  

Indeed.

> And actually, isn't $(prefix) just plain wrong in this instance?  I
> mean, $(prefix) is the install location for Subversion itself, which
> might be completely different than where I want my Python modules
> dumped.

It depends on what we're expecting to achieve. On one hand, if a user
wants to install subversion on /usr/local, he could expect everything
to be installed there. On the other hand, when he installs a python
module under /usr/local, his python most probably won't find his modules
without sys.path hacking.

> What's the difference between DESTDIR and prefix?  Perhaps we need
> only DESTDIR (and lose the prefix) here?

It's an option (you mean to use a fixed prefix, like /usr, right?).

I have some observations about the patch though:

> >  install-swig-py-ext:
> >  	(cd $(SWIG_BUILD_DIR)/python;                       \
> >  	 $(PYTHON) $(SWIG_SRC_DIR)/python/setup.py          \
> >  	    -S$(SWIG_SRC_DIR)                               \
> > -            install --prefix $(prefix))
> > +            install --prefix $(DESTDIR)$(prefix))

DESTDIR feets pretty well with distutil's install --root parameter:

  --root              install everything relative to this alternate root
                      directory

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] DESTDIR support for python swig targets

Posted by cm...@collab.net.
Michael Wood <mw...@its.uct.ac.za> writes:

> > What's the difference between DESTDIR and prefix?  Perhaps we need
> > only DESTDIR (and lose the prefix) here?
> 
> DESTDIR is for installing into a fake root directory for packaging or
> something similar.
> 
> i.e. you install to $DESTDIR/$prefix and then you know that everything
> in there has just been installed.  Nothing in there was left over from
> an old install.  It can all be bundled into an RPM or distribution tar
> file, and is guaranteed not to mess with your installed system.
> 
> You're not supposed to use the stuff from $DESTDIR/$prefix.
> 
> I hope that makes sense :)

Check!  Makes perfect sense.  Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] DESTDIR support for python swig targets

Posted by Michael Wood <mw...@its.uct.ac.za>.
On Thu, Oct 31, 2002 at 12:44:06PM -0600, cmpilato@collab.net wrote:
> "Craig Peterein" <cr...@peterein.org> writes:
> 
[snip]
> And actually, isn't $(prefix) just plain wrong in this instance?  I
> mean, $(prefix) is the install location for Subversion itself, which
> might be completely different than where I want my Python modules
> dumped.
> 
> What's the difference between DESTDIR and prefix?  Perhaps we need
> only DESTDIR (and lose the prefix) here?

DESTDIR is for installing into a fake root directory for packaging or
something similar.

i.e. you install to $DESTDIR/$prefix and then you know that everything
in there has just been installed.  Nothing in there was left over from
an old install.  It can all be bundled into an RPM or distribution tar
file, and is guaranteed not to mess with your installed system.

You're not supposed to use the stuff from $DESTDIR/$prefix.

I hope that makes sense :)

-- 
Michael Wood <mw...@its.uct.ac.za>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] DESTDIR support for python swig targets

Posted by cm...@collab.net.
"Craig Peterein" <cr...@peterein.org> writes:

> Pretty self-explainatory.

Isn't $(prefix) typically an absolute path like "/usr" or "/usr/local"?  

And actually, isn't $(prefix) just plain wrong in this instance?  I
mean, $(prefix) is the install location for Subversion itself, which
might be completely different than where I want my Python modules
dumped.

What's the difference between DESTDIR and prefix?  Perhaps we need
only DESTDIR (and lose the prefix) here?

> * Makefile.in
>   (swig-py-ext): Support DESTDIR for compiling.
>   (install-swig-py-ext): Support DESTDIR for installation.
> 
> Index: Makefile.in
> ===================================================================
> --- Makefile.in	(revision 3584)
> +++ Makefile.in	(working copy)
> @@ -264,14 +264,14 @@
>  	    -I$(SWIG_SRC_DIR)                                      \
>  	    -I$(abs_srcdir)/subversion/include $(SVN_APR_INCLUDES) \
>  	    -S$(SWIG_SRC_DIR)                                      \
> -	    -L$(prefix)/lib -L$(SVN_APR_PREFIX)/lib                \
> +	    -L$(DESTDIR)$(prefix)/lib -L$(SVN_APR_PREFIX)/lib      \
>              build --build-base=$(SWIG_BUILD_DIR)/python/build)
>  
>  install-swig-py-ext:
>  	(cd $(SWIG_BUILD_DIR)/python;                       \
>  	 $(PYTHON) $(SWIG_SRC_DIR)/python/setup.py          \
>  	    -S$(SWIG_SRC_DIR)                               \
> -            install --prefix $(prefix))
> +            install --prefix $(DESTDIR)$(prefix))
>  
>  ### Build a tarball.
>  dist: 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org