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.

poetry install with build script fails on 1.2.0

See original GitHub issue
❯ poetry --version
Poetry (version 1.2.0a2)

I am trying to run poetry install. This configuration works on 1.1.12

# pyproject.toml
[tool.poetry]
name = "test"
version = "0.1.0"
description = ""
authors = ["Matteo Santamaria <XXX@gmail.com>"]
readme = "README.md"
build = "build.py"

[tool.poetry.dependencies]
python = "3.8"

[tool.poetry.dev-dependencies]
numpy = "^1.22.0"

[build-system]
requires = ["poetry-core", "numpy>=1.22.0,<=1.23.0"] 
build-backend = "poetry.core.masonry.api"
# build.py
import numpy as np

def build(setup_kwargs):
    return setup_kwargs

but fails on 1.2.0a2.

Tested on macOS Monterey Version 12.0.1 Apple M1 Pro

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
abncommented, May 11, 2022

Reopening this as the issue exists when a setup.py file was generated forcefully. Do note that build scripts are still an experimental feature and breakages can occur.

#5590 should fix the reported issue. Additionally, #5401 should improve the experience when generate-setup-file = false.

0reactions
neersightedcommented, Sep 9, 2022

You should set environmental variables in a Dockerfile using the ENV directive.

RUN curl -sSL https://install.python-poetry.org/ | python3 - --version 1.2.0
ENV PATH="$HOME/.local/bin:$PATH"
RUN poetry --version

Please do not turn off virtualenv creation – you are likely to run into way more problems for no benefit. The ability to turn off virtualenv creation was intended as a “I know what I am doing” feature for very advanced users – if you don’t know why you need it off, you do not need it off – see #6398 for a roundup issue on this topic.

Finally, please don’t use this solved issue for support – you are sending notifications to everyone who has participated in it for something that is off-topic. Please start a Discussion on the discussion tab, or join the Discord server if you need support from the community.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Announcing Poetry 1.2.0 | Blog
The get-poetry.py script is frozen, but will be available in Poetry's repository for at least one more minor release. However, the new installer ......
Read more >
Announcing Poetry 1.2.0 -- Python dependency management ...
The issue isn't poetry 1.2 itself, it's that the old install script is now going to be dead. It's an infrastructure change, not...
Read more >
All my poetry commands fail with 'The Poetry config is invalid'
A multi-line string is not valid for the description field. The error message does not match '^[^\n]*$' is telling you that it is...
Read more >
poetry - PyPI
Poetry : Python packaging and dependency management made easy ... Poetry supports multiple installation methods, including a simple script found at ...
Read more >
Dependency Management With Python Poetry
Even worse, external packages often rely on specific Python versions. Consequently, a user installing your package might get an error because ...
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