mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: acme@redhat.com, a.p.zijlstra@chello.nl, mingo@elte.hu, paulus@samba.org
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>
Subject: [PATCH] perf tools: Add support to install perf python extension
Date: Thu, 21 Jul 2011 18:45:26 +0200	[thread overview]
Message-ID: <1311266726-20655-1-git-send-email-jolsa@redhat.com> (raw)

Changing the distutils to use their own default 'build'
directory.

Such setup makes the install command simple, because using
--build-lib and --build-temp does not seem to comply with
the way the distutils' install commands expect it.

Also keeping the python/perf.so file, so it could be used
for testing as of until now.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
---
 tools/perf/Makefile |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 940257b..9c82a56 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -178,9 +178,8 @@ strip-libs = $(filter-out -l%,$(1))
 
 $(OUTPUT)python/perf.so: $(PYRF_OBJS)
 	$(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \
-	  --quiet build_ext \
-	  --build-lib='$(OUTPUT)python' \
-	  --build-temp='$(OUTPUT)python/temp'
+	  --quiet build_ext; \
+	cp $$(find build -name 'perf.so') python
 #
 # No Perl scripts right now:
 #
@@ -504,9 +503,7 @@ else
 
   PYTHON_WORD := $(call shell-wordify,$(PYTHON))
 
-  python-clean := $(PYTHON_WORD) util/setup.py clean \
-    --build-lib='$(OUTPUT)python' \
-    --build-temp='$(OUTPUT)python/temp'
+  python-clean := $(PYTHON_WORD) util/setup.py --quiet clean -a; $(RM) -f python/perf.so
 
   ifdef NO_LIBPYTHON
     $(call disable-python)
@@ -863,6 +860,9 @@ install: all
 	$(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python'
 	$(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'
 
+install-python_ext:
+	$(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)'
+
 install-doc:
 	$(MAKE) -C Documentation install
 
-- 
1.7.1


             reply	other threads:[~2011-07-21 17:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21 16:45 Jiri Olsa [this message]
2011-07-21 17:11 ` Arnaldo Carvalho de Melo
2011-07-21 18:47   ` Jiri Olsa
2011-07-21 19:04     ` Arnaldo Carvalho de Melo
2011-07-21 19:41       ` Jiri Olsa
2011-07-21 21:16         ` Arnaldo Carvalho de Melo
2011-07-22 11:33           ` [PATCHv2] " Jiri Olsa
2011-08-10  8:27             ` [tip:perf/urgent] " tip-bot for Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1311266726-20655-1-git-send-email-jolsa@redhat.com \
    --to=jolsa@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®