Closed vkottler closed 2 years ago
This is probably the next thing to do, because some tree re-balancing to un-block #19 is probably next up
(with the idea being - we want to update the package template to not require vmklib to build?)
https://setuptools.pypa.io/en/latest/userguide/declarative_config.html
not clear if the setup.cfg way of doing it is better?
packaging docs definitely say to use setup.cfg: https://packaging.python.org/en/latest/tutorials/packaging-projects/#configuring-metadata
Since we have a lot of baked in assumptions about this in the current Python configs, we should take a fresh approach and maybe re-organize the configuration data (maybe even do https://github.com/vkottler/datazen/issues/58, too)
pyproject.toml
schema: https://peps.python.org/pep-0621/#specification (minimal JSON schema? https://github.com/vkottler/datazen/issues/58#issuecomment-1079621249)
setup.cfg
schema (I think?): https://setuptools.pypa.io/en/latest/userguide/declarative_config.html
Unclear which if these could be datazen "compile" outputs, or if they should be templatized
Getting this warning during build:
/tmp/build-env-g_1tp__1/lib/python3.8/site-packages/setuptools/config/pyprojecttoml.py:103: _ExperimentalProjectMetadata: Support for project metadata in `pyproject.toml` is still experimental and may be removed (or change) in future releases.
warnings.warn(msg, _ExperimentalProjectMetadata)
Install ``trove-classifiers`` to ensure proper validation. Meanwhile a list of classifiers will be downloaded from PyPI.
/tmp/build-env-g_1tp__1/lib/python3.8/site-packages/setuptools/config/_apply_pyprojecttoml.py:93: _WouldIgnoreField: !!
##########################################################################
# configuration would be ignored/result in error due to `pyproject.toml` #
##########################################################################
The following seems to be defined outside of `pyproject.toml`:
`entry-points = {'console_scripts': ['mk=vmklib.entry:main']}`
According to the spec (see the link bellow), however, setuptools CANNOT
consider this value unless 'entry-points' is listed as `dynamic`.
https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
For the time being, `setuptools` will still consider the given value (as a
**transitional** measure), but please note that future releases of setuptools will
follow strictly the standard.
To prevent this warning, you can list 'entry-points' under `dynamic` or alternatively
remove the `[project]` table from your file and rely entirely on other means of
configuration.
!!
warnings.warn(msg, _WouldIgnoreField)
Per this comment, we could try to generate the project toml, but honestly it might not be worth it
So far trying to write a setup.cfg
is kind of a disaster. We should just wait for setuptools
to actually read metadata from pyproject.toml
. Right now it doesn't read everything
Okay, so setuptools is a complete shit show. Relying on setup
code for now is fine, we invested a decent amount into just making it not suck. There's no great reason to go back on it. We should just work on https://github.com/vkottler/vmklib/issues/22
See discussion on https://github.com/vkottler/vmklib/issues/7.