Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix setup.cfg description_file #165

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

jusdino
Copy link

@jusdino jusdino commented Mar 24, 2025

setup.cfg is using a long-deprecated field name, which now does not build with the latest version of setuptools. This PR updates the field name to its currently-supported equivalent:

Collecting authorizenet==1.1.5 (from -r requirements.txt (line 7))
  Downloading authorizenet-1.1.5.tar.gz (158 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      Traceback (most recent call last):
        File "/usr/app/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
          main()
        File "/usr/app/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/app/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-scnu31m8/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-scnu31m8/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-scnu31m8/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 522, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-scnu31m8/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 320, in run_setup
          exec(code, locals())
        File "<string>", line 14, in <module>
        File "/tmp/pip-build-env-scnu31m8/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 116, in setup
          _install_setup_requires(attrs)
        File "/tmp/pip-build-env-scnu31m8/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 87, in _install_setup_requires
          dist.parse_config_files(ignore_option_errors=True)
        File "/tmp/pip-build-env-scnu31m8/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 730, in parse_config_files
          self._parse_config_files(filenames=inifiles)
        File "/tmp/pip-build-env-scnu31m8/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 599, in _parse_config_files
          opt = self._enforce_underscore(opt, section)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-scnu31m8/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 629, in _enforce_underscore
          raise InvalidConfigError(
      setuptools.errors.InvalidConfigError: Invalid dash-separated key 'description-file' in 'metadata' (setup.cfg), please use the underscore name 'description_file' instead.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

Closes #166

@landonshumway-ia
Copy link

@gnongsie Can you please review this and get it pulled in? This is blocking all of our local development and CICD pipeline deployments. Thank you.

@noelleleigh
Copy link

Specifically, it's setuptools v78.0.0, which says in its changelog:

Setuptools no longer accepts options containing uppercase or dash characters in setup.cfg. Please ensure to write the options in setup.cfg using the lower_snake_case convention (e.g. Name => name, install-requires => install_requires). This is a follow-up on deprecations introduced in v54.1.0 (see #1608) and v54.1.1 (see #2592).

@nosikolga
Copy link

I have same issue, would be grateful if this issue is fixed.

@TakumiHendricksDev
Copy link

We are trying to get authorize working on our end, we would appreciate having this merged.

@noelleleigh
Copy link

Yesterday setuptools v78.0.2 was released which reverted the compatibility change from v78.0.0:

Postponed removals of deprecated dash-separated and uppercase fields in setup.cfg. All packages with deprecated configurations are advised to move before 2026. (#4911)

@jusdino
Copy link
Author

jusdino commented Apr 3, 2025

Interesting development from the setuptools maintainers: It turns out that description_file is also not a supported field, but a bug in setuptools was letting it pass:
pypa/setuptools#4911 (comment)

pypa/setuptools#4913

The right way may actually be to open() the file an read the data into long_description instead.

@jusdino jusdino changed the base branch from master to future-tcs April 3, 2025 17:16
@jusdino jusdino changed the base branch from future-tcs to master April 3, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

authorizenet lib is incompatible with setuptools >=78
5 participants