This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author akuchling
Recipients Arfrever, a.badger, akuchling, amaury.forgeotdarc, barry, bkabrda, dmalcolm, doko, eric.araujo, jafo, ncoghlan, python-dev, rpetrov, smani, tarek
Date 2013-04-02.23:10:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1364944238.14.0.834784969557.issue16754@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2013-04-02 23:10:38akuchlingsetrecipients: + akuchling, barry, doko, jafo, amaury.forgeotdarc, ncoghlan, tarek, eric.araujo, a.badger, rpetrov, Arfrever, dmalcolm, python-dev, bkabrda, smani
2013-04-02 23:10:38akuchlingsetmessageid: <1364944238.14.0.834784969557.issue16754@psf.upfronthosting.co.za>
2013-04-02 23:10:38akuchlinglinkissue16754 messages
2013-04-02 23:10:37akuchlingcreate