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

Migrate setup.cfg to pyproject.toml #354

Merged
merged 4 commits into from
Sep 4, 2022
Merged

Migrate setup.cfg to pyproject.toml #354

merged 4 commits into from
Sep 4, 2022

Conversation

hugovk
Copy link
Owner

@hugovk hugovk commented Sep 4, 2022

With help from https://github.com/abravalheri/ini2toml/:

ini2toml setup.cfg -p setup.cfg -o pyproject.toml

But note abravalheri/ini2toml#50.

Flake8 doesn't support pyproject.toml so move its config to .flake8, and delete setup.cfg.

Also still needed setup_requires=["setuptools_scm"], in setup.py, because otherwise Python 3.7-3.9 (but not 3.10-3.11) failed on the CI:

error: error in 'egg_base' option: 'src' does not exist or is not a directory
Details
================================== log start ===================================
Processing ./.tox/.tmp/package/1/UNKNOWN-0.0.0.zip
  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
  ╰─> [4 lines of output]
      running egg_info
      /tmp/pip-build-env-jofklcr1/overlay/lib/python3.7/site-packages/setuptools/config/pyprojecttoml.py:108: _BetaConfiguration: Support for `[tool.setuptools]` in `pyproject.toml` is still *beta*.
        warnings.warn(msg, _BetaConfiguration)
      error: error in 'egg_base' option: 'src' does not exist or is not a directory
      [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.

note: This error originates from a subprocess, and is likely not a problem with pip.

=================================== log end ====================================

And https://github.com/pypa/setuptools_scm#pyprojecttoml-usage says:

Many tools, especially those that invoke setup.py for any reason, may
continue to rely on setup_requires. For maximum compatibility
with those uses, consider also including a setup_requires directive
(described below in setup.py usage and setup.cfg).

@hugovk hugovk added the changelog: Changed For changes in existing functionality label Sep 4, 2022
@codecov
Copy link

codecov bot commented Sep 4, 2022

Codecov Report

Merging #354 (412f907) into main (a89adec) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #354   +/-   ##
=======================================
  Coverage   99.48%   99.48%           
=======================================
  Files           8        8           
  Lines         777      777           
=======================================
  Hits          773      773           
  Misses          4        4           
Flag Coverage Δ
macos-latest 99.48% <ø> (ø)
ubuntu-latest 99.48% <ø> (ø)
windows-latest 99.48% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@hugovk hugovk merged commit a806ede into main Sep 4, 2022
@hugovk hugovk deleted the update-config branch September 4, 2022 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: Changed For changes in existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant