dev-python/ply-3.4 worked fine to build games-util/nml (and ultimately games-misc/opengfx-0.4.7), but dev-python/ply-3.4 (with the dreaded python_targets and python_single_target USE flags) was recently marked stable. I have PYTHON_SINGLE_TARGET='python3_3' in /etc/portage/make.conf (with about a gazillion app/foo python_targets_python2_7 lines in /etc/portage/package.use - one reason is that it warns be about problems such as this :) ). Anyway, dev-python/ply-3.4-r1 was built with PYTHON_TARGETS="python3_3 (-pypy2_0) -python2_6 -python2_7 -python3_2" (followed by rebuilding games-util/nml-0.2.4-r2, and then the usual hocus pocus of python-updater and emerge -DN world). While games-util/nml-0.2.4-r2 will still build when ply was built with only PYTHON_TARGETS="python3_3", it will no longer build games-misc/opengfx-0.4.7. # emerge -Du world These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild U ] games-misc/opengfx-0.4.7 [0.4.5] 0 kB Total: 1 package (1 upgrade), Size of downloads: 0 kB >>> Verifying ebuild manifests >>> Emerging (1 of 1) games-misc/opengfx-0.4.7 * opengfx-0.4.7-source.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking opengfx-0.4.7-source.tar.gz to /var/tmp/portage/games-misc/opengfx-0.4.7/work >>> Source unpacked in /var/tmp/portage/games-misc/opengfx-0.4.7/work >>> Preparing source in /var/tmp/portage/games-misc/opengfx-0.4.7/work/opengfx-0.4.7-source ... * Applying opengfx-0.4.7-gcc48.patch ... [ ok ] >>> Source prepared. >>> Configuring source in /var/tmp/portage/games-misc/opengfx-0.4.7/work/opengfx-0.4.7-source ... >>> Source configured. >>> Compiling source in /var/tmp/portage/games-misc/opengfx-0.4.7/work/opengfx-0.4.7-source ... make -j5 bundle Traceback (most recent call last): File "/usr/lib/python-exec/python2.7/nmlc", line 9, in <module> load_entry_point('nml==0.2.4', 'console_scripts', 'nmlc')() File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point return ep.load() File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 2260, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) File "/usr/lib64/python2.7/site-packages/nml/main.py", line 17, in <module> from nml import generic, grfstrings, parser, version_info, output_base, output_nml, output_nfo, output_grf, output_dep, palette File "/usr/lib64/python2.7/site-packages/nml/parser.py", line 16, in <module> from nml import generic, expression, tokens, nmlop File "/usr/lib64/python2.7/site-packages/nml/tokens.py", line 17, in <module> import ply.lex as lex ImportError: No module named ply.lex Traceback (most recent call last): File "/usr/lib/python-exec/python2.7/nmlc", line 9, in <module> load_entry_point('nml==0.2.4', 'console_scripts', 'nmlc')() File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point return ep.load() File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 2260, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) File "/usr/lib64/python2.7/site-packages/nml/main.py", line 17, in <module> from nml import generic, grfstrings, parser, version_info, output_base, output_nml, output_nfo, output_grf, output_dep, palette File "/usr/lib64/python2.7/site-packages/nml/parser.py", line 16, in <module> from nml import generic, expression, tokens, nmlop File "/usr/lib64/python2.7/site-packages/nml/tokens.py", line 17, in <module> import ply.lex as lex ImportError: No module named ply.lex [LANG] custom_tags.txt [CPP] ogfxe_extra.nml [DEP] ogfxe_extra.gfx.dep Traceback (most recent call last): File "/usr/lib/python-exec/python2.7/nmlc", line 9, in <module> load_entry_point('nml==0.2.4', 'console_scripts', 'nmlc')() File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point return ep.load() File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 2260, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) File "/usr/lib64/python2.7/site-packages/nml/main.py", line 17, in <module> from nml import generic, grfstrings, parser, version_info, output_base, output_nml, output_nfo, output_grf, output_dep, palette File "/usr/lib64/python2.7/site-packages/nml/parser.py", line 16, in <module> from nml import generic, expression, tokens, nmlop File "/usr/lib64/python2.7/site-packages/nml/tokens.py", line 17, in <module> import ply.lex as lex ImportError: No module named ply.lex [CPP] ogfxt_toyland.nml [DEP] ogfxt_toyland.gfx.dep [...] The workaround (of course) is to add: dev-python/ply python_targets_python2_7 to /etc/portage/package.use, and then rebuild ply. After that, games-misc/opengfx-0.4.7 builds fine. So my claim is that games-util/nml-0.2.4-r2 should depend on ply being built with either python_targets_python2_6 or python_targets_python2_7.
Actually, it's much more simple: games-util/nml should depend on 'dev-python/ply[${PYTHON_USEDEP}] now that ply supports it.
+ 13 Dec 2013; Julian Ospald <hasufell@gentoo.org> nml-0.2.4-r2.ebuild: + add PYTHON_USEDEP to dev-python/ply wrt #494156