After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 308328 - should probably support python distutils setup.py
should probably support python distutils setup.py
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: James Henstridge
Jhbuild QA
Depends on:
Blocks: 308352
 
 
Reported: 2005-06-19 19:55 UTC by Luis Villa
Modified: 2006-07-25 16:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
an ugly first cut at this. (5.12 KB, patch)
2005-06-20 02:16 UTC, Luis Villa
none Details | Review
patch against 2.12 moduleset (1.54 KB, patch)
2005-06-20 02:35 UTC, Luis Villa
none Details | Review

Description Luis Villa 2005-06-19 19:55:50 UTC
I'd prefer it if all useful python programs were autogenned, but since they
aren't, it would be nice if there was a cvssetuppy module. [Alternative name
suggestions acceptable :) I'm looking at implementing at least basic support for
this right now, thought I'd file a bug as a placeholder.

[My main motivation for this is ldtp, FWIW.]
Comment 1 Luis Villa 2005-06-20 02:16:51 UTC
Created attachment 48025 [details] [review]
an ugly first cut at this.

Attached is a (poor) cvssetuppy module. It works, at least for the ldtp case-
the only thing I've found to test it on so far. It is hacked out of the mozilla
module.

Some comments:
* this is sort of hackish- it inherits from cvsmodule, which inherits from
autogen module, so I end up overriding most autogen module functions. I could
reimplement at the same level as the autogen module (in utils.py?) if that
feels better.
* I think I need to redefine the build states (since there is no 'configure'
state here) but I'm not quite sure how to do that yet, though admittedly I
haven't looked hard. For the meantime I've just introduced a couple dummy
functions that pass you on to the next state, just in case. [ATM it seems to
ignore -a and -c, though I think those should work. Not sure what is wrong
there.]
* parse_cvssetuppymodule feels particularly ugly; it is totally copy/pasted and
I've not cut anything out for fear of breaking it, but I'm pretty sure 90% of
it is useless. I'll try to clean that out tonight or tomorrow.
* you can't pass any build/install options ATM. Should be easy enough to add, I
guess, if anyone cares.
Comment 2 Luis Villa 2005-06-20 02:35:29 UTC
Created attachment 48027 [details] [review]
patch against 2.12 moduleset

This adds ldtp stuff to the gnome-2.12 moduleset, allowing for testing of the
patch above.
Comment 3 Luis Villa 2005-06-20 02:36:21 UTC
Comment on attachment 48025 [details] [review]
an ugly first cut at this.

Marking this a patch for reporting/searching purposes, even though it is really
an additional file and not a patch.
Comment 4 James Henstridge 2005-06-20 04:19:47 UTC
This probably indicates that the existing module type system is not sufficient.

At the moment, I have the following class heirarchy:
  AutogenModule
   + CVSModule
   + SVNModule
   + ArchModule

However, if we add distutils support, ideally we should be able to combine it
with any of CVS, Subversion, Arch or any other revision control system we
support (in the case of Python distutils, we'd want to support "tarball" too).

So it seems that inheritance isn't the best way to combine the repository type
with the build rules.  I'll need to think about this a bit more ...
Comment 5 James Henstridge 2005-06-21 02:48:34 UTC
Note: don't take the above statement to mean that I won't accept your patch.  If
you get the LDTP stuff working before I get time to refactor the build
infrastructure, it would make sense to check in your module type even if it
isn't implemented in the best way.
Comment 6 Luis Villa 2005-06-21 03:08:11 UTC
hehe. I wouldn't necessarily take my patch... this is not exactly my strongest
work ;) As pointed out in bug 308352, there are a lot of other blockers on the
LDTP stuff ATM, so we'll see how that goes.
Comment 7 James Henstridge 2005-06-30 05:22:19 UTC
I put up some of my thoughts about refactoring the module type code here:
  http://live.gnome.org/JhbuildModuleRefactor
Comment 8 Ian Miller 2005-10-02 22:15:57 UTC
With the introduction of iso-codes in Gnome-2.12 this subject "should probably
support python setup.py" becomes even more probable.  jhbuild bootstrap upgrades
Python to version 2.4.1 but it does not install PyXML and that is required to
build iso-codes.
Comment 9 James Henstridge 2005-10-03 04:06:12 UTC
Adding support for setup.py-style packages is certainly a goal.  It won't help
with the iso-codes build, however.

At the moment iso-codes explicitly uses /usr/bin/python, so the system Python
needs to have PyXML installed.  To help make building the package easier, I
submitted a patch that should make the module buildable with or without PyXML:
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=331357
Comment 10 James Henstridge 2006-05-01 06:24:15 UTC
Once the current refactoring is done, it should be very easy to add distutils module support such that it functions with every supported version control system.
Comment 11 James Henstridge 2006-06-19 10:03:35 UTC
Added support for distutils modules.  Should work with the following syntax:

  <distutils id="foo">
    <branch repo="bar" module="baz"/>
  </distutils>
Comment 12 Elijah Newren 2006-07-25 05:23:06 UTC
How does one get distutils modules obtained from tarballs instead of some repository to work?  This is currently needed for dbus-python (well, for those of us creating tarball modulesets for gnome 2.15.x point releases based off jhbuild anyway), and would also solve bug 311563.  It seems that it should be something easy but I appear to have missed it.
Comment 13 Elijah Newren 2006-07-25 16:59:43 UTC
I caught James on irc and got the necessary hints from him there.  An example for how to do this for a tarball version of dbus-python is:

  <repository type="tarball" name="dbus/dbus-python"
      href="http://dbus.freedesktop.org/releases/"/>
  <distutils id="dbus-python">
    <branch repo="dbus/dbus-python"
	    module="dbus-python-0.71.tar.gz" version="0.71"
	    size="137613" md5sum="ee893bc87b784a8c2285f5041b5e7033" />
    <dependencies>
      <dep package="dbus"/>
      <dep package="dbus-glib"/>
    </dependencies>
  </distutils>

Thanks James!