From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-python@lists.gentoo.org
Cc: python@gentoo.org
Subject: [gentoo-python] python-any-r1: bunch of bugfixes/improvements and dep-checking function
Date: Mon, 22 Apr 2013 12:51:50 +0200 [thread overview]
Message-ID: <20130422125150.5a2396e6@pomiocik> (raw)
[-- Attachment #1: Type: text/plain, Size: 1668 bytes --]
Hi,
I'm submitting a batch of patches for python-any-r1. The patches:
1. improve consistency between Python impl checking code. All branches
start to check whether Python interpreter is installed.
2. improve consistency in wrapper setup. All branches now set up
wrappers.
3. error out if no Python impl matches. This will become important with
the new dep-check function.
4. add support for defining python_check_deps() function in ebuilds.
The function can be used to verify whether Python impl chosen by eclass
supports all the deps needed for the package.
For example, if a package runs a script needing dev-python/foo
and dev-python/bar, the function would look like:
python_check_deps() {
if ! has_version "dev-python/foo[${PYTHON_USEDEP}]"; then
einfo "${EPYTHON}: dev-python/foo does not support the impl"
return 1
elif ! has_version "dev-python/bar[${PYTHON_USEDEP}]"; then
einfo "${EPYTHON}: dev-python/bar does not support the impl"
return 1
else
return 0
fi
}
Note that the package will need a proper dep as well:
DEPEND="
${PYTHON_DEPS}
python_targets_python2_7? (
dev-python/foo[python_targets_python2_7]
dev-python/bar[python_targets_python2_7]
)
"
Note to self: think how to improve the deps.
Please note that the new syntax will be necessary only with more
complex cases. Simpler things like package just calling 'pyfoo' script
will be handled by simple:
DEPEND="dev-python/pyfoo"
which will enforce at least one impl for pyfoo, and pyfoo wrapper will
handle the rest.
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]
next reply other threads:[~2013-04-22 10:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-22 10:51 Michał Górny [this message]
2013-04-22 10:52 ` [gentoo-python] [PATCH 1/4] Make Python checks consistent Michał Górny
2013-04-22 10:52 ` [gentoo-python] [PATCH 2/4] Perform wrapper setup in all codepaths Michał Górny
2013-04-22 10:52 ` [gentoo-python] [PATCH 3/4] Report no matching Python impl properly Michał Górny
2013-04-22 10:52 ` [gentoo-python] [PATCH 4/4] Add python_check_deps() to support testing supported impls Michał Górny
2013-04-30 5:36 ` [gentoo-python] python-any-r1: bunch of bugfixes/improvements and dep-checking function Michał Górny
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=20130422125150.5a2396e6@pomiocik \
--to=mgorny@gentoo.org \
--cc=gentoo-python@lists.gentoo.org \
--cc=python@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