Merge lp:~pefarrell/spud/diamond-setup into lp:spud

Proposed by Patrick Farrell
Status: Merged
Approved by: Tim Greaves
Approved revision: 519
Merged at revision: 519
Proposed branch: lp:~pefarrell/spud/diamond-setup
Merge into: lp:spud
Diff against target: 147 lines (+23/-23)
3 files modified
config.guess (+5/-4)
config.sub (+14/-5)
diamond/setup.py.in (+4/-14)
To merge this branch: bzr merge lp:~pefarrell/spud/diamond-setup
Reviewer Review Type Date Requested Status
Cian Wilson Approve
Tim Greaves Approve
Review via email: mp+95159@code.launchpad.net

Description of the change

This branch fixes the setup.py issues for diamond, and in the process simplifies it considerably.

The root problem (ha ha) was that the target directory of the data_files was supplied as

'//usr/share/whatever'

instead of

'/usr/share/whatever'. In my opinion that shouldn't matter, but in distutils' opinion, it means it should ignore the --root command for the data_files.

This means we can get rid of pulling the --root out of sys.argv ourselves, and get rid of looking up the environment variable DESTDIR.

To post a comment you must log in.
Revision history for this message
Tim Greaves (tim-greaves) wrote :

Confused by the appearance of the config.guess and config.sub changes - are these intentional?

The rest looks good for removing the root and destdir complexity.

Probably silly question - but at what stage is the additional leading / being dealt with, given it's not apparent from this merge?

Thanks for looking at this!

Revision history for this message
Stephan Kramer (s-kramer) wrote :

> Confused by the appearance of the config.guess and config.sub changes - are these intentional?

That's probably related to this bug: https://bugs.launchpad.net/spud/+bug/942835

Revision history for this message
Tim Greaves (tim-greaves) wrote :

OK, yes, afraid I'm not keeping up too well today.

In which case - assuming we are dealing with the additional leading / elsewhere, this looks fine to simplify setup.py.in

review: Approve
Revision history for this message
Cian Wilson (cwilson) wrote :

Yes, I filed a separate bug report for those modified files - though they now don't get modified locally from this branch presumably because the changes have been committed.

I can confirm that this merge fixes bug #942831 for me, i.e. diamond opens successfully after being installed from packages that were built from the source.

Happy to approve assuming there's a conclusion about the unexpectedly modified files.

review: Approve
Revision history for this message
Patrick Farrell (pefarrell) wrote :

When I merge, I will only merge the code changes. We will fix lp:942835 separately.

Where is the leading '/' being dealt with? It is removed from lines 133/144 of setup.py.in.

Revision history for this message
Tim Greaves (tim-greaves) wrote :

