pyatv icon indicating copy to clipboard operation
pyatv copied to clipboard

Modernize packaging

Open cdce8p opened this issue 7 months ago • 1 comments

  • Move static metadata to pyproject.toml
  • Adopt PEP 639 license expression https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license-and-license-files
  • Remove zip_safe. It's considered obsolete.
  • Remove platforms="any". It's basically unused at this point. The better option is the "Operating System :: OS Independent" classifier which is already present.
  • Remove explicit include_package_data=True. This is the default for pyproject.toml based configs in setuptools.
  • Remove setup_requires. This has been replaced by build-system.requires. Furthermore pytest-runner isn't required for the build itself.
  • Remove test_suite and tests_require. Running tests via setuptools has long been deprecated and isn't used here anyways.
  • Remove download_url. This can be obtained from PyPI and is unnecessary.
  • Replace python setup.py call with python -m build.
  • Remove tool.black.target-version. Black is able to infer that from project.requires-python.

Metadata diff

 ...
-Author: Pierre Ståhl
-Author-email: [email protected]
+Author-email: Pierre Ståhl <[email protected]>
-License: MIT
+License-Expression: MIT
-Home-page: https://pyatv.dev
-Download-URL: https://github.com/postlund/pyatv/archive/refs/tags/v0.16.0.zip
+Project-URL: Homepage, https://pyatv.dev
 ...
-Platform: any
 ...
-Classifier: License :: OSI Approved :: MIT License
 Classifier: Operating System :: OS Independent
 ...

cdce8p avatar Jul 13 '25 11:07 cdce8p

@postlund This is ready now as well.

cdce8p avatar Dec 12 '25 21:12 cdce8p