* Tom Mueller (pkg-discuss) <[EMAIL PROTECTED]> [2008-05-22 19:40]:
> I'd like to start a separate thread for this topic.
>
> The initial porting changes (issue 160) introduced the use of a setup.py
> file and the Python distutils library for building IPS on systems that
> do not natively support make. (The UC2 project actually uses it for our
> nightly builds on all platforms - Mac OS, Linux, older Solaris, as well
> as Windows). The impression that I got from James when coming into the
> project was that there was an intent to eventually transition completely
> to distutils and eliminate the use of the top-level Makefile. [1] It
> seems that that impression might have been incorrect.
>
> There have been a couple of issues raised (1231, 1958) because changes
> were made to the Makefile but not to setup.py. Shawn is now facing this
> issue to with the Cherrypy changes. Having two build systems is
> certainly a maintenance issue.
>
> Pros/Cons:
>
> The advantages of using distutils/setup.py include:
>
> 1. Distutils is typically used for Python projects. This is what python
> developers are used to seeing.
>
> 2. Distutils has a lower cost of entry for potential IPS developers if
> they are developing on Windows. No need to get cygwin or some other
> provider of make.
>
> 3. The build system has the full power of Python.
>
> 4. Distutils knows about Python, e.g., the python package system, .pyc
> files, pylint, etc. For example, adding a file to module to an existing
> python package doesn't require changing the setup.py file at all.
>
> The disadvantages of using distutils/setup.py include:
>
> a. Current project developers are more familiar with make than distutils.
>
> b. Make does some things easier than distutils. For example, the code to
> do the version substitution in __init__.py is easier in the Makefile.
>
> c. Since some parts of the build will always be OpenSolaris only (e.g.,
> util/distro-import, packagemanger), and they are unlikely to be
> converted to distutils, there would still be a mixture of distutils and
> make.
>
> If the project intent is to stay with make indefinitely for the
> top-level build, then I'd be willing to figure out how to make the
> Makefiles work on other platforms, and to live with the requirement of
> having cygwin for Windows. We'd get rid of the src/setup.py file.
>
> Otherwise, we should get rid of src/Makefile with everyone using distutils.
>
> Thoughts?
I'm still torn on this, because I'd like to use distutils/setuptools
for the Python portion. The current setup.py ignores the packaging
targets, which I think is right, but bears checking. The target
consolidation for packaging (OpenSolaris-specific point) is one of ON
or SFW, which are Makefile-oriented consolidations so I'd be okay with
the following:
Makefile - implementation of OpenSolaris-specific targets
- invocation of src/setup.py for generic pkg(5) targets
- invocation of [CherryPy]/setup.py for CherryPy
- (eventual) invocation of src/gui/setup.py for packagemanager
src/setup.py - Python-only targets (includes C extensions)
On non-OpenSolaris then, the question is whether there's anything
other than the three setup.py invocations?
(Since setup.py can do the target architecture evaluation, I'd expect
it to be used to eliminate the dynamic platform binding currently in
the portable. modules. I mean, just to dredge up one of my code
review comments from long ago for no reason. :) )
- Stephen
--
[EMAIL PROTECTED] http://blogs.sun.com/sch/
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss