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: Installer for mac doesn't store the installation location
Type: enhancement Stage:
Components: Installation, macOS Versions: Python 3.11
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: ned.deily Nosy List: ned.deily, ronaldoussoren, ustinov
Priority: low Keywords:

Created on 2014-05-30 14:57 by ustinov, last changed 2022-04-11 14:58 by admin.

Messages (3)
msg219393 - (view) Author: Artem Ustinov (ustinov) Date: 2014-05-30 14:56
I'm trying to automate the Python uninstallation on mac but I've found that the actual installation location is not stored for Python packages.
That location is required since the pkgutil keeps track of installed files (if you run $ pkgutil --files org.python.Python.PythonFramework-3.4) but doesn't store the absolute paths for that files.


1. Run $ pkgutil --pkgs=.*Python.*3\.4
Here's the expected output
org.python.Python.PythonApplications-3.4
org.python.Python.PythonDocumentation-3.4
org.python.Python.PythonFramework-3.4
org.python.Python.PythonInstallPip-3.4
org.python.Python.PythonProfileChanges-3.4
org.python.Python.PythonUnixTools-3.4

2. Run $ pkgutil --pkg-info org.python.Python.PythonFramework-3.4
Here's the output
package-id: org.python.Python.PythonFramework-3.4
version: 3.4.1
volume: /
location: (null)
install-time: 1401373546

Actual Result: The location property is (null)
Expected Result: The location property should be '/Library/Frameworks/Python.framework'
msg219394 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2014-05-30 15:00
According to the manpage pkgutil is used with flat packages. The Python installer users older bundle-style packages.
msg219444 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-05-31 05:34
Files are recorded during bundle-style installation, too.  Without spending a lot of time looking at it right now, I believe the null location reported is a red herring; I think that has to do with packages that allow themselves to be installed in arbitrary locations.  The Python installer packages do not allow that.  That said, the paths reported by the --files options could be more accurate.  I'll see what I can do as part of the conversion to producing flat packages.  There are other issues, though.  There are files created by the packages' postflight scripts.  In particular, the many .pyc and .pyo files are created by compileall during post-installation so these files are not recorded as installed.  Thus, you cannot currently depend on the results of --files to uninstall all files.  Automated uninstalls have never been supported; it would be nice to do.
History
Date User Action Args
2022-04-11 14:58:04adminsetgithub: 65812
2021-10-20 11:07:29iritkatrielsettype: behavior -> enhancement
versions: + Python 3.11, - Python 3.5
2014-05-31 05:34:28ned.deilysetpriority: normal -> low
assignee: ronaldoussoren -> ned.deily
messages: + msg219444

versions: + Python 3.5, - Python 3.2, Python 3.3, Python 3.4
2014-05-30 15:00:50ronaldoussorensetnosy: + ned.deily
messages: + msg219394
2014-05-30 14:57:01ustinovcreate