macaroni-os / mark-issues

Macaroni Automated Repositories Kit Issues
4 stars 1 forks source link

[python-modules-kit] `dev-python/docker-py-7.1.0` doesn't compile #102

Closed geaaru closed 1 week ago

geaaru commented 2 months ago
Calculating dependencies  .. .. .. ... .... done!
[ebuild  N     ] dev-python/docker-py-7.1.0::python-modules-kit  USE="-doc" PYTHON_TARGETS="python3_9 -python3_10 -python3_7 -python3_8" 116 KiB

Total: 1 package (1 new), Size of downloads: 116 KiB

!!! The following installed packages are masked:
- app-arch/rar-5.7.1_p20190427::core-kit (masked by: RAR license(s))
A copy of the 'RAR' license is located at '/var/git/meta-repo/kits/core-kit/licenses/RAR'.

- app-emulation/virtualbox-bin-7.0.20.163906::core-kit (masked by: PUEL license(s))
A copy of the 'PUEL' license is located at '/var/git/meta-repo/kits/core-kit/licenses/PUEL'.

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

>>> Verifying ebuild manifests
>>> Jobs: 0 of 1 complete, 1 running                Load avg: 1.25, 0.61, 0.32
>>> Emerging (1 of 1) dev-python/docker-py-7.1.0::python-modules-kit
>>> Jobs: 0 of 1 complete, 1 running                Load avg: 1.25, 0.61, 0.32
>>> Failed to emerge dev-python/docker-py-7.1.0, Log file:
>>> Jobs: 0 of 1 complete, 1 running                Load avg: 1.15, 0.60, 0.32
>>>  '/var/tmp/portage/dev-python/docker-py-7.1.0/temp/build.log'
>>> Jobs: 0 of 1 complete, 1 running                Load avg: 1.15, 0.60, 0.32
>>> Jobs: 0 of 1 complete, 1 running, 1 failed      Load avg: 1.15, 0.60, 0.32
>>> Jobs: 0 of 1 complete, 1 failed                 Load avg: 1.15, 0.60, 0.32

 * Package:    dev-python/docker-py-7.1.0
 * Repository: python-modules-kit
 * USE:        amd64 elibc_glibc kernel_linux python_targets_python3_9 userland_GNU
 * FEATURES:   preserve-libs userpriv
>>> Unpacking source...
>>> Unpacking docker-7.1.0.tar.gz to /var/tmp/portage/dev-python/docker-py-7.1.0/work
>>> Source unpacked in /var/tmp/portage/dev-python/docker-py-7.1.0/work
>>> Preparing source in /var/tmp/portage/dev-python/docker-py-7.1.0/work/docker-py-7.1.0 ...
sed: can't read tests/unit/api_test.py: No such file or directory
 * ERROR: dev-python/docker-py-7.1.0::python-modules-kit failed (prepare phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  93:  Called src_prepare
 *   environment, line 3627:  Called die
 * The specific snippet of code:
 *       sed -i -e 's:socket[.]gethostname():"localhost":' tests/unit/api_test.py || die;
 * 
 * If you need support, post the output of `emerge --info '=dev-python/docker-py-7.1.0::python-modules-kit'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/docker-py-7.1.0::python-modules-kit'`.
 * The complete build log is located at '/var/tmp/portage/dev-python/docker-py-7.1.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/docker-py-7.1.0/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-python/docker-py-7.1.0/work/docker-py-7.1.0'
 * S: '/var/tmp/portage/dev-python/docker-py-7.1.0/work/docker-py-7.1.0'
 * Messages for package dev-python/docker-py-7.1.0:
 * ERROR: dev-python/docker-py-7.1.0::python-modules-kit failed (prepare phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  93:  Called src_prepare
 *   environment, line 3627:  Called die
 * The specific snippet of code:
 *       sed -i -e 's:socket[.]gethostname():"localhost":' tests/unit/api_test.py || die;
 * 
 * If you need support, post the output of `emerge --info '=dev-python/docker-py-7.1.0::python-modules-kit'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/docker-py-7.1.0::python-modules-kit'`.
 * The complete build log is located at '/var/tmp/portage/dev-python/docker-py-7.1.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/docker-py-7.1.0/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-python/docker-py-7.1.0/work/docker-py-7.1.0'
 * S: '/var/tmp/portage/dev-python/docker-py-7.1.0/work/docker-py-7.1.0'

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 :).

geaaru commented 2 months 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()
geaaru commented 2 months ago

I think that could be similar to this: https://github.com/geaaru/geaaru_overlay/blob/funtoo/dev-python/autogen.yaml#L75

geaaru commented 2 months ago
>>> 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