stocky-helmet-22655
12/07/2022, 5:12 PMpipenv install
it works fine but when I run ./pants generate-lockfiles
it claims numpy cannot be foundenough-analyst-54434
12/07/2022, 5:13 PMenough-analyst-54434
12/07/2022, 5:14 PMenough-analyst-54434
12/07/2022, 5:14 PMenough-analyst-54434
12/07/2022, 5:16 PM[python]
interpreter_constraints = "==3.7.*"
stocky-helmet-22655
12/07/2022, 5:16 PMenough-analyst-54434
12/07/2022, 5:16 PMenough-analyst-54434
12/07/2022, 5:16 PMenough-analyst-54434
12/07/2022, 5:17 PMstocky-helmet-22655
12/07/2022, 5:17 PMstocky-helmet-22655
12/07/2022, 5:17 PMenough-analyst-54434
12/07/2022, 5:17 PMenough-analyst-54434
12/07/2022, 5:18 PMstocky-helmet-22655
12/07/2022, 5:18 PMstocky-helmet-22655
12/07/2022, 5:18 PMstocky-helmet-22655
12/07/2022, 5:18 PMenough-analyst-54434
12/07/2022, 5:19 PMenough-analyst-54434
12/07/2022, 5:20 PMstocky-helmet-22655
12/07/2022, 5:21 PMenough-analyst-54434
12/07/2022, 5:21 PMstocky-helmet-22655
12/07/2022, 5:24 PMenough-analyst-54434
12/07/2022, 5:34 PM$ git diff
diff --git a/pants.toml b/pants.toml
index f343697..893d76f 100644
--- a/pants.toml
+++ b/pants.toml
@@ -8,6 +8,7 @@ backend_packages = [
# This will become the default in Pants 2.15.
tailor_pex_binary_targets = false
enable_resolves = true
+#interpreter_constraints = "==3.7.*"
[anonymous-telemetry]
enabled = true
@@ -15,3 +16,6 @@ repo_id = "ED3CCABC-6067-47DD-A959-353BC3F02836"
[python.resolves]
My_Resolve = "3rdparty/python/my_resolve.lock"
+
+[python.resolves_to_interpreter_constraints]
+My_Resolve = ["==3.7.*"]
enough-analyst-54434
12/07/2022, 5:36 PM-ldebug
I see ... "--interpreter-constraint", "CPython<4,>=3.7", ...
in the output - IOW Pants picks the default ICs it ships with and not the global ICs you define. Seems like either an implementation bug or victory by declaring docs buggy and fixing those.enough-analyst-54434
12/07/2022, 5:36 PMstocky-helmet-22655
12/07/2022, 5:46 PMpipenv install
works but ./pants generate-lockfiles
failsstocky-helmet-22655
12/07/2022, 5:48 PMstocky-helmet-22655
12/07/2022, 6:29 PMenough-analyst-54434
12/07/2022, 6:29 PM>=3.7.1
and them saying, like you, ==3.7.*
enough-analyst-54434
12/07/2022, 6:30 PMenough-analyst-54434
12/07/2022, 6:30 PMenough-analyst-54434
12/07/2022, 6:30 PMenough-analyst-54434
12/07/2022, 6:31 PMenough-analyst-54434
12/07/2022, 6:32 PMenough-analyst-54434
12/07/2022, 6:33 PM>=3.7.1
enough-analyst-54434
12/07/2022, 6:33 PMenough-analyst-54434
12/07/2022, 6:34 PMenough-analyst-54434
12/07/2022, 6:35 PMenough-analyst-54434
12/07/2022, 6:36 PMenough-analyst-54434
12/07/2022, 6:37 PMstocky-helmet-22655
12/07/2022, 7:08 PMSo the 1st check is does the failing thing have a more specific Python requirement than you? We’ve had folks get stomped on the package wanting, say,and them saying, like you,>=3.7.1
==3.7.*
can you confirm this is the issue with this last one?I can confirm that setting a more specific version does fix the issue, if that’s what you’re asking.
It wants>=3.7.1
Pex will keep you honest.Ahhhh, that makes sense I think. To parrot back what you’re saying, Pex is stricter in version requirements than Pipenv - it’s not that pants should be succeeding but that pipenv should’ve been failing because 3.7.0 does not work. Either failing, or marking in its lockfile the >=3.7.1 requirement, which it didn’t do. Given all of this information, it seems using Pex through Pants will be a boon to my codebase because it forces more exact versioning, which I am definitely in favor of
enough-analyst-54434
12/07/2022, 7:13 PMstocky-helmet-22655
12/07/2022, 7:16 PM