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

'poetry build' error #39

Closed
noptrix opened this issue Dec 15, 2021 · 2 comments
Closed

'poetry build' error #39

noptrix opened this issue Dec 15, 2021 · 2 comments

Comments

@noptrix
Copy link

noptrix commented Dec 15, 2021

Hi @renatahodovan!

I'm facing the following error when trying to run poetry build in the root dir of grammarinator:

==> Starting build()...

  PyProjectException

  [tool.poetry] section not found in /home/noptrix/blackarch/repos/blackarch/packages/grammarinator/src/grammarinator/pyproject.toml

  at /usr/lib/python3.10/site-packages/poetry/core/pyproject/toml.py:56 in poetry_config
      52│     def poetry_config(self):  # type: () -> Optional[TOMLDocument]
      53│         if self._poetry_config is None:
      54│             self._poetry_config = self.data.get("tool", {}).get("poetry")
      55│             if self._poetry_config is None:
    → 56│                 raise PyProjectException(
      57│                     "[tool.poetry] section not found in {}".format(self._file)
      58│                 )
      59│         return self._poetry_config
      60│ 
==> ERROR: A failure occurred in build().
    Aborting...

Any ideas here? Here is the PKGBUILD to build grammarinator under ArchLinux.

@noptrix noptrix changed the title poetry build error 'poetry build' error Dec 15, 2021
@renatahodovan
Copy link
Owner

Hi @noptrix !

Thanks for the report! The reason of the error is that Grammarinator is not prepared for poetry builds. Technically, the pyproject.toml file lacks of the [tool.poetry] section. I'm not familiar with poetry yet, but if I'm not wrong, it's used to create a dist package. If this is the case, then why don't you use python build to do the same? Link

In this case, you should replace poetry build with python3 -m build (and maybe another command to ensure that PyPA build is installed: python3 -m pip install --upgrade build)

Cheers,
Reni

@noptrix
Copy link
Author

noptrix commented Dec 22, 2021

ACK. will try via PyPA. thank you! feel free, to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants