Skip to content

Updated license syntax breaks install #151

@devosb

Description

@devosb

The changes to the license specification in #149 cause the package to not install. Running

python3 -m pip install --user .

results in

Processing /home/bobby/builds/odfpy
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/bobby/builds/odfpy/setup.py", line 66
          license-files = ["GPL-LICENSE-2.txt", "APACHE-LICENSE-2.0.txt"],
          ^^^^^^^^^^^^^^^
      SyntaxError: expression cannot contain assignment, perhaps you meant "=="?
      [end of output]

This is on Ubuntu 24.04 amd64 with Python 3.12.3. I see that licenses classifiers are deprecated, but some of the documentation that is linked to is for pyproject.toml. This project is not using pyproject.toml, instead the changes were made to setup.py. Opening the package in VS Code shows

Image

I wonder if setuptools does not understand the new license-files keyword.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions