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.

Title: pysetup3.3 install is case insensitive, remove is case sensitive
Type: Stage: resolved
Components: Distutils2 Versions: Python 3.3
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: alexis, eric.araujo, ncoghlan, tarek, tshepang
Priority: high Keywords:

Created on 2012-05-25 15:03 by ncoghlan, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg161583 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2012-05-25 15:03
Do "make altinstall" from trunk.

Try running "pysetup3.3 install distutils2"

This won't work properly, because distutils2 uses Python 2 syntax.

However, after running that command:

"pysetup3.3 remove distutils2" complains that distutils2 is not installed, but "import distutils2" works at the 3.3. command prompt
msg161719 - (view) Author: Alexis Metaireau (alexis) * (Python triager) Date: 2012-05-27 20:10
Oh, a potential way to avoid this would be to check that the metadata 
have the python 3 trove classifier in it.

We could also add a way to force the installation even if the right 
classifier is not present with a special flag passed to the command 

Does this sounds like an acceptable change to you?
msg161783 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-05-28 13:58
IIUC checking trove classifiers / requires-python or something else before installing may be a good idea, but this bug is about something else: a project can be half-installed.  You could reproduce it with a Python 2 project with one file containing a syntax error (I think unittest2 is an example, see #10530).
msg161786 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2012-05-28 14:13
My original report looks like a misdiagnosis. What appears to be happening is that "pysetup3.3 install" is case *insensitive* (thus allowing "pysetup3.3 install distutils2", but "pysetup3.3 remove" is case *sensitive*, thus requiring "pysetup3.3 remove Distutils2".

I figured this out because installing things with pysetup3.3 after running "make altinstall" actually broke test_packaging in my trunk build - apparently due to tests complaining that the package cache wasn't empty. Should I create a new issue pointing out that problem? Perhaps sysconfig should have a "checkout" profile that keeps everything away from system directories.

Anyway, after seeing Distutils2 in that test failure report, I thought to run "pysetup3.3 list" and confirmed the different capitalisation. Sure enough, upper-casing the initial D let the remove command work.
Date User Action Args
2022-04-11 14:57:30adminsetgithub: 59120
2014-03-12 09:17:35eric.araujosetstatus: open -> closed
resolution: out of date
stage: resolved
2012-05-28 14:13:24ncoghlansetmessages: + msg161786
title: pysetup may leave a package in a half-installed state -> pysetup3.3 install is case insensitive, remove is case sensitive
2012-05-28 13:58:30eric.araujosetmessages: + msg161783
2012-05-27 20:10:52alexissetmessages: + msg161719
2012-05-25 16:23:55tshepangsetnosy: + tshepang
2012-05-25 15:03:49ncoghlancreate