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.

classification
Title: install_lib fails under Python 2.1
Type: Stage:
Components: Distutils Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: alberanid, dairiki, loewis, paul.moore
Priority: normal Keywords:

Created on 2004-11-02 17:57 by dairiki, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg22988 - (view) Author: Geoffrey T. Dairiki (dairiki) Date: 2004-11-02 17:57
distutils/command/install_lib.py references os.extsep.
os.extsep is only available in pythons >= 2.2
(The result, naturally, is an uncaught AttributeError.)

Here's a quick patch (though the patch is flawed if
os.extsep is ever anything but '.' --- is it?)


----Begin Patch----
Index: cvs.2/distutils/command/install_lib.py
--- cvs.2/distutils/command/install_lib.py Mon, 25 Oct
2004 13:00:15 -0700 dairiki (distutils/b/43_install_li
1.1 644)
+++ cvs.2(w)/distutils/command/install_lib.py Tue, 02
Nov 2004 09:48:17 -0800 dairiki
(distutils/b/43_install_li 1.1 644)
@@ -9,7 +9,10 @@


 # Extension for Python source files.
-PYTHON_SOURCE_EXTENSION = os.extsep + "py"
+try:
+    PYTHON_SOURCE_EXTENSION = os.extsep + "py"
+except AttributeError:
+    PYTHON_SOURCE_EXTENSION = '.py'


 class install_lib (Command):
----End Patch----
msg22989 - (view) Author: Davide Alberani (alberanid) Date: 2004-11-09 12:39
Logged In: YES 
user_id=170840

A somewhat simpler version:

  PYTHON_SOURCE_EXTENSION = getattr(os, 'extsep', '.') + "py"
msg22990 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2005-01-29 21:02
Logged In: YES 
user_id=113328

This has been fixed in CVS HEAD, and can be closed. It is
probably  a backport candidate to Python 2.4 (I can't check
if that has been done). It's likely too late for 2.3...
msg22991 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-01-29 23:49
Logged In: YES 
user_id=21627

Closing it as fixed. A backport to 2.3 would be pointless,
since 2.3 does have extsep. This change only matters
assuming there will be a separate distutils release some
day, which is doubtful.
History
Date User Action Args
2022-04-11 14:56:07adminsetgithub: 41117
2004-11-02 17:57:25dairikicreate