.whl file generated by build doesn't include information about dependencies

Viewed 545

I'm trying to create a Python package. I have a setup.cfg which contains this section:

install_requires =
    pyo>=1.0.4
    pywebview>=3.4
    strictyaml>=1.4.4

When I run python3 -m build in the project directory, I get a dist/mypackage.whl as expected. When I switch to another virtual environment to test installing it with pip install mypackage.whl, that works too; however, it doesn't install the dependencies. In fact, the dependencies aren't mentioned in the .whl file at all, as I tested this using

unzip -c mypackage.whl 'mypackage.dist-info/*' | grep pyo

which didn't bring anything up.

Is dependency information even supposed to be included in a wheel? This SO post would suggest so. If not, is this what requirements.txt is for?

Edit: Here's my full setup.cfg and packages version info:

[metadata]
name = mypackage
version = 0.1
author = David Husz
long_description = file: README.md
long_description_content_type = text/markdown
install_requires =
    pyo>=1.0.4
    pywebview>=3.4
    strictyaml>=1.4.4
classifiers =
    Programming Language :: Python :: 3
    Operating System :: OS Independent

[options]
package_dir =
    = src
packages = find:
include_package_data = True
python_requires = >=3.6

[options.packages.find]
where = src

My setuptools version is 57.4.0, and my build version is 0.5.1.

1 Answers
Related