From Fedora Project Wiki
No edit summary
No edit summary
 
(28 intermediate revisions by 4 users not shown)
Line 6: Line 6:
** by '''cstratak'''
** by '''cstratak'''
** stdlib and site-packages installs to /usr/lib(64)/platform-python3.6
** stdlib and site-packages installs to /usr/lib(64)/platform-python3.6
*** done
** /usr/libexec/platform-python
** /usr/libexec/platform-python
*** done
** python3-config to platform-python-config, make it work
** python3-config to platform-python-config, make it work
** libpython.so to libplatformpython.so, make it work
*** excluded the python-config binaries for now
** libpython.so to libplatform-python.so, make it work
*** done
** probably drop tkinter and tools until proven needed
** probably drop tkinter and tools until proven needed
*** stalled, it can be done later
** Make Platform-Python build without bootstrapping:
*** drop dependency on setuptools, pip, wheel
*** undo de-bundling of setuptools and pip, but delete the bundled pip wheel, making Python crash when <code>-m venv</code> is invoked
**** pip wheel is removed, setuptools is there
**** LATER make it not crash, but report a decent error message such as "Creating virtual environment with platform-python is not supported and is disabled. Use python3 instead."
** Enable the test suite
*** Two test case failures so far
**** One related to systemd-nspawn and the other to sysconfig, both can be safely skipped
** Enable profile guided optimizations and link time optimizations
*** Done
** /usr/libexec/platform-python3.X
*** Done


* '''create macros from the example specfile'''
* '''create macros from the example specfile'''
** by '''torsava'''
** by '''torsava'''
** <u>done</u>
** put them to python-rpm-macros
** put them to python-rpm-macros
** ready in COPR
** https://github.com/torsava/python-rpm-macros/tree/private-torsava-master
** https://github.com/torsava/python-rpm-macros/tree/private-torsava-master


* '''adjust the python(abi) requires/provides mechanism'''
* '''adjust the python(abi) requires/provides mechanism'''
** by '''churchyard''' / '''mhroncok'''
** <u>done</u>
** patch at https://github.com/hroncok/rpm/commits/platform-python
** it should require/provide platform-python(abi) for stuff in /usr/lib(64)/platform-python
** it should require/provide platform-python(abi) for stuff in /usr/lib(64)/platform-python
** the code lives in the rpm package
** the code lives in the rpm package: https://github.com/rpm-software-management/rpm/blob/master/scripts/pythondeps.sh
** this is part of python-rpm-generators package!
** LATER make python-rpm-generators run on platform python MAYBE?


* '''add platform supackages to setuptools, pip, wheel'''
* '''adjust pybytecompile script'''
** by '''torsava'''
** should bytecompile stuff in /usr/lib/platform-python3.X with /usr/libexec/platform-python3.X
** add bcond conditionals for all 3 subpackages: with_python2, with_python3, with_platform_python
** by '''churchyard''' / '''mhroncok'''
** bootstrap build them (see python3.spec for build order)
** <u>done</u>
** patch at https://github.com/hroncok/rpm/commits/platform-python
 
* '''start adding platform-python subpackages up until dnf'''
** <u>done</u>
** add bcond conditionals for all 3 subpackages: <code>%bcond_without python2</code>, python3, platform_python
** if present, remove the system python abi macro and/or shabeng adjusting for system-python
** check if the platform-python(abi) works
** check if the platform-python(abi) works


* '''rebuild platform-python with rewheel'''


* '''start adding platform-python subpackages up until dnf'''
** add bcond conditionals for all 3 subpackages: with_python2, with_python3, with_platform_python
** if present, remove the system python abi macro and/or shabeng adjusting for system-python


* '''adjust dnf'''
* '''adjust dnf'''
** make <code>/usr/bin/dnf</code> use <code>/usr/libexec/platform-python</code>, make it require platform-python-dnf instead of python3-dnf
** make <code>/usr/bin/dnf</code> use <code>/usr/libexec/platform-python</code>, make it require platform-python-dnf instead of python3-dnf
** <u>done</u>


* '''remove system-python'''
** by '''churchyard''' / '''mhroncok'''
** <u>done</u>


* '''grep the specfiles for system-python abi macro and or shebang requirement and remove it'''
* '''grep the specfiles for system-python abi macro and or shebang requirement and remove it'''
** http://pkgs.fedoraproject.org/repo/rpm-specs-latest.tar.xz
** http://pkgs.fedoraproject.org/repo/rpm-specs-latest.tar.xz
** there are packages not covered by previous steps but using it
** there are packages not covered by previous steps but using it
** probably not worth doing in copr, wait for rawhide
** by '''churchyard''' / '''mhroncok'''
    $ grep --files-with-matches system-python *
** <u>done</u>
    dnf.spec
 
    freeipa.spec
* '''cleanup'''
    gtk2.spec
