| Store | Cart

Re: [Python-Dev] Status of packaging in 3.3

From: Dag Sverre Seljebotn <d.s....@astro.uio.no>
Thu, 21 Jun 2012 22:46:58 +0200
On 06/21/2012 09:05 PM, Tarek Ziadé wrote:
> On 6/21/12 4:26 PM, Dag Sverre Seljebotn wrote:>>>>> project should give me so I can compile its extensions ?" I think this>>> has nothing to do with the tools/implementations.>> If you sit down and ask your self: "what are the information a python>>>> I'm not sure if I understand. A project can't "give the information>> needed to build it". The build system is an integrated piece of the>> code and package itself. Making the build of library X work on some>> ugly HPC setup Y is part of the development of X.>>>> To my mind a solution looks something like (and Bento is close to this):>>>> Step 1) "Some standard" to do configuration of a package (--prefix and>> other what-goes-where options, what libraries to link with, what>> compilers to use...)>>>> Step 2) Launch the package's custom build system (may be Unix shell>> script or makefile in some cases (sometimes portability is not a>> goal), may be a waf build)>>>> Step 3) "Some standard" to be able to cleanly>> install/uninstall/upgrade the product of step 2)>>>> An attempt to do Step 2) in a major way in the packaging framework>> itself, and have the package just "declare" its C extensions, would>> not work. It's fine to have a way in the packaging framework that>> works for trivial cases, but it's impossible to create something that>> works for every case.>> I think we should, as you proposed, list a few projects w/ compilation> needs -- from the simplest to the more complex, then see how a standard> *description* could be used by any tool

It's not clear to me what you mean by description. Package metadata, 
install information or description of what/how to build?

I hope you don't mean the latter, that would be insane...it would 
effectively amount to creating a build tool that's both more elegant and 
more powerful than any option that's currently already out there.

Assuming you mean the former, that's what David did to create Bento. 
Reading and understanding Bento and the design decisions going into it 
would be a better use of time than redoing a discussion, and would at 
least be a very good starting point.

But anyway, some project types from simple to advanced:

  - Simple library using Cython + NumPy C API
  - Wrappers around HPC codes like mpi4py, petsc4py
  - NumPy
  - SciPy (uses Fortran compilers too)
  - Library using code generation, Cython, NumPy C API, Fortran 90 code, 
some performance tuning with CPU characteristics (instruction set, cache 
size, optimal loop structure) decided compile-time

>>> And if we're able to write down in a PEP this, e.g. the information a>>> compiler is looking for to do its job, then any tool out there waf,>>> scons, cmake, jam, ant, etc, can do the job, no ?>>>>>>>>>>>>>> Anyway: I really don't want to start a flame-war here. So let's accept>>>> up front that we likely won't agree here; I just wanted to clarify my>>>> position.>>> After 4 years I still don't understand what "we won't agree" means in>>> this context. *NO ONE* ever ever came and told me : here's what I want a>>> Python project to describe for its extensions.>>>> That's unfortunate. To be honest, it's probably partly because it's>> easier to say what won't work than come with a constructive>> suggestion. A lot of people (me included) just use>> waf/cmake/autotools, and forget about making the code installable>> through PyPI or any of the standard Python tools. Just because that>> works *now* for us, but we don't have any good ideas for how to make>> this into something that works on a wider scale.>>>> I think David is one of the few who has really dug into the matter and>> tried to find something that can both do builds and work through>> standard install mechanisms. I can't answer for why you haven't been>> able to understand one another.>>>> It may also be an issue with how much one can constructively do on>> mailing lists. Perhaps the only route forward is to to bring people>> together in person and walk distutils2 people through some hairy>> scientific HPC builds (and vice versa).>> Like versions scheme, I think it's fine if you guys have a more complex> system to build software. But there should be a way to share a common> standard for complation, even if people that uses distutils2 or xxx, are> just doing the dumbest things, like simple C libs compilation.>>>>>> Just "we won't agree" or "distutils sucks" :)>>>>>>>>> Gosh I hope we will overcome this lock one day, and move forward :D>>>> Well, me too.> The other thing is, the folks in distutils2 and myself, have zero> knowledge about compilers. That's why we got very frustrated not to see> people with that knowledge come and help us in this area.

