public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michal Gorny (mgorny)" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-utils-r1.eclass
Date: Mon,  4 Feb 2013 13:53:54 +0000 (UTC)	[thread overview]
Message-ID: <20130204135354.49E662171D@flycatcher.gentoo.org> (raw)

mgorny      13/02/04 13:53:54

  Modified:             ChangeLog python-utils-r1.eclass
  Log:
  Introduce python_get_library_path() to obtain the path to the Python library. Required by dev-python/shiboken.

Revision  Changes    Path
1.660                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.660&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.660&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.659&r2=1.660

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.659
retrieving revision 1.660
diff -u -r1.659 -r1.660
--- ChangeLog	4 Feb 2013 13:52:09 -0000	1.659
+++ ChangeLog	4 Feb 2013 13:53:54 -0000	1.660
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.659 2013/02/04 13:52:09 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.660 2013/02/04 13:53:54 mgorny Exp $
+
+  04 Feb 2013; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass:
+  Introduce python_get_library_path() to obtain the path to the Python library.
+  Required by dev-python/shiboken.
 
   04 Feb 2013; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass:
   Introduce python_newscript(), to install scripts with renaming. Requested in



1.18                 eclass/python-utils-r1.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-utils-r1.eclass?rev=1.18&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-utils-r1.eclass?rev=1.18&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-utils-r1.eclass?r1=1.17&r2=1.18

Index: python-utils-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- python-utils-r1.eclass	4 Feb 2013 13:52:09 -0000	1.17
+++ python-utils-r1.eclass	4 Feb 2013 13:53:54 -0000	1.18
@@ -1,6 +1,6 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v 1.17 2013/02/04 13:52:09 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v 1.18 2013/02/04 13:53:54 mgorny Exp $
 
 # @ECLASS: python-utils-r1
 # @MAINTAINER:
@@ -124,6 +124,18 @@
 # /usr/include/python2.6
 # @CODE
 
+# @ECLASS-VARIABLE: PYTHON_LIBPATH
+# @DESCRIPTION:
+# The path to Python library.
+#
+# Set and exported on request using python_export().
+# Valid only for CPython.
+#
+# Example value:
+# @CODE
+# /usr/lib64/libpython2.6.so
+# @CODE
+
 # @ECLASS-VARIABLE: PYTHON_PKG_DEP
 # @DESCRIPTION:
 # The complete dependency on a particular Python package as a string.
@@ -219,6 +231,22 @@
 				export PYTHON_INCLUDEDIR=${EPREFIX}${dir}
 				debug-print "${FUNCNAME}: PYTHON_INCLUDEDIR = ${PYTHON_INCLUDEDIR}"
 				;;
+			PYTHON_LIBPATH)
+				local libname
+				case "${impl}" in
+					python*)
+						libname=lib${impl}
+						;;
+					*)
+						die "${EPYTHON} lacks a dynamic library"
+						;;
+				esac
+
+				local path=${EPREFIX}/usr/$(get_libdir)
+
+				export PYTHON_LIBPATH=${path}/${libname}$(get_libname)
+				debug-print "${FUNCNAME}: PYTHON_LIBPATH = ${PYTHON_LIBPATH}"
+				;;
 			PYTHON_PKG_DEP)
 				local d
 				case ${impl} in
@@ -310,6 +338,21 @@
 	echo "${PYTHON_INCLUDEDIR}"
 }
 
+# @FUNCTION: python_get_library_path
+# @USAGE: [<impl>]
+# @DESCRIPTION:
+# Obtain and print the Python library path for the given implementation.
+# If no implementation is provided, ${EPYTHON} will be used.
+#
+# Please note that this function can be used with CPython only. Use
+# in another implementation will result in a fatal failure.
+python_get_library_path() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	python_export "${@}" PYTHON_LIBPATH
+	echo "${PYTHON_LIBPATH}"
+}
+
 # @FUNCTION: _python_rewrite_shebang
 # @INTERNAL
 # @USAGE: [<EPYTHON>] <path>...





             reply	other threads:[~2013-02-04 13:53 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-04 13:53 Michal Gorny (mgorny) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-07-27 16:35 [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-utils-r1.eclass Michal Gorny (mgorny)
2015-07-27 16:34 Michal Gorny (mgorny)
2015-07-27 16:34 Michal Gorny (mgorny)
2015-07-27 16:32 Michal Gorny (mgorny)
2015-07-25 10:07 Michal Gorny (mgorny)
2015-02-21  8:07 Michal Gorny (mgorny)
2015-01-02  0:15 Michal Gorny (mgorny)
2015-01-02  0:14 Michal Gorny (mgorny)
2014-12-28 18:35 Michal Gorny (mgorny)
2014-12-28 11:24 Michal Gorny (mgorny)
2014-12-27 23:52 Michal Gorny (mgorny)
2014-12-27 23:22 Michal Gorny (mgorny)
2014-12-27 19:31 Michal Gorny (mgorny)
2014-12-27 18:26 Michal Gorny (mgorny)
2014-11-29 23:03 Michal Gorny (mgorny)
2014-11-23 16:05 Mike Gilbert (floppym)
2014-11-23 16:02 Mike Gilbert (floppym)
2014-10-18 22:36 Mike Gilbert (floppym)
2014-09-04 14:52 Michal Gorny (mgorny)
2014-07-06 11:45 Michal Gorny (mgorny)
2014-06-19 15:10 Michal Gorny (mgorny)
2014-05-16  7:54 Michal Gorny (mgorny)
2014-05-01 13:34 Justin Lecher (jlec)
2014-03-13  8:10 Michal Gorny (mgorny)
2014-03-12  9:29 Michal Gorny (mgorny)
2014-03-12  9:23 Michal Gorny (mgorny)
2014-03-12  9:06 Michal Gorny (mgorny)
2014-03-12  8:18 Patrick Lauer (patrick)
2014-02-22 17:01 Mike Gilbert (floppym)
2013-10-27  7:27 Michal Gorny (mgorny)
2013-10-09 19:08 Michal Gorny (mgorny)
2013-10-09 17:23 Michal Gorny (mgorny)
2013-09-17 19:40 Michal Gorny (mgorny)
2013-09-17 17:28 Michal Gorny (mgorny)
2013-09-17 13:25 Michal Gorny (mgorny)
2013-09-16 17:58 Michal Gorny (mgorny)
2013-09-08 14:56 Michal Gorny (mgorny)
2013-09-08 14:54 Michal Gorny (mgorny)
2013-09-05  9:59 Michal Gorny (mgorny)
2013-08-28 22:04 Michal Gorny (mgorny)
2013-07-11  7:20 Michal Gorny (mgorny)
2013-07-11  6:57 Michal Gorny (mgorny)
2013-06-07  1:11 Mike Gilbert (floppym)
2013-05-31 17:40 Michal Gorny (mgorny)
2013-04-14  0:10 Mike Gilbert (floppym)
2013-03-28 12:21 Michal Gorny (mgorny)
2013-03-07 20:58 Tim Harder (radhermit)
2013-02-04 13:52 Michal Gorny (mgorny)
2013-01-29 21:12 Michal Gorny (mgorny)
2013-01-27 16:35 Michal Gorny (mgorny)
2013-01-05 10:01 Michal Gorny (mgorny)
2012-12-30 14:17 Michal Gorny (mgorny)
2012-12-27 22:56 Michal Gorny (mgorny)
2012-12-20  6:05 Mike Gilbert (floppym)
2012-12-15 21:30 Michal Gorny (mgorny)
2012-11-26 10:16 Michal Gorny (mgorny)

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=20130204135354.49E662171D@flycatcher.gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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