public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] The problem with new dev-python/argparse and REQUIRED_USE
@ 2012-11-01 22:30 Michał Górny
  2012-11-02  9:22 ` Rémi Cardona
  0 siblings, 1 reply; 5+ messages in thread
From: Michał Górny @ 2012-11-01 22:30 UTC (permalink / raw
  To: gentoo-dev; +Cc: python

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

Hello,

Recently I have committed a new dev-python/argparse revision. I have
migrated it to distutils-r1 and enabled building only for those Python
versions which don't have argparse built-in. Sadly, I had to
package.mask it since it suffers a REQUIRED_USE issue on modern systems.

For those who are not in the topic, argparse is included in Python
distribution since versions 2.7 and 3.2 (including both pypy versions
in Gentoo). Although the 'external' argparse can still be built
and installed, it serves no purpose since the built-in takes precedence.

The problem is that after disabling argparse build for modern Python
versions, the ebuild is left with no Python implementation enabled on
modern systems. And this causes the REQUIRED_USE check to fail because
of an attempt to build a package for no Python implementation.

The main issue here is that REQUIRED_USE errors are not really helpful
to users. I don't think there's a way to deliver a custom message
there, so user (assuming he is able to understand the dependency
syntax) is basically told to enable one of the old Python versions --
which is definitely not the right thing to do.

In order to fix that, I have committed a virtual/python-argparse
as well and worked on getting both the tree and overlays to depend
on it. Still, it will take some time for everything to migrate (yes,
I failed to revbump those packages...) and even then, I'm still worried
that some users will be left with argparse being pulled in one way
or another (e.g. due to @world).

Do you have any ideas how to solve that kind of stalemate?


One solution I have in mind (which is semi-ugly) is to re-enable all
the implementations on argparse and print an explanatory message when
it is merged with only 'new enough' implementations enabled. This will
basically tell the users to investigate why dev-python/argparse is
still pulled in on their systems.

-- 
Best regards,
Michał Górny

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

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

end of thread, other threads:[~2012-11-02 18:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-01 22:30 [gentoo-dev] The problem with new dev-python/argparse and REQUIRED_USE Michał Górny
2012-11-02  9:22 ` Rémi Cardona
2012-11-02  9:29   ` Michał Górny
2012-11-02 16:08     ` Ian Stakenvicius
2012-11-02 18:30       ` 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