1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA256 |
3 |
|
4 |
Hey all: |
5 |
|
6 |
So one of the advantages of using python-distutils-ng.eclass for |
7 |
building (and building against) python modules is that python module |
8 |
dependencies can be guaranteed against the same python targets as what |
9 |
you're building for, via the PYTHON_TARGETS use expansion. |
10 |
|
11 |
Unfortunately, one of the drawbacks to this is that dependencies are |
12 |
long and ugly. |
13 |
|
14 |
Since in most cases, any python module in *DEPEND is going to have |
15 |
python_targets_*? use deps for each implementation in $PYTHON_COMPAT, |
16 |
a helper variable that can be substituted for this list would simplify |
17 |
the ebuild. |
18 |
|
19 |
The implementation in the patch below is probably not the best, but I |
20 |
propose it as a starting point. |
21 |
|
22 |
|
23 |
- --- python-distutils-ng.eclass 2012-06-18 10:53:33.000000000 -0400 |
24 |
+++ python-distutils-ng.eclass.new 2012-09-06 13:47:28.000000000 |
25 |
- -0400 |
26 |
@@ -59,6 +59,22 @@ |
27 |
# Set to any value to disable automatic reinstallation of scripts in |
28 |
# bin directories. See python-distutils-ng_src_install function. |
29 |
|
30 |
+# @ECLASS-VARIABLE: PTUD |
31 |
+# @INTERNAL |
32 |
+# @DESCRIPTION: |
33 |
+# Provides the complete expansion of python_target_ use depedencies |
34 |
+# from the content of $PYTHON_COMPAT ; it can be used as a shortform |
35 |
+# to set or or append the use deps of complete python-module |
36 |
+# dependencies, ie: RDEPEND="dev-python/foo[${PTUD}]" |
37 |
+ |
38 |
+mysep= |
39 |
+PTUD= |
40 |
+for impl in ${PYTHON_COMPAT} ; do |
41 |
+ PTUD+="${mysep}python_targets_${impl}?" |
42 |
+ mysep="," |
43 |
+done |
44 |
+unset mysep |
45 |
+ |
46 |
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test [Snip!] |
47 |
|
48 |
case "${EAPI}" in |
49 |
-----BEGIN PGP SIGNATURE----- |
50 |
Version: GnuPG v2.0.19 (GNU/Linux) |
51 |
|
52 |
iF4EAREIAAYFAlBI6eAACgkQ2ugaI38ACPB4AgD5AbdrjfoQsn3Gf9eJSIOp7qQC |
53 |
Ceu/TAaE8a+rDYoIG8QA/ivAVdNOBnzWi/VthlgkrXpkk1sQYV5hFWGcI2gVhygv |
54 |
=cHPI |
55 |
-----END PGP SIGNATURE----- |