Setuptools deprecation warning with setuptools-rust
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 680
- Forks
- 110
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 1
Description
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? 😄
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the RustExtension call in setup.py and the find: package-discovery configuration in setup.cfg, then reproduce the cryptography build warning. Determine whether setuptools-rust or the project configuration should expose cryptography.hazmat.bindings._rust as a package; done means the package is discovered without the deprecation warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100