poetry
poetry copied to clipboard
Make "poetry check" also check the scripts
- [x] I have searched the issues of this repo and believe that this is not a duplicate.
- [x] I have searched the documentation and believe that my question is not covered.
Feature Request
Please check the scripts section
When I added the following pyproject.toml to my toy project mpu:
[tool.poetry]
name = "mpu"
version = "0.1.0"
description = ""
authors = ["Martin Thoma <[email protected]>"]
license = "MIT"
[tool.poetry.dependencies]
python = "^3.8"
awscli = "^1.18.172"
pydantic = "^1.7.2"
click = "^7.1.2"
numpy = "^1.19.4"
scipy = "^1.5.4"
pandas = "^1.1.4"
typing-extensions = "^3.7.4"
[tool.poetry.dev-dependencies]
[tool.poetry.scripts]
poetry = "mpu.cli:entry_point"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Please note that mpu.cli does not exist, but I still get:
poetry install
Creating virtualenv mpus-d5ZJE7ws-py3.8 in /home/moose/.cache/pypoetry/virtualenvs
Installing dependencies from lock file
Package operations: 19 installs, 0 updates, 0 removals
• Installing six (1.15.0)
• Installing jmespath (0.10.0)
• Installing python-dateutil (2.8.1)
• Installing urllib3 (1.25.11)
• Installing botocore (1.19.12)
• Installing pyasn1 (0.4.8)
• Installing colorama (0.4.3)
• Installing docutils (0.15.2)
• Installing numpy (1.19.4)
• Installing pytz (2020.4)
• Installing pyyaml (5.3.1)
• Installing rsa (4.5)
• Installing s3transfer (0.3.3)
• Installing awscli (1.18.172)
• Installing click (7.1.2)
• Installing pandas (1.1.4)
• Installing pydantic (1.7.2)
• Installing scipy (1.5.4)
• Installing typing-extensions (3.7.4.3)
This looks as if everything is fine, but when I try to run it, I get:
$ poetry run mpu
FileNotFoundError
[Errno 2] No such file or directory
at ~/.pyenv/versions/3.8.5/lib/python3.8/os.py:601 in _execvpe
597│ path_list = map(fsencode, path_list)
598│ for dir in path_list:
599│ fullname = path.join(dir, file)
600│ try:
→ 601│ exec_func(fullname, *argrest)
602│ except (FileNotFoundError, NotADirectoryError) as e:
603│ last_exc = e
604│ except OSError as e:
605│ last_exc = e
Same for poetry check:
poetry check
All set!
I also getting this error after renaming the parent dir of my project.
Try to run again:
poetry install
This worked for me.