• [gentoo-dev] [python] PEP 517 migration

    From =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=@21:1/5 to All on Mon Jan 17 11:20:02 2022
    Hi, everyone.

    I've added a short PEP 517 migration guide to the docs [1]. This should
    work for the vast majority of packages using distutils-r1, as long as
    they don't use too many hacks. For things like numpy or pillow we'll
    have to figure out individual solutions.

    In general, there's no need for urgent migration. I'm slowly migrating
    Python packages on version bumps. Note that the dependencies haven't
    been keyworded on ~alpha yet.

    Long story short, to migrate you:

    1. Add DISTUTILS_USE_PEP517=<build-system> with the list of supported
    build systems being defined in the eclassdoc (right now: flit, pdm,
    poetry, setuptools). For pure distutils we also use setuptools.
    Don't use standalone, that's internal python@ stuff.

    2. Remove DISTUTILS_USE_SETUPTOOLS. If you still need RDEPEND
    on setuptools (i.e. the package imports setuptools or pkg_resources),
    add it explicitly.

    3. Remove distutils_install_for_testing (or --install arg to distutils_enable_tests). This should no longer be necessary, we supply venv-style install tree out of the box.

    IMPORTANT: please verify installed file list, Python upstream doesn't
    care much about backwards compatibility and this can break stuff. app-portage/iwdevtools can be helpful in checking file list on bumps.

    Please lemme know if you hit any issues.


    [1] https://dev.gentoo.org/~mgorny/python-guide/migration.html#migrating-to-pep-517-builds

    --
    Best regards,
    Michał Górny

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)