# [PATCH] remote-helpers: build in platform independent directory

3 messages from 2010-09-17 to 2010-09-17. Participants: Michael J Gruber, Sverre Rabbelier, Junio C Hamano.
Thread: https://gitlist.dev/t/25130

## Michael J Gruber, 2010-09-17 16:17

Subject: [PATCH] remote-helpers: build in platform independent directory
Message-ID: <36e03068ded278b5145fdf82658c3270a25c2762.1284740217.git.git@drmicha.warpmail.net>
URL: https://gitlist.dev/e/36e03068ded278b5145fdf82658c3270a25c2762.1284740217.git.git%40drmicha.warpmail.net

```
The build directory which is used by distutils depends on the platform
(e.g. build/lib on Fedora 13, build/lib.linux-i686-2.6 on Ubuntu 9.04).
But test-lib.sh expects to find the build in build/lib which can cause
t5800-remote-helpers.sh to fail early.

Override distutils' choice so that the build is always in build/lib.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 git_remote_helpers/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git_remote_helpers/Makefile b/git_remote_helpers/Makefile
index 74b05dc..e8172d3 100644
--- a/git_remote_helpers/Makefile
+++ b/git_remote_helpers/Makefile
@@ -26,7 +26,7 @@ PYLIBDIR=$(shell $(PYTHON_PATH) -c \
 	 print 'lib/python%i.%i/site-packages' % sys.version_info[:2]")
 
 all: $(pysetupfile)
-	$(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) build
+	$(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) build --build-purelib=build/lib --build-platlib=build/lib
 
 install: $(pysetupfile)
 	$(PYTHON_PATH) $(pysetupfile) install --prefix $(DESTDIR_SQ)$(prefix)
-- 
1.7.3.rc2.221.gbf93f

```

## Sverre Rabbelier, 2010-09-17 16:31

Subject: Re: [PATCH] remote-helpers: build in platform independent directory
Message-ID: <AANLkTimzM+HQ6mvrkCL2mKK9jfOKe0FA6rv=AOfgwJF_@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTimzM%2BHQ6mvrkCL2mKK9jfOKe0FA6rv%3DAOfgwJF_%40mail.gmail.com
In-Reply-To: <36e03068ded278b5145fdf82658c3270a25c2762.1284740217.git.git@drmicha.warpmail.net>

```
Heya,

[+Jonathan]

On Fri, Sep 17, 2010 at 18:17, Michael J Gruber
<git@drmicha.warpmail.net> wrote:
> The build directory which is used by distutils depends on the platform
> (e.g. build/lib on Fedora 13, build/lib.linux-i686-2.6 on Ubuntu 9.04).
> But test-lib.sh expects to find the build in build/lib which can cause
> t5800-remote-helpers.sh to fail early.
>
> Override distutils' choice so that the build is always in build/lib.
>
> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
> ---
>  git_remote_helpers/Makefile |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/git_remote_helpers/Makefile b/git_remote_helpers/Makefile
> index 74b05dc..e8172d3 100644
> --- a/git_remote_helpers/Makefile
> +++ b/git_remote_helpers/Makefile
> @@ -26,7 +26,7 @@ PYLIBDIR=$(shell $(PYTHON_PATH) -c \
>         print 'lib/python%i.%i/site-packages' % sys.version_info[:2]")
>
>  all: $(pysetupfile)
> -       $(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) build
> +       $(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) build --build-purelib=build/lib --build-platlib=build/lib
>
>  install: $(pysetupfile)
>        $(PYTHON_PATH) $(pysetupfile) install --prefix $(DESTDIR_SQ)$(prefix)

I don't know if this works on all platforms etc, Jonathan?

-- 
Cheers,

Sverre Rabbelier

```

## Junio C Hamano, 2010-09-17 18:41

Subject: Re: [PATCH] remote-helpers: build in platform independent directory
Message-ID: <7vocbw2oxt.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vocbw2oxt.fsf%40alter.siamese.dyndns.org
In-Reply-To: <36e03068ded278b5145fdf82658c3270a25c2762.1284740217.git.git@drmicha.warpmail.net>

```
Michael J Gruber <git@drmicha.warpmail.net> writes:

> The build directory which is used by distutils depends on the platform
> (e.g. build/lib on Fedora 13, build/lib.linux-i686-2.6 on Ubuntu 9.04).
> But test-lib.sh expects to find the build in build/lib which can cause
> t5800-remote-helpers.sh to fail early.
>
> Override distutils' choice so that the build is always in build/lib.
>
> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
> ---
>  git_remote_helpers/Makefile |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/git_remote_helpers/Makefile b/git_remote_helpers/Makefile
> index 74b05dc..e8172d3 100644
> --- a/git_remote_helpers/Makefile
> +++ b/git_remote_helpers/Makefile
> @@ -26,7 +26,7 @@ PYLIBDIR=$(shell $(PYTHON_PATH) -c \
>  	 print 'lib/python%i.%i/site-packages' % sys.version_info[:2]")
>  
>  all: $(pysetupfile)
> -	$(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) build
> +	$(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) build --build-purelib=build/lib --build-platlib=build/lib
>  
>  install: $(pysetupfile)
>  	$(PYTHON_PATH) $(pysetupfile) install --prefix $(DESTDIR_SQ)$(prefix)

Hmm, wouldn't this interfere with the install target if you do not tell
the "setup.py install" where your built stuff lives?

```
