• [gentoo-dev] sci-geosciences/routino: DISTUTILS_USE_SETUPTOOLS=no -> DI

    From Andrey Grozin@21:1/5 to All on Thu Feb 16 14:50:01 2023
    Hello *,

    sci-geosciences/routino has the USE flag python.
    I've just changed
    PYTHON_COMPAT=( python3_{9..10} )
    to
    PYTHON_COMPAT=( python3_{9..11} )
    in sci-geosciences/routino, routino[python] builds fine. The ebuild
    contains the lines

    DISTUTILS_USE_SETUPTOOLS=no
    PYTHON_COMPAT=( python3_{9..11} )
    inherit toolchain-funcs distutils-r1

    and pkgcheck scan complains that it is not PEP517. I've tried to change DISTUTILS_USE_SETUPTOOLS=no
    to
    DISTUTILS_USE_PEP517=setuptools
    But then emerging routino[python] leads to lots of strange things:

    * python3_9: running distutils-r1_run_phase python_install
    python3.9 setup.py install /usr/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build
    and pip and other standards-based tools.
    warnings.warn( /usr/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use
    build and pip and other standards-based tools.
    warnings.warn(
    * ACCESS DENIED: open_wr: /usr/lib/python3.9/site-packages/test-easy-install-190.write-test
    error: can't create or remove files in install directory

    The following error occurred while trying to add or remove files in the installation directory:

    [Errno 13] Permission denied: '/usr/lib/python3.9/site-packages/test-easy-install-190.write-test'

    The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:

    /usr/lib/python3.9/site-packages/

    Perhaps your account does not have write access to this directory? If the installation directory is a system-owned directory, you may need to sign
    in
    as the administrator or "root" account. If you do not have administrative access to this machine, you may wish to choose a different installation directory, preferably one that is listed in your PYTHONPATH environment variable.

    For information on other options, you may wish to consult the
    documentation at:

    https://setuptools.pypa.io/en/latest/deprecated/easy_install.html

    Please make the appropriate changes for your system and try again.

    * ERROR: sci-geosciences/routino-3.3.3-r4::grozin failed (install phase):
    * (no error message)
    *
    * Call stack:
    * ebuild.sh, line 136: Called src_install
    * environment, line 3349: Called distutils-r1_src_install
    * environment, line 1553: Called _distutils-r1_run_foreach_impl 'python_install'
    * environment, line 690: Called python_foreach_impl 'distutils-r1_run_phase' 'python_install'
    * environment, line 3027: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_install'
    * environment, line 2586: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_install'
    * environment, line 2584: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_install'
    * environment, line 1022: Called distutils-r1_run_phase
    'python_install'
    * environment, line 1511: Called python_install
    * environment, line 3161: Called esetup.py 'install'
    * environment, line 2118: Called die
    * The specific snippet of code:
    * "${@}" || die -n;

    So,
    setup.py install is deprecated
    easy_install command is deprecated
    and it tries to install test-easy-install-190.write-test to some strange
    place. Any idea what I should use in DISTUTILS_USE_PEP517?

    Andrey

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