Closed geaaru closed 1 week ago
>>> Compiling source in /var/tmp/portage/dev-python/docker-py-7.1.0/work/docker-py-7.1.0 ...
* python3_9: running distutils-r1_run_phase distutils-r1_python_compile
python3.9 setup.py build -j 8
/usr/lib/python3.9/site-packages/_distutils_hack/__init__.py:55: UserWarning: Reliance on distutils from stdlib is deprecated. Users must rely on setuptools to provide the distutils module. Avoid importing distutils or import setuptools first, and avoid setting SETUPTOOLS_USE_DISTUTILS=stdlib. Register concerns at https://github.com/pypa/setuptools/issues/new?template=distutils-deprecation.yml
warnings.warn(
configuration error: `project.license` must be valid exactly by one definition (2 matches found):
- keys:
'file': {type: string}
required: ['file']
- keys:
'text': {type: string}
required: ['text']
DESCRIPTION:
`Project license <https://peps.python.org/pep-0621/#license>`_.
GIVEN VALUE:
"Apache-2.0"
OFFENDING RULE: 'oneOf'
DEFINITION:
{
"oneOf": [
{
"properties": {
"file": {
"type": "string",
"$$description": [
"Relative path to the file (UTF-8) which contains the license for the",
"project."
]
}
},
"required": [
"file"
]
},
{
"properties": {
"text": {
"type": "string",
"$$description": [
"The license of the project whose meaning is that of the",
"`License field from the core metadata",
"<https://packaging.python.org/specifications/core-metadata/#license>`_."
]
}
},
"required": [
"text"
]
}
]
}
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/docker-py-7.1.0/work/docker-py-7.1.0/setup.py", line 4, in <module>
setuptools.setup()
I think that could be similar to this: https://github.com/geaaru/geaaru_overlay/blob/funtoo/dev-python/autogen.yaml#L75
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) dev-python/docker-py-7.1.0::python-modules-kit
>>> Installing (1 of 1) dev-python/docker-py-7.1.0::python-modules-kit
>>> Recording dev-python/docker-py in "world" favorites file...
>>> Jobs: 1 of 1 complete Load avg: 0.49, 0.14, 0.14
>>> Auto-cleaning packages...
This is the fix:
#sed -i -e 's:socket[.]gethostname():"localhost":' tests/unit/api_test.py || die
sed -i -e 's|^license =.*|license = {text = "Apache-2.0"}|g' pyproject.toml
The
sed
is no more needed. If I drop the sed line, I catch another issue that I already patched in another package. But I don't remember what the package was :).