[issue13803] Under Solaris, distutils doesn't include bitness in the directory name

2012-01-18 Thread Éric Araujo

Éric Araujo  added the comment:

Final code looks OK to me.

--
type: enhancement -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13803] Under Solaris, distutils doesn't include bitness in the directory name

2012-01-17 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 147ad02875fa by Jesus Cea in branch '3.2':
And yet another emergency fix for #13803 bootstrap issue: Under Solaris, 
distutils doesn't include bitness in the directory name
http://hg.python.org/cpython/rev/147ad02875fa

New changeset 582274636446 by Jesus Cea in branch 'default':
MERGE: And yet another emergency fix for #13803 bootstrap issue: Under Solaris, 
distutils doesn't include bitness in the directory name
http://hg.python.org/cpython/rev/582274636446

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13803] Under Solaris, distutils doesn't include bitness in the directory name

2012-01-17 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

A trivial check-in causing a nightmare at 5AM just hours before a day-long 
offline trip :-).

Eric, could you possibly review the committed version?. I can't use 
"platform.architecture()" because bootstrap issues. For instance: 
http://www.python.org/dev/buildbot/all/builders/x86%20OpenIndiana%202.7/builds/828/steps/compile/logs/stdio

Moreover, there are function redundancy between "distutils/util.py" and 
"sysconfig.py", and the return value must be consistent. This is just created 
issue13813.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13803] Under Solaris, distutils doesn't include bitness in the directory name

2012-01-17 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 4074439c3894 by Jesus Cea in branch '2.7':
Yet another emergency fix for #13803 bootstrap issue: Under Solaris, distutils 
doesn't include bitness in the directory name
http://hg.python.org/cpython/rev/4074439c3894

New changeset 37efae3bf912 by Jesus Cea in branch '3.2':
Yet another emergency fix for #13803 bootstrap issue: Under Solaris, distutils 
doesn't include bitness in the directory name
http://hg.python.org/cpython/rev/37efae3bf912

New changeset afdce2e2f98d by Jesus Cea in branch 'default':
MERGE: Yet another emergency fix for #13803 bootstrap issue: Under Solaris, 
distutils doesn't include bitness in the directory name
http://hg.python.org/cpython/rev/afdce2e2f98d

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13803] Under Solaris, distutils doesn't include bitness in the directory name

2012-01-17 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 2ec4ab2a6f65 by Jesus Cea in branch '2.7':
Emergency fix for #13803 bootstrap issue: Under Solaris, distutils doesn't 
include bitness in the directory name
http://hg.python.org/cpython/rev/2ec4ab2a6f65

New changeset 9d62f5aa35ff by Jesus Cea in branch '3.2':
Emergency fix for #13803 bootstrap issue: Under Solaris, distutils doesn't 
include bitness in the directory name
http://hg.python.org/cpython/rev/9d62f5aa35ff

New changeset 4a6e0b6d493b by Jesus Cea in branch 'default':
MERGE: Emergency fix for #13803 bootstrap issue: Under Solaris, distutils 
doesn't include bitness in the directory name
http://hg.python.org/cpython/rev/4a6e0b6d493b

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13803] Under Solaris, distutils doesn't include bitness in the directory name

2012-01-17 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 284550d0d8ae by Jesus Cea in branch '2.7':
Closes #13803: Under Solaris, distutils doesn't include bitness in the 
directory name
http://hg.python.org/cpython/rev/284550d0d8ae

New changeset eed73b16e71f by Jesus Cea in branch '3.2':
Closes #13803: Under Solaris, distutils doesn't include bitness in the 
directory name
http://hg.python.org/cpython/rev/eed73b16e71f

New changeset 8d0ccb4ad206 by Jesus Cea in branch 'default':
MERGE: Closes #13803: Under Solaris, distutils doesn't include bitness in the 
directory name
http://hg.python.org/cpython/rev/8d0ccb4ad206

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13803] Under Solaris, distutils doesn't include bitness in the directory name

2012-01-17 Thread Éric Araujo

Éric Araujo  added the comment:

OK.

 from distutils.spawn import spawn
 from distutils import log
 from distutils.errors import DistutilsByteCompileError
+import platform

Please put that import higher up (with the other “import X”, before the “from X 
import Y”).
 
+machine += ".%s" %platform.architecture()[0]

One space after the % operator please.

> I will commit it to 2.7, 3.1, 3.2 and 3.3 in a few days.

Not to 3.1, this is not a security issue.

--
versions:  -Python 2.6, Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13803] Under Solaris, distutils doesn't include bitness in the directory name

2012-01-17 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Proposed patch for Python 2.7:

"""
--- util.py.old 2011-12-12 01:34:04.412234183 +0100
+++ util.py 2012-01-17 15:15:23.262257886 +0100
@@ -12,6 +12,7 @@
 from distutils.spawn import spawn
 from distutils import log
 from distutils.errors import DistutilsByteCompileError
+import platform
 
 def get_platform ():
 """Return a string that identifies the current platform.  This is used
@@ -76,6 +77,7 @@
 if release[0] >= "5":   # SunOS 5 == Solaris 2
 osname = "solaris"
 release = "%d.%s" % (int(release[0]) - 3, release[2:])
+machine += ".%s" %platform.architecture()[0]
 # fall through to standard osname-release-machine representation
 elif osname[:4] == "irix":  # could be "irix64"!
 return "%s-%s" % (osname, release)
"""

So now the directory is named like "lib.solaris-2.10-i86pc.32bit-2.7".

Please, review.

I will commit it to 2.7, 3.1, 3.2 and 3.3 in a few days.

--
assignee: tarek -> jcea
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13803] Under Solaris, distutils doesn't include bitness in the directory name

2012-01-16 Thread Jesús Cea Avión

New submission from Jesús Cea Avión :

When compiling modules under Solaris, distutils generates directories like 
"build/lib.solaris-2.10-i86pc-3.2". The "i86pc" part is the same both in 32 and 
64 bits.

So when building 32 and 64 bit C code, the binaries are mixed and the best 
result you can get is something like:

"""
ImportError: ld.so.1: python: fatal: 
/home/pybsddb/build/lib.solaris-2.10-i86pc-2.7/bsddb3/_pybsddb.so: wrong ELF 
class: ELFCLASS64
"""

In other platforms, bitness is correctly detected and included in the directory 
name.

Since Solaris is explicitly managed in the sourcecode 
("distutils.util.get_platform()"), adding "platform.architecture()[0]" in the 
directory name seems trivial.

I think this patch should be applied to 2.6 and 3.1, unless they are open only 
for security fixes.

--
assignee: tarek
components: Distutils
keywords: easy
messages: 151427
nosy: eric.araujo, jcea, tarek
priority: normal
severity: normal
status: open
title: Under Solaris, distutils doesn't include bitness in the directory name
type: enhancement
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com