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.

Deterministic installations from packages

See original GitHub issue
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

Hi y’all,

I built a simple application that I would like to package, so that when deployed (in my case installed into a Docker image) I don’t have to manually copy source files into the file system, but can rely on the package manager to handle standard compliant placement (scripts in $PATH, importable modules in $PYTHONPATH).

However, when packaging my code, the .lock file seems to be ignored (the same way setuptools would do), and the METADATA in the *.dist-info/ dir only list the direct dependencies specified in the project toml. This means that any installation not happening from the source, but from a derived wheel, will be non-deterministic, losing all associated benefits.

Since poetry already resolved and pinned the transitive dependencies of the project, I think it would be great if the build command could be instructed to replace the direct dependencies (which usually contain ranges of accepted versions) listed in the project toml with all the materialized pinned versions from the .lock file.

This way, easily distributable packages could still produce deterministic installations (obviously that would put the burden of avoiding version conflicts in the target environment through some means of isolation onto the consumer).

Thanks for considering and the sleek tool dtk

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
MokarromHossainTRcommented, Apr 20, 2022

+1 I’m having the same issue. It would be a great feature if poetry build command respects .lock file while writing dependency in the METADATA.

1reaction
gsemetcommented, Jul 1, 2022

I propose this as an option —frozen-wheel

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deterministic npm dependencies with Bazel
Determinism in a build system is the property that the outputs are identical for given input files. A build tool might embed a...
Read more >
Did "npm install" become deterministic in npm 7?
Short Answer: Yes! Longer Answer: Provided you have a package-lock.json or a yarn.lock file, both npm or yarn , respectively, ...
Read more >
Yarn determinism | Yarn Blog
Determinism in the context of JavaScript package management is defined as always getting the exact same node_modules folder given a package.json ...
Read more >
npm3 Non-Determinism | How npm Works - GitHub Pages
The npm install command, when used exclusively to install packages from a package.json , will always produce the same tree. This is because...
Read more >
Unraveling npm: Deterministic dependencies with Yarn
It keeps checksums so the installed package is guaranteed to be the same. Little things matter. I can't count the number of times...
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