spyder-ide / qtawesome

Iconic fonts in PyQt and PySide applications
https://qtawesome.readthedocs.io/en/latest/index.html
MIT License
797 stars 105 forks source link

"setup.py install" has been deprecated in setuptools #200

Open kumattau opened 2 years ago

kumattau commented 2 years ago

from: https://github.com/spyder-ide/qtawesome/pull/199#issuecomment-1000848847

"setup.py install" has been deprecated in setuptools 58.3.0 (05 Nov 2021).

pypa/setuptools@fc5c308#diff-d9f946e5d366d670898f9cfaa80a8f892853686b6533a07c40ba9e9d4ee0e862

but, qtawesome imports setuptools.command.install in setup.py

https://github.com/spyder-ide/qtawesome/blob/a31fa284c6cd038c5fa9b36a1ca1a56358615585/setup.py#L6

Maybe, we need to consider about "setup.py install" and "setuptools.command.install".

dalthviz commented 2 years ago

I think the work done on QtPy could be useful as guide here: https://github.com/spyder-ide/qtpy/pull/272

dalthviz commented 1 year ago

Seems like there a deprecation warning appeared when building the package distribution (probably since I updated setuptools to release v1.2.2 or maybe it was happening before but I didn't see it):

SetuptoolsDeprecationWarning:     Installing 'qtawesome.fonts' as data is deprecated, please list it in `packages`.
    !!

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

    'qtawesome.fonts' 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 'qtawesome.fonts' 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.

More info about that at https://github.com/pypa/setuptools/issues/3340