In cryptography builds we have been getting this deprecation warning for a while:
setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning: Installing 'cryptography.hazmat.bindings._rust' as data is deprecated, please list it in `packages`.
############################
# Package would be ignored #
############################
Python recognizes 'cryptography.hazmat.bindings._rust' as an importable package,
but it is not listed in the `packages` configuration of setuptools.
'cryptography.hazmat.bindings._rust' 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 'cryptography.hazmat.bindings._rust' 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.
We declare cryptography.hazmat.bindings._rust as the target in our RustExtension call and then use the standard find: mechanisms in our setup.cfg. Is there something setuptools-rust needs to tell setuptools so that it auto-discovers this package without this warning? Or, quite possibly, something we need to do on our end because we've done something dumb? 😄
In
cryptographybuilds we have been getting this deprecation warning for a while:We declare
cryptography.hazmat.bindings._rustas the target in ourRustExtensioncall and then use the standardfind:mechanisms in our setup.cfg. Is there somethingsetuptools-rustneeds to tellsetuptoolsso that it auto-discovers this package without this warning? Or, quite possibly, something we need to do on our end because we've done something dumb? 😄