public inbox for gentoo-python@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-python] Alternate solution for 'python', 'python2' and 'pkg-config python' in ebuilds
@ 2013-03-29 19:57 Michał Górny
  2013-03-29 22:38 ` Michał Górny
  0 siblings, 1 reply; 5+ messages in thread
From: Michał Górny @ 2013-03-29 19:57 UTC (permalink / raw
  To: gentoo-python

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

Hello,

Currently, we're using python-wrapper to properly respect EPYTHON
in ebuilds. This is a bit hacky since every call to Python has to go
through wrapper which chooses the same implementation over and over
again.

There was a request to handle 'pkg-config --cflags --libs python'
through eselect-python. Of course, we can't wrap pkg-config like we do
Python (well, we can but...).


The alternate solution is something similar to what vala people do. It
addresses all packages calling 'python', 'python2', 'python3'
or 'pkg-config python' and using any of the -r1 eclasses.

The idea is to create a ${T}/bin and ${T}/pkgconfig directories.
In the former, place 'python' and either 'python2' or 'python3'
symlinks proper to current ${EPYTHON}. In the latter, 'python.pc'
and possibly 'python2.pc' or 'python3.pc'. Add the former to ${PATH},
the latter to ${PKG_CONFIG_PATH}.

In -single-r1 and -any-r1 the directory creation and environment
manipulation would be done in pkg_setup(). In python-r1 it would have
to be done in python_export_best (with separate directory)
and python_foreach_impl.


Does this sound like a good solution? Should I run some tests?

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-04-07 18:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-29 19:57 [gentoo-python] Alternate solution for 'python', 'python2' and 'pkg-config python' in ebuilds Michał Górny
2013-03-29 22:38 ` Michał Górny
2013-03-29 22:39   ` [gentoo-python] [PATCH] Create a temporary links for Python execs and pkg-config Michał Górny
2013-04-03  0:45     ` Mike Gilbert
2013-04-07 18:18     ` Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox