uap-python icon indicating copy to clipboard operation
uap-python copied to clipboard

Update packaging to *bleeding edge*

Open masklinn opened this issue 3 years ago • 1 comments

That may or may not be a bad idea, but it at least sounds pretty interesting.

Basic resources:

  • https://packaging.python.org/en/latest/tutorials/packaging-projects/
  • https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/
  • https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html

The biggest issue with this plan is without a doubt the precompilation of yaml to regex. In the brave new world of pyproject.toml this apparently has to be done via custom build systems.

Additional:

  • Hynek's Testing & Packaging, strongly recommends moving the code to src/ in order to ensure what's tested is what will be installed, also provides help with setting up multi-version coverage (though there's almost no version-specific codepaths in uap, and of course coverage currently isn't set up; could be useful for yaml but that'll probably become just a data loader per #116)

Various:

  • flit seems to explicitely self-deselect:

    If your package needs a build step, you won’t be able to use Flit. Setuptools is the de-facto standard, but newer tools such as Enscons also cover this case.

masklinn avatar May 05 '22 15:05 masklinn

  • managing artifacts using raw PEP 517 builders seems ill defined and quite unclear / ill-defined / non-standard, it looks like a pluggable frontend like Hatch might be a better idea
  • hatch does support package-local plugins, it calls them "custom"
  • hatch has existing plugins with a similar role (e.g. cython) which should serve as inspiration

masklinn avatar Aug 27 '22 11:08 masklinn

Resolved by #148, kept to using setuptools but switched over to pyproject.toml and modernised the way setuptools is used a lot.

masklinn avatar Apr 30 '23 12:04 masklinn