A.M. Kuchling added the comment:

I just tried building trunk on MacOS 10.6.8, and make install fails with this 
traceback:

Traceback (most recent call last):
  File "./setup.py", line 2175, in <module>
    main()
  File "./setup.py", line 2170, in main
    "Tools/scripts/2to3", "Tools/scripts/pyvenv"]
  File "/Users/akuchling/source/p/cpython/Lib/distutils/core.py", line 148, in 
setup
    dist.run_commands()
  File "/Users/akuchling/source/p/cpython/Lib/distutils/dist.py", line 917, in 
run_commands
    self.run_command(cmd)
  File "/Users/akuchling/source/p/cpython/Lib/distutils/dist.py", line 936, in 
run_command
    cmd_obj.run()
  File "/Users/akuchling/source/p/cpython/Lib/distutils/command/install.py", 
line 566, in run
    self.run_command(cmd_name)
  File "/Users/akuchling/source/p/cpython/Lib/distutils/cmd.py", line 313, in 
run_command
    self.distribution.run_command(command)
  File "/Users/akuchling/source/p/cpython/Lib/distutils/dist.py", line 936, in 
run_command
    cmd_obj.run()
  File 
"/Users/akuchling/source/p/cpython/Lib/distutils/command/install_lib.py", line 
93, in run
    outfiles = self.install()
  File "./setup.py", line 2068, in install
    self.set_file_modes(outfiles, 0o644, 0o755)
  File "./setup.py", line 2079, in set_file_modes
    if filename.endswith(self.shlib_suffix): mode = sharedLibMode
TypeError: endswith first arg must be str or a tuple of str, not NoneType
make: *** [sharedinstall] Error 1

The following patch fixes the traceback, but I don't know why shlib_suffix is 
None.

-> hg diff
diff -r 9328e2b8a397 setup.py
--- a/setup.py  Tue Apr 02 22:13:49 2013 +0200
+++ b/setup.py  Tue Apr 02 19:10:27 2013 -0400
@@ -2076,7 +2076,9 @@
         for filename in files:
             if os.path.islink(filename): continue
             mode = defaultMode
-            if filename.endswith(self.shlib_suffix): mode = sharedLibMode
+            if (self.shlib_suffix is not None and
+                filename.endswith(self.shlib_suffix)):
+                mode = sharedLibMode
             log.info("changing mode of %s to %o", filename, mode)
             if not self.dry_run: os.chmod(filename, mode)

----------
nosy: +akuchling

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16754>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to