miurahr / pyppmd

pyppmd provides classes and functions for compressing and decompressing text data, using PPM (Prediction by partial matching) compression algorithm variation H and I.2. It provide an API similar to Python's zlib/bz2/lzma modules.
https://pyppmd.readthedocs.io/en/latest/
GNU Lesser General Public License v2.1
8 stars 3 forks source link

build failure on macOS #94

Closed christian-rauch closed 2 years ago

christian-rauch commented 2 years ago

Describe the bug Installing pyppmd via pip fails with:

ValueError: invalid pyproject.toml config: `project`

To Reproduce I can only reproduce this via the macos-latest runner on GitHub Actions. It works without issues on Linux and Windows, in the GitHub Actions CI and locally.

Expected behavior Installation should not fail.

Environment (please complete the following information):

Additional context

Full log of error in the CI: pyppmd_pip_error.txt

miurahr commented 2 years ago

Is it what you want to report?

       configuration error: `project` must contain ['name'] properties
ChristopherHammond13 commented 2 years ago

It looks like the pypoetry.toml file is filled out enough that pip will validate it on installation. This means it has to be compliant with PEP 621.

The following extra attributes on the toml file should make it compliant:

EDIT: If it is useful:

miurahr commented 2 years ago

Thank you for detailed report. I can reproduce the issue and commit a fix.

ChristopherHammond13 commented 2 years ago

Excellent! Thank you so much @miurahr for fixing this so quickly :) Can confirm that version 0.18.1 installs fine on macOS with Poetry now

christian-rauch commented 2 years ago

Thanks for the quick fix.

Does anyone have an idea why this issue only appears on macOS and not on Linux and Windows?

christian-rauch commented 2 years ago

@miurahr Could you also backport the fix to the 0.17 version as 0.17.5? This would make my CI script work again.

miurahr commented 2 years ago

The issue is raised on all platforms. Newer version of pip starts supporting pep721 and then bad configuration is found.

miurahr commented 2 years ago

I'd like to recommend you to use v0.18.x because v0.17.x has a serious bug.

christian-rauch commented 2 years ago

I'd like to recommend you to use v0.18.x because v0.17.x has a serious bug.

I don't have control over this. pyppmd is installed as dependency of py7zr, and this explicitly requests versions 0.17.x: https://github.com/miurahr/py7zr/blob/v0.18.1/setup.cfg#L46

Alternatively to backporting the fix to pyppmd 0.17.5, you could also release a py7zr 0.18.2 or 0.19.0 that uses pyppmd >= 0.18.0.

miurahr commented 2 years ago

I don't have control over this. pyppmd is installed as dependency of py7zr, and this explicitly requests versions 0.17.x: https://github.com/miurahr/py7zr/blob/v0.18.1/setup.cfg#L46

Oh, next py7zr release goes to v0.18.x and now working it. Thanks for your patients, pls. wait for a bit.

miurahr commented 2 years ago

py7zr v0.18.3 out with pyppmd@0.18.1

christian-rauch commented 2 years ago

py7zr v0.18.3 out with pyppmd@0.18.1

Thanks. My CI pipeline runs again.

ChristopherHammond13 commented 2 years ago

Weirdly, I'm seeing a slightly different version of this error again with 0.18.1.

    │ exit code: 1
    ╰─> [110 lines of output]
        /private/var/folders/cq/wzjp61p545n24_131yqnd5yh0000gn/T/pip-build-env-kfb4rqy8/overlay/lib/python3.10/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.
        configuration error: `project` must contain ['version'] properties
        DESCRIPTION:
            version should be statically defined in the ``version`` field

It looks like we are also missing the version field.

miurahr commented 2 years ago

pyppmd put version automatically from git tag using setuptools_scm. so added dynamic = ["version"]