Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings on Installation Regarding Deprecated setuptools #5754

Open
isomorphik7 opened this issue Aug 25, 2023 · 2 comments
Open

Warnings on Installation Regarding Deprecated setuptools #5754

isomorphik7 opened this issue Aug 25, 2023 · 2 comments
Assignees
Labels

Comments

@isomorphik7
Copy link

Describe the bug

When attempting to install Avocado from source using the ./setup.py install --user command, I encountered several deprecation warnings. These warnings seem to be related to the use of deprecated setuptools features.

Steps to reproduce

  1. Clone the Avocado repository (git clone https://github.com/avocado-framework/avocado.git)
  2. Navigate into the Avocado directory (cd avocado)
  3. Run ./setup.py build
  4. Run ./setup.py install --user

Expected behavior

The installation process should complete without any deprecation warnings.

Current behavior

The installation process emits multiple deprecation warnings related to setuptools. These warnings relate to:

  • setup.py install being deprecated
  • EasyInstall being deprecated
  • avocado.etc.avocado.scripts.job, avocado.etc.avocado.sysinfo, and avocado.libexec being installed as data, which is deprecated

System information

  • OS: Fedora release 38
  • Commit: 04b6163 (HEAD -> master, origin/master, origin/HEAD) Merge remote-tracking branch 'smitterl/fix_setup'
  • Avocado installation method: Source
  • Python version: 3.11.4

Additional information

Despite the warnings, the package appears to install successfully, but I am concerned that these warnings indicate potential future compatibility issues.

Here's a snippet of the warnings:

$ ./setup.py install --user
running install
/usr/lib/python3.11/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.11/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(
running bdist_egg
running egg_info
writing avocado_framework.egg-info/PKG-INFO
writing dependency_links to avocado_framework.egg-info/dependency_links.txt
writing entry points to avocado_framework.egg-info/entry_points.txt
writing requirements to avocado_framework.egg-info/requires.txt
writing top-level names to avocado_framework.egg-info/top_level.txt
reading manifest file 'avocado_framework.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'avocado_framework.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
/usr/lib/python3.11/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'avocado.etc.avocado.scripts.job' as data is deprecated, please list it in `packages`.
    !!


    ############################
    # Package would be ignored #
    ############################
    Python recognizes 'avocado.etc.avocado.scripts.job' as an importable package,
    but it is not listed in the `packages` configuration of setuptools.

    'avocado.etc.avocado.scripts.job' has been automatically added to the distribution only
    because it may contain data files, but this behavior is likely to change
    in future versions of setuptools (and therefore is considered deprecated).

    Please make sure that 'avocado.etc.avocado.scripts.job' is included as a package by using
    the `packages` configuration field or the proper discovery methods
    (for example by using `find_namespace_packages(...)`/`find_namespace:`
    instead of `find_packages(...)`/`find:`).

    You can read more about "package discovery" and "data files" on setuptools
    documentation page.


!!

  check.warn(importable)
/usr/lib/python3.11/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'avocado.etc.avocado.sysinfo' as data is deprecated, please list it in `packages`.
    !!


    ############################
    # Package would be ignored #
    ############################
    Python recognizes 'avocado.etc.avocado.sysinfo' as an importable package,
    but it is not listed in the `packages` configuration of setuptools.

    'avocado.etc.avocado.sysinfo' has been automatically added to the distribution only
    because it may contain data files, but this behavior is likely to change
    in future versions of setuptools (and therefore is considered deprecated).

    Please make sure that 'avocado.etc.avocado.sysinfo' is included as a package by using
    the `packages` configuration field or the proper discovery methods
    (for example by using `find_namespace_packages(...)`/`find_namespace:`
    instead of `find_packages(...)`/`find:`).

    You can read more about "package discovery" and "data files" on setuptools
    documentation page.


!!

  check.warn(importable)
/usr/lib/python3.11/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'avocado.libexec' as data is deprecated, please list it in `packages`.
    !!


    ############################
    # Package would be ignored #
    ############################
    Python recognizes 'avocado.libexec' as an importable package,
    but it is not listed in the `packages` configuration of setuptools.

    'avocado.libexec' has been automatically added to the distribution only
    because it may contain data files, but this behavior is likely to change
    in future versions of setuptools (and therefore is considered deprecated).

    Please make sure that 'avocado.libexec' is included as a package by using
    the `packages` configuration field or the proper discovery methods
    (for example by using `find_namespace_packages(...)`/`find_namespace:`
    instead of `find_packages(...)`/`find:`).

    You can read more about "package discovery" and "data files" on setuptools
    documentation page.


!!

  check.warn(importable)
@clebergnu clebergnu self-assigned this Sep 13, 2023
@richtja richtja added this to the #104 - Codename TBD milestone Nov 30, 2023
clebergnu added a commit to clebergnu/avocado that referenced this issue Jan 16, 2024
Given that, after the release of 103.0 LTS, we're now on track for
bigger chances, let's start by dropping Python 3.7 support.

There are a number of features that are available on Python 3.8 and
later only. One example is the availibility of importlib.metadata
stardand library, which we intend to use to replace pkg_resources (and
then setuptools as a whole).

As for Avocado users and important platforms, we're on a good position
such as QEMU already requiring Python 3.8, and CentOS Stream 9
shipping Python 3.9.18.

Reference: avocado-framework#5754
Signed-off-by: Cleber Rosa <[email protected]>
clebergnu added a commit to clebergnu/avocado that referenced this issue Jan 18, 2024
Given that, after the release of 103.0 LTS, we're now on track for
bigger chances, let's start by dropping Python 3.7 support.

There are a number of features that are available on Python 3.8 and
later only. One example is the availibility of importlib.metadata
stardand library, which we intend to use to replace pkg_resources (and
then setuptools as a whole).

As for Avocado users and important platforms, we're on a good position
such as QEMU already requiring Python 3.8, and CentOS Stream 9
shipping Python 3.9.18.

Reference: avocado-framework#5754
Signed-off-by: Cleber Rosa <[email protected]>
clebergnu added a commit to clebergnu/avocado that referenced this issue Jan 22, 2024
Given that, after the release of 103.0 LTS, we're now on track for
bigger chances, let's start by dropping Python 3.7 support.

There are a number of features that are available on Python 3.8 and
later only. One example is the availibility of importlib.metadata
stardand library, which we intend to use to replace pkg_resources (and
then setuptools as a whole).

As for Avocado users and important platforms, we're on a good position
such as QEMU already requiring Python 3.8, and CentOS Stream 9
shipping Python 3.9.18.

For RPM builds, EL8 (in all its forms) are not going to be built
anymore on CI.  This may change if the SPEC file is updated to support
a conditional build using Python 3.8 for EL8, but that depends on the
existence of all dependencies on that build, including
python3-aexpect, which is not currently available.

Reference: avocado-framework#5754
Signed-off-by: Cleber Rosa <[email protected]>
@NyuydineBill
Copy link

Hello! I am Nyuydine Bill an applicant for outreachy internship, I wish to know if this issue is still relevant so I can start working on it
Thanks
@clebergnu

@clebergnu
Copy link
Contributor

Hi @NyuydineBill, thanks for reaching out. Yes, this issue still is relevant. As a matter of fact, it's being addressed right now, but you may also be able to help.

There may be a simple fix to each of the warnings being produced, and if you are able to come up with these fixes, they'd be more than welcome.

But, I've chosen to take on this issue from a different angle: removing the setuptools dependency from Avocado. The reason is that Python 3.12 and later standard installations do not come with setuptools, and having an Avocado installation that depends only on Python itself is very attractive.

The first part of the work is removing Avocado's dependency on pkg_resources. This is a WIP so you shouldn't worry about it.

But, with the removal of setuptools, we must change the way we describe and perform Avocado's packaging. Converting Avocado's setup.py to a project.toml is most probably the way to go, see https://packaging.python.org/en/latest/.

If you want to experient with that, it'd be greatly appreciated.

richtja added a commit to richtja/avocado that referenced this issue Mar 26, 2024
From the python 3.12 the setuptools are not part of python and needs to be
installed separately. Let's update the release workflow to handle this issue
until avocado-framework#5754 will be fixed.

Signed-off-by: Jan Richter <[email protected]>
richtja added a commit to richtja/avocado that referenced this issue Mar 26, 2024
From the python 3.12 the setuptools are not part of python and needs to be
installed separately. Let's update the release workflow to handle this issue
until avocado-framework#5754 will be fixed.

Signed-off-by: Jan Richter <[email protected]>
richtja added a commit to richtja/avocado that referenced this issue Mar 26, 2024
From the python 3.12 the setuptools are not part of python and needs to be
installed separately. Let's update the release workflow to handle this issue
until avocado-framework#5754 will be fixed.

Signed-off-by: Jan Richter <[email protected]>
richtja added a commit to richtja/avocado that referenced this issue Mar 26, 2024
From the python 3.12 the setuptools are not part of python and needs to be
installed separately. Let's update the release workflow to handle this issue
until avocado-framework#5754 will be fixed.

Signed-off-by: Jan Richter <[email protected]>
richtja added a commit to richtja/avocado that referenced this issue Mar 26, 2024
From the python 3.12 the setuptools are not part of python and needs to be
installed separately. Let's update the release workflow to handle this issue
until avocado-framework#5754 will be fixed.

Signed-off-by: Jan Richter <[email protected]>
richtja added a commit to richtja/avocado that referenced this issue Mar 26, 2024
From the python 3.12 the setuptools are not part of python and needs to be
installed separately. Let's update the release workflow to handle this issue
until avocado-framework#5754 will be fixed.

Signed-off-by: Jan Richter <[email protected]>
@clebergnu clebergnu removed their assignment Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In progress
Development

No branches or pull requests

5 participants