Packaging:Minutes20070904

Present

 * JasonTibbitts
 * JesseKeating
 * RalfCorsepius
 * RexDieter
 * ToshioKuratomi
 * VilleSkyttä

Writeups
The following drafts have been accepted by FESCO and are to be written into the guidelines:


 * The first three sections of http://fedoraproject.org/wiki/PackagingDrafts/PHP (Requires and Provides for PEAR and PECL packages and Macros and Scriptlets for PECL packages).
 * A clarification/rewording of the "File and Directory Ownership" guideline: https://www.redhat.com/archives/fedora-packaging/2007-August/msg00084.html

Votes
There were no votes this week.

Other Discussions
Guidelines for packaging Python eggs: https://fedoraproject.org/wiki/PackagingDrafts/PythonEggs

There is more work to be done here; if you are interested in Python module packaging please read over the draft and voice your concerns on the mailing list.

IRC Logs
[12:02] meetin' time? [12:04] [summertime :) ] [12:04]  abadger1999: what do you want to meet about? :) [12:05] jeremy, today's meeting is to plan tomorrow's meeting. [12:05] Packaging Committee :-) [12:06]  --> racor has joined this channel (n=rc040203@HSI-KBW-082-212-056-027.hsi.kabelbw.de). [12:06]  Python Eggs, new initscripts, that kind of stuff. [12:07]  I'm not sure we have a quorum at this point. [12:08]  Is spot around? [12:08]  he was taking the day off, so don't think so [12:09]  I count 6 [12:09]  (w/o spot) [12:09]  Well, PHP guideline tweaks were approved; he's listed as taking care of those. [12:10]  Otherwise Eggs are on the schedule. [12:11]  Eggs, isn't quite ready yet.  But I'd like some feedback from people. [12:11]  jeremy: You could give input on this as well. [12:11]  Two issues that might be controversial: [12:11]  1) Should we make eggs for packages which don't have them upstream? [12:12] This has come up with trac and docutils. [12:12] Trac uses docutils if it's present. Unfortunately it can't tell if it's present if docutils is not installed as an egg. [12:13] which doesn't interfere with being installed normally [12:13] Debian Unstable has recently switched to installing egg info for docutils despite it not having that upstream. [12:14] thm: Right. Being installed as an egg doesn't interfere with import docutils; it just provides additional methods for a project to tell that another module is installed. [12:14] abadger1999: I started to look at what you wrote up one day last week, but then got distracted fixing something for test2 instead [12:15] are there any drawbacks if we just do eggs when needed even if upstream doesn't? [12:16]  I don't know much at all about eggs, but somehow this sounds to me just like whether we should be allowed to add *.pc files if upstream doesn't or not [12:16] What does the %files section look like when you package up an old version? The examples only include %build and %install. [12:16] encouraging people to rely on that info, even when not available upstream [12:17] scop: AFAICT the two drawbacks are: Won't be consistent across distros (looks like it isn't consistent already) [12:17] thm: Could you identify yourself for the meeting minutes? [12:17] scop: And we'll either have to patch setup.py to include dependency information or ship eggs that don't identify their dependencies. [12:18] ok, so it sounds pretty much like adding *.pc indeed [12:18] tibbs: There will be an egg/egg-info directory in %{python_sitelib} as well as the normal MODULENAME directory [12:19] scop: Yes. That sounds like a good comparison. [12:19] is there a reason why some upstreams don't/wouldn't accept patches that egg-enable their stuff? [12:19] So the modulename directory is still unversioned? [12:19] tibbs: sorry, will stay quiet now. I reported bz 256541. [12:19] tibbs: That actually ties into the second issue. [12:20] scop: I think a *very* few projects don't like setuptools on principle. [12:22] thm: You're welcome to participate if you have something to add. From https://bugzilla.redhat.com/show_bug.cgi?id=256541 it's obvious that you know far more about the issue than many of us do. [12:22] scop: in case of docutils, one reason seems to be that they want to stay compatible with Python < 2.3 [12:23] scop: For docutils, upstream doesn't want to limit the versions of python that docutils can run on just because of the build script... setuptools requires (I believe) python2.3 [12:23] ok [12:23]  there's no "compatiblity mode" or something for earlier versions? [12:24] Hmmm.... "for Python 2.3.5 and up on most platforms; 64-bit platforms require a minimum of Python 2.4" [12:24] No compat-mode that I know of. [12:25] * f13 looks in. [12:27] I think the bottom line is that we should do whatever is necessary to make our own packaging reasonable and self-consistent. [12:27] But what was the second issue? [12:27] Second issue is multiple versions. [12:28] It's what motivated me to look into python eggs in the first place but it's turning out to be a bit of a pain. [12:29] I worked out something that nearly worked in the draft guidelines but when I talked to setuptools upstream about the final problems he had some issues with what we're doing. [12:30] My goals were: 1) import MODULE should import whatever version we decide is the default [12:30]  2) setup.py modified for setuptools should work to select a specific version from the eggs we've installed. [12:31] 3) In a simple script that doesn't use setup.py there should be an API to select a specific version from the installed eggs. [12:31]  #3 is where upstream has a problem. [12:31]  Who is "upstream" in this case? [12:32]  Philip J Eby [12:32]  setuptools author [12:32]  Oh, the setuptool upstream.  OK. [12:32]  But why would they care about cases where their software isn't being used? [12:33]  Well, we need to select the version someway.  There is a pkg_resource module that setuptools provides to let us interact with that egg information. [12:34]  In particular, there's a documented function pkg_resources.require('MODULE(><=)VERSION') that works as long as there's no default version [12:34]  ie: #1 would not work. [12:35]  we could have a wrapper module for #1 [12:35]  And there's an undocumented variable __requires__='MODULE(><=)VERSION' that can be set before importing modules. [12:35]  hm, from 2) and 3) - if using setup.py, is the version that will be used by our package decided at build time? [12:35] (With import pkg_resources being the first module to import after setting __require__) [12:36] scop: Sort of. The version is defined in setup.py and that definition is carried over to the egginfo (in the requires.txt file) [12:36] <-- racor has left this server ("Leaving"). [12:37] So setup.py might have: install_requires= ['SQLAlchemy>=0.3,<0.4', 'CherryPy>=2.0,<3.0'] [12:37] The installed package will have a requires.txt with: [12:37] SQLAlchemy>=0.3,<0.4 [12:37] CherryPy>=2.0,<3.0 [12:38] scop: So I guess the answer is no, the decision is still made at run time. [12:39] ok, so the versions of SQLAlchemy and CherryPy that were available at the time the package was built don't end up as eg. CherryPy=2.5 somewhere [12:39] Correct. [12:39] good [12:40] getting back to the issue: __requires__ works but Philip refuses to document it and says it's not going to be a supported way of switching versions. [12:40] So although it works where pkg_resources does not, it leaves us on shaky ground if we want to tell people to use it. [12:41] So how important is that third goal for us? Do we have to have a way for people to easily select between versions in the interpreter shell or for quick and dirty scripting? [12:42] does PYTHONPATH in environment not work for that? [12:43] I understand it probably isn't quite a complete solution to what you were looking for in #3 [12:44] It's not ideal because setuptools will override PYTHONPATH. So you won't be able to try out pkg_resources while also relying on PYTHONPATH to give you some eggs. [12:44] You'll have to use one or the other. [12:45] doh [12:45] Also, it leaves you to figure out the paths, like: PYTHONPATH=/usr/lib/python2.5/site-packages/SQLAlchemy-0.3.10-py2.5.egg/sqlalchemy/:$PYTHONPATH [12:46] and update that if sqlalchemy 0.3.11 ever comes out. [12:46] Rather than a nice API like:   __requires__='SQLAlchemy>=0.3,<0.4alpha'; import pkg_resources; import sqlalchemy [12:47] yep, understood [12:47] Finally, I'll have to check whether PYTHONPATH can point to zipped up modules (an egg is a zip just like a jar in java) [12:49] If it can't we'd have to make sure the guidelines specify --no-zip whenever installing eggs. [12:50] abadger1999: additionally some packages are not safe to be used in unzipped form, afaik [12:50] oops ... in zipped form [12:51] thm: I thought it was the other way around. Some weren't safe to use in zipped form. [12:51] :-) [12:52]  setuptools is pretty conservative about installing a module zipped but we might want to specify --no-zip in relation to installing eggs where upstream does not ship it. [12:53]  right. setuptools uses heuristics to decide that [12:53]  So the question is: How much does having an API matter? [12:54]  This is python; I'm used to having an API for everything :-) [12:54] can't tell, but if upstream has made it clear that __requires__ is unsupported and undocumented and will remain that way, I don't think it makes sense for us to recommend its usage [12:58] Right. So I guess another way of saying this is: Do we use eggs for managing multiple versions, use something of our own design, or write an alternative to pkg_resources that has an API that we can use? [12:59] I think I lean towards the first with the idea that if the feature is needed enough, someone (maybe us, maybe another distro) will do the third and we can pick it up then. [13:00] abadger1999, +1 [13:01] Well, I guess that's the end of the packaging meeting. [13:01] Thanks for letting htis turn into the "python eggs meeting" :-) [13:02]  np, I think we're done [13:02]  abadger1999: Did you have anything else? [13:02]  Nope.  If you have feedback later today, just send mail to the list. [13:02]  OK, I guess that's it. [13:02]  I'll have a revision out before the next meeting. [13:03]  abadger1999, thm, thanks for the info on eggs and your patience :)