JRubics / poetry-publish

An action to build and publish python package to pypi (https://pypi.org/) using poetry (https://github.com/sdispater/poetry)
BSD 3-Clause "New" or "Revised" License
137 stars 17 forks source link

Poetry can't find toml file while running 'poetry init' #51

Closed jimdibb closed 7 months ago

jimdibb commented 7 months ago

Poetry 1.7.0, python 3.10.12

I'm running 'poetry init' in a directory where I have a small project. I enter all the info and when I get to the point about adding dependencies, it can't find a file. Isn't it supposed to be creating the file?

...
Compatible Python versions [^3.10]:

Would you like to define your main dependencies interactively? (yes/no) [yes]
You can specify a package in the following forms:
  - A single name (requests): this will search for matches on PyPI
  - A name and a constraint (requests@^2.23.0)
  - A git url (git+https://github.com/python-poetry/poetry.git)
  - A git url with a revision (git+https://github.com/python-poetry/poetry.git#develop)
  - A file path (../my-package/my-package.whl)
  - A directory (../my-package/)
  - A url (https://example.com/packages/my-package-0.1.0.tar.gz)

Package to add or search for (leave blank to skip): ssl

Poetry could not find a pyproject.toml file in /home/myname/myproject or its parents

If I create an empty file, it tells me the section is there.

dibbj@W11G92LDK3:~/jira_est_scanner$ touch pyproject.toml
dibbj@W11G92LDK3:~/jira_est_scanner$ poetry init

This command will guide you through creating your pyproject.toml config.

Package name [jira_est_scanner]:
Version [0.1.0]:
Description []:
Author [Jim Dibb <jim.dibb@dell.com>, n to skip]:
License []:
Compatible Python versions [^3.10]:

Would you like to define your main dependencies interactively? (yes/no) [yes]
You can specify a package in the following forms:
  - A single name (requests): this will search for matches on PyPI
  - A name and a constraint (requests@^2.23.0)
  - A git url (git+https://github.com/python-poetry/poetry.git)
  - A git url with a revision (git+https://github.com/python-poetry/poetry.git#develop)
  - A file path (../my-package/my-package.whl)
  - A directory (../my-package/)
  - A url (https://example.com/packages/my-package-0.1.0.tar.gz)

Package to add or search for (leave blank to skip): ssl

[tool.poetry] section not found in /home/dibbj/jira_est_scanner/pyproject.toml
jimdibb commented 7 months ago

Sorry, I realize I'm in the wrong project. Cheers