etiennedub / pyk4a

Python 3 wrapper for Azure-Kinect-Sensor-SDK
MIT License
287 stars 81 forks source link

Fix setup.cfg metadata. #195

Closed jsirois closed 1 year ago

jsirois commented 1 year ago

The 67.0.0 release of setuptools upgraded its vendored packaging to 23.0 and that release has improved, more strict version parsing code. That code errors out parsing python_version >= "3.4" from the install_requires metadata. Although that can be fixed by removing the quotes around the version, that metdata is in the wrong place. Fix this by specifying python_requires metdata correctly.

Fixes #194

jsirois commented 1 year ago

Ok, with the last commit this now works. I tested in an Ubuntu 18.04 image with the necessary lib4ka-dev installed and found:

root@1826707bd8c2:/code# ./test.venv/bin/pip wheel --no-deps .
Processing /code
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyk4a
  Building wheel for pyk4a (pyproject.toml) ... done
  Created wheel for pyk4a: filename=pyk4a-1.4.0-cp310-cp310-linux_x86_64.whl size=82058 sha256=5ce912398c6e8d74cea2d66a7dcdd0c5c4b1f243646f0447329e4620e3d322be
  Stored in directory: /tmp/pip-ephem-wheel-cache-islqs6bx/wheels/c8/64/08/e026f3d5be40e9ececf6c71de65048e3dd3b481d27c2173832
Successfully built pyk4a

[notice] A new release of pip available: 22.3.1 -> 23.0
[notice] To update, run: /code/test.venv/bin/python3.10 -m pip install --upgrade pip
root@1826707bd8c2:/code# unzip -qc pyk4a-1.4.0-cp310-cp310-linux_x86_64.whl pyk4a-1.4.0.dist-info/METADATA | grep Requires
Requires-Python: >=3.4
Requires-Dist: numpy
root@1826707bd8c2:/code#
lpasselin commented 1 year ago

Same as https://github.com/etiennedub/pyk4a/pull/193

Do you know if your change is backward compatible with older versions of setuptools?

codecov[bot] commented 1 year ago

Codecov Report

Merging #195 (2cfa906) into master (2791f6e) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #195   +/-   ##
=======================================
  Coverage   81.38%   81.38%           
=======================================
  Files          12       12           
  Lines         768      768           
=======================================
  Hits          625      625           
  Misses        143      143           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

lpasselin commented 1 year ago

Will fix here since we need to merge in develop branch https://github.com/etiennedub/pyk4a/pull/196

Thanks for the PR!

jsirois commented 1 year ago

@lpasselin according to https://setuptools.pypa.io/en/latest/userguide/declarative_config.html#options this is compatible back to 34.4.0 which is ~6 years old: https://pypi.org/project/setuptools/34.4.0/