ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Tourbin <at@altlinux.ru>
To: devel@lists.altlinux.org
Subject: [devel] python.spec, %___build_pre
Date: Wed, 14 Mar 2007 15:43:47 +0300
Message-ID: <20070314124347.GK6039@solemn.turbinal> (raw)

[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]

python.spec:
   625  %define __python %_builddir/Python-%version/python.sh
   626  %define _python_lib_path %(RPM_BUILD_ROOT=%buildroot LD_LIBRARY_PATH=%buildroot%_libdir %buildroot%_bindir/python -c "import sys,os; 
path=os.path.normpath(os.environ['RPM_BUILD_ROOT']) ; print ' '.join([ x[len(path):] for x in [ os.path.normpath(x) for x in sys.path] if x[0
:len(path)]==path])")

Так делать некрасиво.  При раскрытии %_python_lib_path в %___build_pre (см.
/usr/lib/rpm/i586-alt-linux/*) $RPM_BUILD_ROOT ещё не заполнен.

$ gear --rpm -- rpm -bp
sh: /tmp/.private/at/python-buildroot/usr/bin/python: No such file or directory
Executing(%prep): /bin/sh -e /tmp/.private/at/rpm-tmp.95410
...

Правда, этот макрос правильно раскорется ко времени find-requiers и
find-provides, т.к. билдрут уже будет заполнен.  Как сделать красиво,
я не знаю.

Кстати, я хотел бы вынести все питоновские (а также перлове) макросы
в соответствующие /etc/rpm/macros.d/ файлы.  В связи с чем возникает
вопрос: как из этих файлов вклиниться в %__build_pre?  Т.е. как из
/usr/lib/rpm/*/macros перенести строчку

        %{?_python_lib_path:export %RPM_PYTHON_LIB_PATH=\"%_python_lib_path\"}\

в /etc/rpm/macros.d/python ?

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

                 reply	other threads:[~2007-03-14 12:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20070314124347.GK6039@solemn.turbinal \
    --to=at@altlinux.ru \
    --cc=devel@lists.altlinux.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

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git