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: OS X installer provides flat sub-packages with no version numbers
Type: Stage: needs patch
Components: macOS Versions: Python 3.7, Python 3.6, Python 2.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: ned.deily Nosy List: Jim Zajkowski, Paul Bloch, Shea Craig, ned.deily, ronaldoussoren
Priority: high Keywords:

Created on 2015-06-24 19:12 by Jim Zajkowski, last changed 2022-04-11 14:58 by admin.

Messages (7)
msg245769 - (view) Author: Jim Zajkowski (Jim Zajkowski) Date: 2015-06-24 19:12
The 2.7.0 download has zeros as version numbers on the .pkgs inside the metapackage, which leads to the package database showing an installed version of 0.


m-jamesez-darthpro:Downloads jamesez$ pkgutil --info org.python.Python.PythonApplications-2.7
package-id: org.python.Python.PythonApplications-2.7
version: 0
volume: /
location: Applications
install-time: 1435172997

This is from the Distribution file in your package:

    <pkg-ref id="org.python.Python.PythonFramework-2.7" version="0" auth="Root" onConclusion="none" installKBytes="49396">#Python_Framework.pkg</pkg-ref>
    <pkg-ref id="org.python.Python.PythonApplications-2.7" version="0" auth="Root" onConclusion="none" installKBytes="1859">#Python_Applications.pkg</pkg-ref>
    <pkg-ref id="org.python.Python.PythonUnixTools-2.7" version="0" auth="Root" onConclusion="none" installKBytes="14">#Python_Command_Line_Tools.pkg</pkg-ref>
    <pkg-ref id="org.python.Python.PythonDocumentation-2.7" version="0" auth="Root" onConclusion="none" installKBytes="31469">#Python_Documentation.pkg</pkg-ref>
    <pkg-ref id="org.python.Python.PythonProfileChanges-2.7" version="0" auth="Root" onConclusion="none" installKBytes="0">#Python_Shell_Profile_Updater.pkg</pkg-ref>
    <pkg-ref id="org.python.Python.PythonInstallPip-2.7" version="0" auth="Root" onConclusion="none" installKBytes="0">#Python_Install_Pip.pkg</pkg-ref>
msg245770 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2015-06-24 19:16
I assume you are talking about current Python 2.7 .pkg installers, like for 2.7.10.  If so, we can probably fix that, but I'm curious as to what problems this causes.
msg245782 - (view) Author: Jim Zajkowski (Jim Zajkowski) Date: 2015-06-24 23:19
Among the problems this causes, we can't correctly track which version is present on our Macs (~6,000 systems) for upgrading.

msg246244 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2015-07-04 08:54
Right, that would be a good reason!  I seem to recall that, when I initially tested flat-package building and installation, there were problems with pkgs not getting properly installed when version was set, possibly due to confusion between installs and upgrades.  And that might have been due in part to our abuse of some of the Info.plist keys, in particular, CFBundleVersion, at least for pre-releases ('3.5.0b2').  I'd like to move away from installer packages altogether but that will have to wait until 3.6.  We may be able to get a proper version number through pkgutil for current releases but it will require a fair amount of time to explore and thoroughly test.  (Some automated install tests would make it a lot easier.)
msg247420 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2015-07-26 10:18
What's your plan for installers for Py3.6?

In a world where backward compatibility is not an issue I'd definitely advocate trying to move to some kind off .app as the installation.

That is: have a {SomeName}.app that contains the entire Python installation. Arguably SomeName could be IDLE, but it could also be a new custom GUI that does "stuff".  There'd obviously also need to be a documented way to get to the actual sys.prefix from the command-line.

The advantage of this is that users don't have to use on an installer at all, just drop {SomeName}.app in the filesystem and use it.

Getting this to work might be quite a lot of work though, the current binaries are not linked in such a way that this is possible and pyvenv also complicates things.

A major disadvantage is that this likely breaks at least some users workflow.
msg247442 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2015-07-26 17:15
Yes, providing Python on OS X via an app bundle, rather than an installer, seems like the way to go moving forward.  But, yes, there are enough potential compatibility issues that a PEP for it is in order to make sure the major use cases are identified and addressed.  I plan to work on that this fall.
msg299719 - (view) Author: Shea Craig (Shea Craig) Date: 2017-08-03 18:47
For what it's worth, I manage a lot of Macs and know a lot of people in similar roles at major enterprises. We greatly prefer installer packages for automated installation, and end up having to repackage installer apps routinely for products that don't use that mechanism. If it's not an app that can be dropped into the Applications folder, Apple installer packages really are the best format for enterprise deployment.

From the development side I'm not familiar enough with the advantages of trying to use a metapackage to bundle the contained packages, but I can say that the version numbers all being 0 causes me to have to do some extra work to ensure upgrades can be compared against what's already installed.

I assume the metapackage is used to create the ability for the user to choose to exclude some of the subpackages. This is not a feature I use in deploying the software, although I recognize its utility.
Date User Action Args
2022-04-11 14:58:18adminsetgithub: 68690
2017-08-03 18:47:16Shea Craigsetnosy: + Shea Craig
messages: + msg299719
2017-07-26 19:10:21ned.deilysetversions: + Python 3.7, - Python 3.5
2017-07-26 19:09:34ned.deilylinkissue31049 superseder
2016-05-19 21:05:31ned.deilylinkissue27061 superseder
2016-05-19 21:05:20ned.deilysetpriority: normal -> high
nosy: + Paul Bloch

versions: - Python 3.4
2015-07-26 17:15:21ned.deilysetmessages: + msg247442
2015-07-26 10:18:45ronaldoussorensetmessages: + msg247420
2015-07-04 08:56:35ned.deilysetcomponents: - Installation
title: OS X 2.7 package has zeros for version numbers in sub-packages -> OS X installer provides flat sub-packages with no version numbers
2015-07-04 08:54:06ned.deilysetstage: needs patch
messages: + msg246244
versions: + Python 3.4, Python 3.5, Python 3.6
2015-06-24 23:19:07Jim Zajkowskisetmessages: + msg245782
2015-06-24 19:16:44ned.deilysetassignee: ned.deily
messages: + msg245770
2015-06-24 19:12:01Jim Zajkowskicreate