** remove '/usr/lib64/python36.zip' from platform-python's sys.path
    python3.spec
** Revisit bundled setuptools
    python-rpm-macros.spec
 
    python-six.spec
 
    python-virtualenvcontext.spec
== Bootstrap order for Fedora ==
    rpm.spec


    $ dnf repoquery --whatrequires system-python
As we build stuff in copr, record it here so we know how to build it in Fedora:
    anaconda-core-0:26.21.11-1.fc26.x86_64
    dnf-yum-0:2.6.2-1.fc26.noarch
    gerrymander-0:1.5-6.fc26.noarch
    global-0:6.5.6-1.fc26.x86_64
    hovercraft-0:2.2-1.fc26.noarch
    httpie-0:0.9.4-7.fc26.noarch
    onionshare-0:1.0-1.fc26.noarch
    python-ladon-0:0.9.38-3.fc26.noarch
    python3-alembic-0:0.9.1-1.fc26.noarch
    python3-dnf-0:2.6.2-1.fc26.noarch
    python3-grapefruit-0:0.1a4-5.fc26.noarch
    python3-hawkey-0:0.9.3-1.fc26.x86_64
    python3-iniparse-0:0.4-24.fc26.noarch
    python3-junitxml-0:0.7-10.fc26.noarch
    python3-libcomps-0:0.1.8-3.fc26.x86_64
    python3-librepo-0:1.7.20-3.fc26.x86_64
    python3-os-testr-0:0.7.0-5.fc26.noarch
    python3-prelude-correlator-0:3.1.0-2.fc26.noarch
    python3-pygpgme-0:0.3-22.fc26.x86_64
    python3-pywbem-0:0.10.0-1.fc26.noarch
    python3-raven-0:6.0.0-1.fc26.noarch
    python3-rpm-0:4.13.0.1-5.fc26.x86_64
    python3-six-0:1.10.0-9.fc26.noarch
    python3-websocket-client-0:0.40.0-1.fc26.noarch
    target-restore-0:2.1.fb63-1.fc26.noarch
    targetcli-0:2.1.fb46-1.fc26.noarch


    $ dnf repoquery --whatrequires 'system-python(abi)'
https://etherpad.gnome.org/p/Fedora-Platform-Python-Bootstrap
    python3-dnf-0:2.6.2-1.fc26.noarch
    python3-hawkey-0:0.9.3-1.fc26.x86_64
    python3-iniparse-0:0.4-24.fc26.noarch
    python3-libcomps-0:0.1.8-3.fc26.x86_64
    python3-librepo-0:1.7.20-3.fc26.x86_64
    python3-pygpgme-0:0.3-22.fc26.x86_64
    python3-rpm-0:4.13.0.1-5.fc26.x86_64
    python3-six-0:1.10.0-9.fc26.noarch

Latest revision as of 09:37, 1 September 2017

Platform Python Stack: Roamap

There should be a copr repo where this all happens. In order to have permission, it has been created in the python-sig group: https://copr.fedorainfracloud.org/coprs/g/python/platform-python-stack/

  • create the platform-python package
    • by cstratak
    • stdlib and site-packages installs to /usr/lib(64)/platform-python3.6
      • done
    • /usr/libexec/platform-python
      • done
    • python3-config to platform-python-config, make it work
      • excluded the python-config binaries for now
    • libpython.so to libplatform-python.so, make it work
      • done
    • probably drop tkinter and tools until proven needed
      • stalled, it can be done later
    • Make Platform-Python build without bootstrapping:
      • drop dependency on setuptools, pip, wheel
      • undo de-bundling of setuptools and pip, but delete the bundled pip wheel, making Python crash when -m venv is invoked
        • pip wheel is removed, setuptools is there
        • LATER make it not crash, but report a decent error message such as "Creating virtual environment with platform-python is not supported and is disabled. Use python3 instead."
    • Enable the test suite
      • Two test case failures so far
        • One related to systemd-nspawn and the other to sysconfig, both can be safely skipped
    • Enable profile guided optimizations and link time optimizations
      • Done
    • /usr/libexec/platform-python3.X
      • Done
  • start adding platform-python subpackages up until dnf
    • done
    • add bcond conditionals for all 3 subpackages: %bcond_without python2, python3, platform_python
    • if present, remove the system python abi macro and/or shabeng adjusting for system-python
    • check if the platform-python(abi) works


  • adjust dnf
    • make /usr/bin/dnf use /usr/libexec/platform-python, make it require platform-python-dnf instead of python3-dnf
    • done


  • remove system-python
    • by churchyard / mhroncok
    • done
  • cleanup
    • remove '/usr/lib64/python36.zip' from platform-python's sys.path
    • Revisit bundled setuptools


Bootstrap order for Fedora

As we build stuff in copr, record it here so we know how to build it in Fedora:

https://etherpad.gnome.org/p/Fedora-Platform-Python-Bootstrap