Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: python@g.o
Subject: [gentoo-dev] The problem with new dev-python/argparse and REQUIRED_USE
Date: Thu, 01 Nov 2012 22:30:29
Message-Id: 20121101233015.69031c0a@pomiocik.lan
1 Hello,
2
3 Recently I have committed a new dev-python/argparse revision. I have
4 migrated it to distutils-r1 and enabled building only for those Python
5 versions which don't have argparse built-in. Sadly, I had to
6 package.mask it since it suffers a REQUIRED_USE issue on modern systems.
7
8 For those who are not in the topic, argparse is included in Python
9 distribution since versions 2.7 and 3.2 (including both pypy versions
10 in Gentoo). Although the 'external' argparse can still be built
11 and installed, it serves no purpose since the built-in takes precedence.
12
13 The problem is that after disabling argparse build for modern Python
14 versions, the ebuild is left with no Python implementation enabled on
15 modern systems. And this causes the REQUIRED_USE check to fail because
16 of an attempt to build a package for no Python implementation.
17
18 The main issue here is that REQUIRED_USE errors are not really helpful
19 to users. I don't think there's a way to deliver a custom message
20 there, so user (assuming he is able to understand the dependency
21 syntax) is basically told to enable one of the old Python versions --
22 which is definitely not the right thing to do.
23
24 In order to fix that, I have committed a virtual/python-argparse
25 as well and worked on getting both the tree and overlays to depend
26 on it. Still, it will take some time for everything to migrate (yes,
27 I failed to revbump those packages...) and even then, I'm still worried
28 that some users will be left with argparse being pulled in one way
29 or another (e.g. due to @world).
30
31 Do you have any ideas how to solve that kind of stalemate?
32
33
34 One solution I have in mind (which is semi-ugly) is to re-enable all
35 the implementations on argparse and print an explanatory message when
36 it is merged with only 'new enough' implementations enabled. This will
37 basically tell the users to investigate why dev-python/argparse is
38 still pulled in on their systems.
39
40 --
41 Best regards,
42 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies