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
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 line. Does this sounds like an acceptable change to you?
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).
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.
History
Date
User
Action
Args
2022-04-11 14:57:30
admin
set
github: 59120
2014-03-12 09:17:35
eric.araujo
set
status: open -> closedresolution: out of datestage: resolved
2012-05-28 14:13:24
ncoghlan
set
messages: + title: pysetup may leave a package in a half-installed state -> pysetup3.3 install is case insensitive, remove is case sensitive