Here's the flip side: If you have zero knowledge about compilers, it's 
going to be almost impossible to have a meaningful discussion about a 
compilation PEP. It's very hard to discuss standards unless everybody 
involved have the necessary prerequisite knowledge. You don't go 
discussing details of the Linux kernel without some solid C experience 
either.

The necessary prerequisites in this case is not merely "knowledge of 
compilers". To avoid repeating mistakes of the past, the prerequisites 
for a meaningful discussion is years of hard-worn experience building 
software in various languages, on different platforms, using different 
build tools.

Look, these problems are really hard to deal with. Myself I have 
experience with building 2-3 languages using 2-3 build tools on 2 
platforms, and I consider myself a complete novice and usually decide to 
trust David's instincts over trying to make up an opinion of my own -- 
simply because I know he's got a lot more experience than I have.

Theoretically it is possible to separate and isolate concerns so that 
one set of people discuss build integration and another set of people 
discuss installation. Problem is that all the problems tangle -- in 
particular when the starting point is distutils!

That's why *sometimes*, not always, design by committee is the wrong 
approach, and one-man-shows is what brings technology forwards.

> So, I reiterate my proposal, and it could also be expressed like this:>> 1/ David writes a PEP where he describes how Bento interact with a> project -- metadata, description files, etc> 2/ Someone from distutils2 completes the PEP by describing how setup.cfg> works wrt Extensions> 3/ we see if we can have a common standard even if it's a subset of> bento capabilities

bento isn't a build tool, it's a packaging tool, competing directly with 
distutils2. It can deal with simple distutils-like builds using a 
bundled build tool, and currently has integration with waf for 
complicated builds; integration with other build systems will presumably 
be added later as people need it (the main point is that bento is 
designed for it).

Dag
_______________________________________________
Python-Dev mailing list
Pyth...@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-dev-ml%40activestate.com

