user
10/08/2021, 8:19 PMuser
10/09/2021, 6:35 AMcurved-television-6568
10/09/2021, 3:38 PMambitious-actor-36781
10/11/2021, 3:26 AMmodern-wolf-36228
10/11/2021, 7:54 AMbusy-vase-39202
10/11/2021, 7:37 PMhundreds-father-404
10/11/2021, 9:35 PMoverrides
field, which allows you to more easily override metadata for a single file w/o having to define new targets. For example,
overrides={
"foo_test.py": {"timeout": 120},
("bar_test.py", "baz_test.py"): {"timeout": 240},
}
Feedback welcomed on what this syntax should look like: 🧵user
10/12/2021, 1:40 AMmodern-wolf-36228
10/12/2021, 9:20 AMERROR: No matching distribution found for pantsbuild.pants==2.8.0.dev4
?
I can install pantsbuild.pants==2.8.0.dev4
via pip, but when I change the version on the pants.toml
I have the error. 🤔modern-wolf-36228
10/12/2021, 11:18 AMmodern-wolf-36228
10/12/2021, 12:00 PMuvicorn
, and use that on the pex binary. I can create a PR and add that hash to the requirements, but is there an easier way?modern-wolf-36228
10/12/2021, 12:10 PMscript
field from pex_binary
with ./pants run
? 🤔 It seems like I can't add the arguments when I run it?modern-wolf-36228
10/12/2021, 12:13 PM./pants run
to have the restartable behavior? Or can I use only the pex binary with some env variable or something like that?polite-garden-50641
10/12/2021, 4:07 PMmillions-kilobyte-51167
10/13/2021, 8:42 AM--no-pypi
and --repo my_wheelhouse
)
• to populate my_wheelhouse
, I build my application as a wheel, as well as all variants of my dependencies that I will need for the platforms I plan to support (plus setuptools
, for some reason)
• since I am providing all the necessary dependencies, pex doesn't need to do run any build steps, so it doesn't matter which interpreter pex itself is installed with, or which ones it can see on the PATH
Is everything ok so far? In particular the last point seems to be an issue, because my error messages change a lot depending on where pex was installed. I initially used pipx
because it felt to me like a non-project bound build tool that I would want to install globally, and not into the virtualenv of my application. Similar to poetry
, if that makes sense (by now, in my desperation, I have I think 4 installations of pex floating around on my system).
I can try to build a reproducible example, but it would take me a while. I was hoping that someone can clear up for me how pex wants to be used instead 😃user
10/13/2021, 4:10 PMhappy-kitchen-89482
10/13/2021, 5:57 PMmodern-leather-27612
10/13/2021, 6:13 PMplain-carpet-73994
10/13/2021, 7:01 PMprotoc
via the standard pants protobuf_library
goal. If I run the build with --no-process-execution-local-cleanup
I can cd into the directory and if I try to run the command I get bash: ./bin/protoc: cannot execute binary file: Exec format error
. Indeed, if I just run ./bin/protoc
I get that error. However, I have protoc
installed so if I change the command to run just protoc
instead of the ./bin/protoc
in the sandbox it works. I think the issue is that pants seems have bundled their own protobuf compiler and it's an intel build, not an ARM build. Is that correct? Any way I can fix that?clean-city-64472
10/13/2021, 9:37 PMpip install Django==3.2
django-admin startproject mysite
Trying to map this over to a fresh pants environment. If I add Django==3.2
to my requirements.txt
is there some light weight way I could run the django-admin
script contained in that package through the pants CLI?user
10/13/2021, 9:51 PMplain-carpet-73994
10/13/2021, 11:18 PM--no-python-setup-resolve-all-constraints
got me further but then I hit what I think is a different bug so I figured I'd start a new thread. I'm getting this:
ERROR: Cannot install numpy and opencv-python-headless==4.5.3.56 because these package versions have conflicting dependencies.
...
The conflict is caused by:
The user requested numpy
opencv-python-headless 4.5.3.56 depends on numpy>=1.19.3
but that works fine on Intel with the same deps. So what gives? If you look at the setup.py
for opencv you find this:
if sys.version_info[:2] >= (3, 6):
minimum_supported_numpy = "1.13.3"
if sys.version_info[:2] >= (3, 7):
minimum_supported_numpy = "1.14.5"
if sys.version_info[:2] >= (3, 8):
minimum_supported_numpy = "1.17.3"
if sys.version_info[:2] >= (3, 9):
minimum_supported_numpy = "1.19.3"
So the 1.19.3
seems like it's coming from the if
that checks if I'm using python 3.9 or above. pants is running with 3.9 but I'm building for 3.7. My `pants.toml`:
[python-setup]
interpreter_constraints = ['CPython==3.7.*']
requirement_constraints = 'constraints.txt'
interpreter_search_paths = ["<PYENV>"]
so it seems like it's resolving the dependencies based on the wrong Python version.witty-crayon-22786
10/13/2021, 11:52 PMpants
via the setup script, and how many of you are using the pants
PEX released to Github?helpful-jackal-12093
10/14/2021, 11:03 AMpants
handle packages installed from VCS?
It seems I’m always getting a stack trace during the parsing of the poetry.lock
file when pants
reaches a dependency that is installed from a VCS:
14:02:18.06 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError)
File "/Users/jbasila/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.czNsHH/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 236, in _run_inner
return self._perform_run(goals)
File "/Users/jbasila/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.czNsHH/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 175, in _perform_run
return self._perform_run_body(goals, poll=False)
File "/Users/jbasila/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.czNsHH/install/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 192, in _perform_run_body
return self.graph_session.run_goal_rules(
File "/Users/jbasila/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.czNsHH/install/lib/python3.9/site-packages/pants/init/engine_initializer.py", line 135, in run_goal_rules
exit_code = self.scheduler_session.run_goal_rule(
File "/Users/jbasila/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.czNsHH/install/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 538, in run_goal_rule
self._raise_on_error([t for _, t in throws])
File "/Users/jbasila/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.czNsHH/install/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 506, in _raise_on_error
raise ExecutionError(
Exception message: 1 Exception encountered:
MappingError: Failed to parse BUILD:
Invalid URL: git+git@github.com:ourrepo/somerepo.git#1112223334354322362625662
I have tried to also convert the file to a requirements.txt
but still I get the same result.
What did I miss?user
10/14/2021, 4:07 PMsteep-eye-36330
10/14/2021, 5:14 PMplain-carpet-73994
10/14/2021, 6:50 PMopencv-python
but there isn't an ARM build for that on PyPi. You can apt-get install python3-opencv
but pants won't pick that up. I do understand why: it breaks the hermetic build idea as you're using an outside dependency that could be updated via apt
at any time. You can't can't correctly generate a constraints file because whatever tool you're using (e.g. pip freeze
or pip-compile
) wouldn't be aware of one of the dependencies and it's requirements/version. But, getting it to build on ARM looks like it's going to be a big time suck. Is there an "escape hatch" that allows one to use a globally installed Python library?
("no" is a perfectly reasonable answer here I think, was just hoping...)clean-city-64472
10/14/2021, 7:55 PMuser
10/14/2021, 8:04 PMproud-dentist-22844
10/14/2021, 8:09 PM