limited-insurance-37393
03/01/2021, 7:48 PMhundreds-father-404
03/01/2021, 7:48 PMhelpful-lunch-92084
03/01/2021, 7:48 PMuser
03/02/2021, 1:12 AMbusy-vase-39202
03/02/2021, 9:47 PMbusy-vase-39202
03/03/2021, 12:13 AMcurved-television-6568
03/03/2021, 9:04 AMbrash-baker-91190
03/03/2021, 2:40 PMpulumi
CLI is a Go binary, but to execute our infrastructure program written in Python, it needs to be invoked from inside a virtualenv with the right dependencies. Is there some kind of way for Pants to create such an environment for me, and then "get out of my way" and let me execute arbitrary pulumi
commands in that environment? I see there's a pants run
command, but that looks like it's for executing Pex binaries. Can that be adapted for my usecase, or is there another way? Thanks 🙇calm-ambulance-65371
03/03/2021, 10:49 PMException: Unmatched glob from the option `--python-setup-requirement-constraints`: "constraints.txt"
happy-kitchen-89482
03/04/2021, 4:00 AM/build-support/virtualenvs/
be in our .gitignore
?hundreds-father-404
03/04/2021, 4:13 AMgit clean -fd -- build-support
. Stu made a change to move the venvhappy-kitchen-89482
03/04/2021, 9:02 AMhappy-kitchen-89482
03/04/2021, 9:02 AMpolite-vase-75369
03/04/2021, 6:34 PMhelpful-lunch-92084
03/04/2021, 9:36 PMacceptable-guitar-79854
03/04/2021, 9:58 PMimport x
x.___version___
and i was thinking of not duplicating that information (existing setup.py-s were reading the version number from a module file)?acceptable-guitar-79854
03/04/2021, 9:59 PM./pants package my_lib::
with no setup_py_commands exports the "versioning" file but I'm not sure how to make python_distribution read from itaverage-australia-85137
03/05/2021, 3:00 PM(remit) [nate@ragin-cajun remit-srv]$ time ./pants test --force tests
Scrubbed PYTHONPATH=/home/nate/wave/remit-srv/src: from the environment.
09:56:24.43 [INFO] Completed: test - tests/test_terrapay.py succeeded.
✓ tests/test_terrapay.py succeeded.
real 2m23.628s
user 0m0.429s
sys 0m0.042s
compared with:
(remit) [nate@ragin-cajun remit-srv]$ time pytest tests/test_terrapay.py
============================================== test session starts ==============================================
platform linux -- Python 3.8.5, pytest-6.0.1, py-1.9.0, pluggy-0.13.1
rootdir: /home/nate/wave/remit-srv
plugins: celery-4.4.7, requests-mock-1.8.0, Faker-4.1.1, cov-2.10.1
collected 596 items
tests/test_terrapay.py .................................................................................. [ 13%]
......................................................................................................... [ 31%]
......................................................................................................... [ 48%]
......................................................................................................... [ 66%]
......................................................................................................... [ 84%]
.............................................................................................. [100%]
======================================== 596 passed in 67.94s (0:01:07) =========================================
real 1m13.382s
user 0m59.747s
sys 0m2.068s
average-australia-85137
03/05/2021, 3:00 PMbusy-vase-39202
03/05/2021, 8:19 PMuser
03/05/2021, 9:42 PMhappy-kitchen-89482
03/05/2021, 9:49 PMrequirements.txt
changes? By injecting a dep on the file? I seem to be having an issue.user
03/07/2021, 6:37 PMhelpful-lunch-92084
03/08/2021, 5:11 PMpants run path/to/binary -- binary’s arguments
. Now the binary’s arguments happened to have brackets []
in them and pants was aborting with:
File "/Users/nate/.cache/pants/setup/bootstrap-Darwin-x86_64/2.2.0_py38/lib/python3.8/site-packages/pants/util/eval.py", line 47, in parse_expression
raise raise_type(
pants.option.errors.ParseError: The value cannot be evaluated as a literal expression: SyntaxError('unexpected EOF while parsing', ('<string>', 1, 8, '[test] quoting'))
Given raw value:
1: [test] quoting
In v1 we made heavy use of pants run with --
expecting pants to stop processing argv after that. I tried looking at --run-args
but it seems that the brackets still cause it to bail.many-agent-62725
03/08/2021, 5:20 PMfiles
target in Pants v2.X
I have the following files (see screenshot), as well as the following BUILD file:
python_library(
name='test-handler',
sources=[
'lambda_handler/test.py',
':test-queries'
],
dependencies=[],
)
python_awslambda(
name='test-lambda',
dependencies=[
':test-handler',
],
runtime='python3.8',
handler='test.lambda_handler.test:handler',
output_path='lambda/test/test.zip'
)
pex_binary(
name='test-pex',
dependencies=[
':test-handler',
],
entry_point='test.lambda_handler.test:handler',
output_path='lambda/test/test-pex.zip'
)
files(
name='test-queries',
sources=[
'queries/test.sql'
]
)
The objective is to include some SQL files in an AWS lambda target.
However, when I unzip the final artefacts, the SQL files are not included (as shown by the screenshot). We started having this issue since the migration from 1.30 to 2.0. How can I include files in an AWS lambda target?helpful-lunch-92084
03/08/2021, 8:11 PMfallible_to_exec_result_or_raise
raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Searching for `bash` on PATH=/usr/bin:/bin:/usr/local/bin' failed with exit code -9.
stdout:
I’ve verified that he indeed does have bash installed:
$ which bash
/bin/bash
Curiously this is what he sees when executing /usr/bin/env bash
$ /usr/bin/env bash
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit <https://support.apple.com/kb/HT208050>.
bash-3.2$
However it appears that it is indeed a bash shell he’s entered into unless Mac 11.2 is doing something funky.
Has anyone ran into this?kind-knife-49817
03/09/2021, 4:21 PM#!/usr/bin/env python
something that will never resolve in windows. It's even part of the tl/dr ! https://pex.readthedocs.io/en/latest/whatispex.html#tl-dr
That raises some questions:
For window support would we be willing to (just for windows users) drop the idea of being able to execute a .pex file alone.
Example: https://github.com/pantsbuild/pex/blob/master/tests/tools/commands/test_venv.py#L533 changing to subprocess.check_call(args=[sys.executable, "-mpex", pex_file, "venv", venv], env=make_env(PEX_TOOLS=1))
And then in general, are we ready to have different paths in a few places the code base with a few if WINDOWS
statements that will be required to achieve first party support for windows?user
03/09/2021, 10:29 PMhttps://pbs.twimg.com/media/EwEiZMFXMAY_wPt.jpg▾
busy-vase-39202
03/10/2021, 12:21 AMhappy-kitchen-89482
03/10/2021, 5:53 PMrequirements.txt
do we?