I'm being blind, yes, I see now. Thanks.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.guess'
2--- config.guess 2012-01-25 14:00:49 +0000
3+++ config.guess 2012-02-29 12:22:18 +0000
4@@ -1,10 +1,10 @@
5 #! /bin/sh
6 # Attempt to guess a canonical system name.
7 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
8-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
9+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
10 # Free Software Foundation, Inc.
11
12-timestamp='2009-11-20'
13+timestamp='2009-12-30'
14
15 # This file is free software; you can redistribute it and/or modify it
16 # under the terms of the GNU General Public License as published by
17@@ -56,8 +56,9 @@
18 GNU config.guess ($timestamp)
19
20 Originally written by Per Bothner.
21-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
22-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
23+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
24+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
25+Software Foundation, Inc.
26
27 This is free software; see the source for copying conditions. There is NO
28 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
29
30=== modified file 'config.sub'
31--- config.sub 2012-01-25 14:00:49 +0000
32+++ config.sub 2012-02-29 12:22:18 +0000
33@@ -1,10 +1,10 @@
34 #! /bin/sh
35 # Configuration validation subroutine script.
36 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
37-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
38+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
39 # Free Software Foundation, Inc.
40
41-timestamp='2009-11-20'
42+timestamp='2010-01-22'
43
44 # This file is (in principle) common to ALL GNU software.
45 # The presence of a machine in this file suggests that SOME GNU software
46@@ -75,8 +75,9 @@
47 version="\
48 GNU config.sub ($timestamp)
49
50-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
51-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
52+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
53+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
54+Software Foundation, Inc.
55
56 This is free software; see the source for copying conditions. There is NO
57 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
58@@ -380,7 +381,8 @@
59 | sparclite-* \
60 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
61 | tahoe-* | thumb-* \
62- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
63+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
64+ | tile-* | tilegx-* \
65 | tron-* \
66 | ubicom32-* \
67 | v850-* | v850e-* | vax-* \
68@@ -1085,6 +1087,11 @@
69 basic_machine=tic6x-unknown
70 os=-coff
71 ;;
72+ # This must be matched before tile*.
73+ tilegx*)
74+ basic_machine=tilegx-unknown
75+ os=-linux-gnu
76+ ;;
77 tile*)
78 basic_machine=tile-unknown
79 os=-linux-gnu
80@@ -1435,6 +1442,8 @@
81 -dicos*)
82 os=-dicos
83 ;;
84+ -nacl*)
85+ ;;
86 -none)
87 ;;
88 *)
89
90=== modified file 'diamond/setup.py.in'
91--- diamond/setup.py.in 2012-02-27 17:09:38 +0000
92+++ diamond/setup.py.in 2012-02-29 12:22:18 +0000
93@@ -12,12 +12,6 @@
94 # system. This will be a local directory to install into, and act as local '/'
95 # as far as all paths are concerned. Check for this, and fail nicely if not set.
96
97-try:
98- destdir = os.environ["DESTDIR"]
99-except KeyError:
100- destdir = ""
101-
102-
103 prefix = None
104 import sys
105
106@@ -35,8 +29,6 @@
107 for i, arg in enumerate(sys.argv):
108 if "--prefix" in arg:
109 prefix = arg.split('=')[1]
110- if "--root" in arg:
111- destdir = arg.split('=')[1]
112
113 # Given the above prefix possibilities, as well as root and DESTDIR, we need to
114 # construct a list of data directories to be installed
115@@ -44,8 +36,6 @@
116 # * configure-supplied prefixes are dealt with by substitution directly into
117 # this file, with @ PREFIX @ being replaced.
118 # * prefixes as command-line options are pushed by us
119-# * DESTDIR and root have now been condensed into 'destdir' and are pushed
120-# by us
121 #
122 # Note that in the case of this and other packages which supply prefix twice
123 # (once in configure, and then again on the command line) we honour the prefix
124@@ -56,19 +46,19 @@
125 plugin_data_files = []
126 for plugin in plugin_dirs:
127 if prefix is None:
128- plugin_data_files.append((destdir + "@prefix@/share/diamond/plugins/" + plugin,
129+ plugin_data_files.append(("@prefix@/share/diamond/plugins/" + plugin,
130 glob.glob('plugins/' + plugin + '/*.py')))
131 else:
132- plugin_data_files.append((destdir + "/" + prefix + "/share/diamond/plugins/" + plugin,
133+ plugin_data_files.append((prefix + "/share/diamond/plugins/" + plugin,
134 glob.glob('plugins/' + plugin + '/*.py')))
135
136 # Now parse the GUI directories
137 gui_data_files = []
138 if prefix is None:
139- gui_data_files.append((destdir + "@prefix@/share/diamond/gui",
140+ gui_data_files.append(("@prefix@/share/diamond/gui",
141 ["gui/gui.glade", "gui/diamond.svg"]))
142 else:
143- gui_data_files.append((destdir + "/" + prefix + "/share/diamond/gui",
144+ gui_data_files.append((prefix + "/share/diamond/gui",
145 ["gui/gui.glade", "gui/diamond.svg"]))
146
147 # We now have all the information we need; run setup.

Subscribers

People subscribed via source and target branches