question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pyproject.toml not working

See original GitHub issue

The problem

Settings in pyproject.toml are not loaded:

error: No option 'version_variable' in section: 'semantic_release'

Expected behavior

Settings are loaded from pyproject.toml if it exists.

Additional context

The problematic repo doesn’t have a setup.cfg file at all.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
lcnittlcommented, Sep 21, 2020

For the use in pyproject.toml, you have to use the [tool.semantic_release] section (tool prepended).

Hope this helps!

1reaction
ygworldrcommented, Nov 26, 2020

The toml file is badly formatted. These are the correct changes:

version_source = "tag"
check_build_status = true
branch = "main"
changelog_file = "CHANGELOG.md"

The parsing fails but the errors are not reported. In settings.py, line 70 has a call to logger.debug which never appears on screen since logger is a <Logger semantic_release.settings (WARNING)> so anything below warning gets ignored. The code should read:

    except toml.TomlDecodeError as err:
        logger.error("Could not decode pyproject.toml: %s", err)
        return {}

Do you want me to create a PR for those chances or are they trivial enough?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Package with pyproject.toml cannot be installed with ... - GitHub
Problem description. I have created an example project as explained in Packaging Python Projects with the following pyproject.toml file:.
Read more >
pyproject.toml won't find project name with setuptools python
It seems that you are trying to write a PEP 621-style pyproject.toml with the setuptools build back-end. But, as of now, setuptools does...
Read more >
Problems using pyproject.toml : r/learnpython - Reddit
I'm trying to use pyproject.toml file instead of setup.py and setup.cfg for a simple project. I scrolling through the internet and documentation ...
Read more >
Pip not picking up build requirements from pyproject.toml
I'm trying to force my users to have to install wheel when they try to install my project for local development. However, it...
Read more >
preparing metadata (pyproject.toml) did not run successfully. â ...
To solve the "Preparing metadata (pyproject.toml) did not run successfully" error: Make sure your Python version is supported by the package. Upgrade your ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found