Recent Messages in this Thread
Éric Araujo Jun 19, 2012 09:46 pm
mar...@v.loewis.de Jun 22, 2012 03:24 pm
Vinay Sajip Jun 22, 2012 03:48 pm
Vinay Sajip Jun 23, 2012 02:14 pm
Stephen J. Turnbull Jun 23, 2012 08:02 am
Donald Stufft Jun 22, 2012 04:56 pm
Paul Moore Jun 22, 2012 01:24 pm
Tarek Ziadé Jun 22, 2012 06:42 am
Nick Coghlan Jun 22, 2012 07:11 am
Donald Stufft Jun 22, 2012 12:01 am
Hynek Schlawack Jun 28, 2012 11:09 am
Ethan Furman Jun 19, 2012 10:09 pm
Nick Coghlan Jun 19, 2012 10:14 pm
Guido van Rossum Jun 20, 2012 04:36 am
Antoine Pitrou Jun 20, 2012 09:27 am
Hynek Schlawack Jun 20, 2012 11:20 am
Antoine Pitrou Jun 20, 2012 11:29 am
Éric Araujo Jun 20, 2012 03:34 pm
Georg Brandl Jun 20, 2012 03:44 pm
Tarek Ziadé Jun 20, 2012 04:24 pm
Paul Moore Jun 19, 2012 10:54 pm
Chris McDonough Jun 19, 2012 11:34 pm
Antoine Pitrou Jun 20, 2012 01:23 am
Nick Coghlan Jun 20, 2012 05:00 am
Antoine Pitrou Jun 20, 2012 09:04 am
Tarek Ziadé Jun 20, 2012 09:18 am
Victor Stinner Jun 20, 2012 06:36 am
Donald Stufft Jun 20, 2012 07:36 am
Georg Brandl Jun 20, 2012 07:09 am
Dirkjan Ochtman Jun 20, 2012 07:32 am
"Martin v. Löwis" Jun 20, 2012 08:18 am
Tarek Ziadé Jun 20, 2012 08:55 am
Dirkjan Ochtman Jun 20, 2012 09:05 am
Antoine Pitrou Jun 20, 2012 09:12 am
Tarek Ziadé Jun 20, 2012 09:22 am
Antoine Pitrou Jun 20, 2012 09:49 am
Tarek Ziadé Jun 20, 2012 10:30 am
Antoine Pitrou Jun 20, 2012 10:39 am
Tarek Ziadé Jun 20, 2012 10:54 am
Georg Brandl Jun 20, 2012 11:06 am
Vinay Sajip Jun 20, 2012 09:51 am
Antoine Pitrou Jun 20, 2012 09:54 am
Tarek Ziadé Jun 20, 2012 10:34 am
Paul Moore Jun 20, 2012 11:19 am
Tarek Ziadé Jun 20, 2012 11:31 am
Nick Coghlan Jun 20, 2012 12:53 pm
Paul Moore Jun 20, 2012 01:10 pm
Alexis Métaireau Jun 20, 2012 01:19 pm
Nick Coghlan Jun 20, 2012 01:28 pm
Alexis Métaireau Jun 20, 2012 01:36 pm
Tarek Ziadé Jun 21, 2012 12:00 pm
Alexis Métaireau Jun 20, 2012 01:16 pm
Paul Moore Jun 20, 2012 01:47 pm
Paul Moore Jun 20, 2012 11:11 am
Antoine Pitrou Jun 20, 2012 11:46 am
Nick Coghlan Jun 20, 2012 01:02 pm
Bill Janssen Jun 20, 2012 02:46 pm
PJ Eby Jun 20, 2012 05:29 pm
Nick Coghlan Jun 21, 2012 03:57 am
Chris McDonough Jun 21, 2012 04:44 am
Nick Coghlan Jun 21, 2012 08:45 am
David Cournapeau Jun 21, 2012 09:28 am
Nick Coghlan Jun 21, 2012 11:58 am
David Cournapeau Jun 21, 2012 12:19 pm
Nick Coghlan Jun 21, 2012 12:31 pm
Chris McDonough Jun 21, 2012 11:48 am
Oscar Benjamin Jun 21, 2012 12:07 pm
Nick Coghlan Jun 21, 2012 12:21 pm
Chris McDonough Jun 21, 2012 12:51 pm
Nick Coghlan Jun 21, 2012 01:29 pm
Chris McDonough Jun 21, 2012 02:12 pm
Nick Coghlan Jun 21, 2012 02:30 pm
Chris McDonough Jun 21, 2012 02:59 pm
Nick Coghlan Jun 21, 2012 03:48 pm
Jesse Noller Jun 22, 2012 04:12 pm
PJ Eby Jun 21, 2012 03:45 pm
Chris McDonough Jun 21, 2012 04:02 pm
Chris Lambacher Jun 21, 2012 03:17 pm
Barry Warsaw Jun 21, 2012 02:08 pm
Vinay Sajip Jun 21, 2012 01:45 pm
Barry Warsaw Jun 21, 2012 01:57 pm
Nick Coghlan Jun 21, 2012 02:09 pm
Dag Sverre Seljebotn Jun 21, 2012 09:08 am
Tarek Ziadé Jun 21, 2012 11:56 am
Dag Sverre Seljebotn Jun 21, 2012 12:45 pm
Tarek Ziadé Jun 21, 2012 01:23 pm
Dag Sverre Seljebotn Jun 21, 2012 02:26 pm
Tarek Ziadé Jun 21, 2012 07:05 pm
Dag Sverre Seljebotn Jun 21, 2012 08:46 pm
Tarek Ziadé Jun 21, 2012 09:04 pm
David Cournapeau Jun 21, 2012 09:55 pm
Tarek Ziadé Jun 21, 2012 10:42 pm
Dag Sverre Seljebotn Jun 21, 2012 10:05 pm
Dag Sverre Seljebotn Jun 21, 2012 10:25 pm
Antoine Pitrou Jun 21, 2012 10:00 pm
David Cournapeau Jun 21, 2012 10:32 pm
Alex Clark Jun 21, 2012 01:56 pm
PJ Eby Jun 21, 2012 01:31 pm
Nick Coghlan Jun 21, 2012 02:03 pm
Zooko Wilcox-OHearn Jun 21, 2012 03:02 pm
Antoine Pitrou Jun 21, 2012 03:10 pm
PJ Eby Jun 21, 2012 03:37 pm
Chris McDonough Jun 21, 2012 03:50 pm
Tarek Ziadé Jun 21, 2012 04:03 pm
PJ Eby Jun 21, 2012 04:26 pm
Chris McDonough Jun 21, 2012 04:44 pm
Tarek Ziadé Jun 21, 2012 05:20 pm
Alex Clark Jun 21, 2012 05:43 pm
PJ Eby Jun 21, 2012 05:49 pm
Tarek Ziadé Jun 21, 2012 06:49 pm
Chris McDonough Jun 21, 2012 05:56 pm
Tarek Ziadé Jun 21, 2012 07:17 pm
Paul Moore Jun 21, 2012 08:01 pm
PJ Eby Jun 21, 2012 08:34 pm
Donald Stufft Jun 21, 2012 09:38 pm
Alex Clark Jun 21, 2012 11:34 pm
Stephen J. Turnbull Jun 22, 2012 06:25 am
Nick Coghlan Jun 22, 2012 06:30 am
Tarek Ziadé Jun 20, 2012 09:17 am
Antoine Pitrou Jun 22, 2012 08:40 pm
Paul Moore Jun 22, 2012 01:48 pm
Vinay Sajip Jun 22, 2012 03:36 pm
David Cournapeau Jun 22, 2012 01:47 pm
Vinay Sajip Jun 22, 2012 12:09 pm
Dag Sverre Seljebotn Jun 23, 2012 01:37 pm
Antoine Pitrou Jun 23, 2012 01:28 pm
Barry Warsaw Jun 22, 2012 12:14 pm
Antoine Pitrou Jun 22, 2012 02:19 pm
Antoine Pitrou Jun 23, 2012 02:24 pm
Tim Golden Jun 22, 2012 12:23 pm
Stephen J. Turnbull Jun 22, 2012 12:39 pm
Nick Coghlan Jun 23, 2012 11:57 am
mar...@v.loewis.de Jun 28, 2012 11:56 am
David Cournapeau Jun 23, 2012 11:53 am
Lennart Regebro Jun 23, 2012 11:55 am
Alexandre Zani Jun 22, 2012 05:09 pm
Floris Bruynooghe Jun 23, 2012 10:52 am
Donald Stufft Jun 22, 2012 10:38 am
Antoine Pitrou Jun 23, 2012 12:35 pm
Vinay Sajip Jun 23, 2012 01:14 pm
Dag Sverre Seljebotn Jun 23, 2012 12:48 pm
Vinay Sajip Jun 23, 2012 01:20 pm
Terry Reedy Jun 22, 2012 08:55 pm
Donald Stufft Jun 22, 2012 09:06 pm
Dag Sverre Seljebotn Jun 22, 2012 10:28 am
Paul Moore Jun 22, 2012 11:27 am
Antoine Pitrou Jun 22, 2012 09:55 am
Alex Clark Jun 22, 2012 01:13 pm
Vinay Sajip Jun 22, 2012 09:11 am
Nick Coghlan Jun 22, 2012 06:29 am
Nick Coghlan Jun 22, 2012 05:05 am
Dag Sverre Seljebotn Jun 23, 2012 11:13 am
Vinay Sajip Jun 23, 2012 12:27 pm
Barry Warsaw Jun 22, 2012 12:20 pm
Dag Sverre Seljebotn Jun 22, 2012 09:52 am
Vinay Sajip Jun 22, 2012 10:09 am
Donald Stufft Jun 22, 2012 10:35 am
Vinay Sajip Jun 22, 2012 07:56 am
Donald Stufft Jun 22, 2012 09:38 am
PJ Eby Jun 22, 2012 08:11 pm
David Cournapeau Jun 22, 2012 08:35 pm
David Cournapeau Jun 22, 2012 10:20 am
Donald Stufft Jun 22, 2012 08:05 am
Dag Sverre Seljebotn Jun 22, 2012 09:22 am
Messages in this thread