echoing-farmer-1563007/02/2021, 4:27 PM
rapid-bird-7930007/02/2021, 7:25 PM
at the same time as target arguments but it's not in the command at all:
I tested the goal locally with no issues. Any ideas why this would happen?
./pants import-fixer --jobs=cross-imports --import-fixer-output-file=cross_imports_output.json app/:: 17:27:47.34 [INFO] Initializing scheduler... 17:27:47.50 [INFO] Scheduler initialized. 17:27:47.53 [ERROR] You used `--changed-since` at the same tie as using target arguments. Please use only one. Traceback (most recent call last): File "/home/ubuntu/workspace/backend_master/.cache/pants/setup/bootstrap-Linux-x86_64/2.5.1rc3_py38/lib/python3.8/ite-packages/pants/bin/daemon_pants_unner.py", line 125, in single_daemonized_run runner = LocalPantsRunner.create( File "/home/ubuntu/workspace/backend_master/.cache/pants/setup/bootstrap-Linux-x86_64/2.5.1rc3_py3/lib/python3.8/site-package/pants/bin/local_pants_runner.py", line 150, in create specs = calculate_specs( File "/home/ubuntu/workspace/backend_master/.cache/pants/setup/bootstrap-Linux-x86_64/2.5.1rc3_py38/lib/pthon3.8/site-packages/pants/init/specs_calculator.py", line 47, in calculate_specs raise InvalidSpecConstraint( pants.init.specs_calculator.InvalidSpecConstraint: You used `--changed-since` at the same time as using target arguments. Please use only one. + ./pants import-fixer --jobs=wildcard-imports --ignore-skip --json-output --import-fixer-output-file=wildcard_imports_output.json app/:: 17:27:48.10 [ERROR] You used `--changed-since` at the same time as using target arguments. Please use only one. Traceback (most recent call last): File "/home/ubuntu/workspace/backend_master/.cache/pants/setup/bootstrap-Linux-x86_64/2.5.1rc3_py38/lib/python3.8/site-packages/pants/bin/daemon_pants_runner.py", line 125, in single_daemonized_run runner = LocalPantsRunner.create( File "/home/ubuntu/workspace/backend_master/.cache/pants/setup/bootstrap-Linux-x86_64/2.5.1rc3_py38/lib/python3.8/site-packages/pants/bin/ocal_pants_runner.py", line 150, in create specs = calculatespecs( File "/home/ubuntu/workspace/backend_master/.cache/pants/setup/bootstrp-Linux-x86_64/2.5.1rc3_py38/lib/python3.8/site-packages/pants/init/specs_calculator.py", line 47, in calculat_specs raise InvalidSpecConstraint( pants.init.specs_calculator.InvalidSpecConstraint: Youused `--changed-since` at the same time as using target arguments. Please use only one.
powerful-boots-123407/02/2021, 8:32 PM
nice-france-7476307/03/2021, 9:20 AM
nice-france-7476307/04/2021, 10:07 AM
, did I do something to confuse it? 2. I can't seem to run tests Also any general "this is bad style" feedback is welcome, I'm unfamiliar with the library still and open to find out more. The ultimate goal is to release 3 pypi packages via a CI/CD pipeline once I'm done.
plain-carpet-7399407/04/2021, 7:51 PM
and I need to build a cross-platform
that will run on OSX and Linux. I'm building on Linux. I've manually built the right
file on OSX and uploaded it to a private GCP-based PyPi repo. The following works fine in a
in which I'm running pants:
pip install --trusted-host /us-central1-python.pkg.dev --index-url <https://us-central1-python.pkg.dev/infrastructure-314723/python-deps/> --platform macosx_10_15_x86_64 --implementation cp --python-version 37 --abi cp37m --only-binary :all: --target /tmp pyrealsense2
./pants package /path/to/thing
Note that the command line Pants is generating seems to be saying to use my private repo at
$ ./pants package realsense/cli/ 12:49:06.11 [INFO] Completed: Resolving 3 requirements: matplotlib, numpy, pyrealsense2 12:49:06.11 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError) File "/home/oliver/.cache/pants/setup/bootstrap-Linux-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 229, in _run_inner return self._perform_run(goals) File "/home/oliver/.cache/pants/setup/bootstrap-Linux-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 168, in _perform_run return self._perform_run_body(goals, poll=False) File "/home/oliver/.cache/pants/setup/bootstrap-Linux-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 185, in _perform_run_body return self.graph_session.run_goal_rules( File "/home/oliver/.cache/pants/setup/bootstrap-Linux-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/init/engine_initializer.py", line 135, in run_goal_rules exit_code = self.scheduler_session.run_goal_rule( File "/home/oliver/.cache/pants/setup/bootstrap-Linux-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/engine/internals/scheduler.py", line 530, in run_goal_rule self._raise_on_error([t for _, t in throws]) File "/home/oliver/.cache/pants/setup/bootstrap-Linux-x86_64/2.4.0_py38/lib/python3.8/site-packages/pants/engine/internals/scheduler.py", line 498, in _raise_on_error raise ExecutionError( Exception message: 1 Exception encountered: ProcessExecutionFailure: Process 'Resolving 3 requirements: matplotlib, numpy, pyrealsense2' failed with exit code 1. stdout: stderr: ERROR: Could not find a version that satisfies the requirement pyrealsense2 ERROR: No matching distribution found for pyrealsense2 pid 587331 -> /home/oliver/.pyenv/versions/3.7.10/bin/python3.7 /home/oliver/.cache/pants/named_caches/pex_root/pip.pex/cf4106b4c7898b462f7c172dde686a9747103f1a --disable-pip-version-check --no-python-version-warning --exists-action a --isolated -q --cache-dir /home/oliver/.cache/pants/named_caches/pex_root --log /tmp/process-executionntUtWf/.tmp/tmpmzcd3hpx/pip.log download --dest /tmp/process-executionntUtWf/.tmp/tmps_6hxe4q/macosx_10_15_x86_64-cp-37-cp37m --platform macosx_10_15_x86_64 --implementation cp --python-version 37 --abi cp37m --only-binary :all: --constraint constraints.txt matplotlib numpy pyrealsense2 --index-url <https://pypi.org/simple/> --find-links <https://us-central1-python.pkg.dev/infrastructure-314723/python-deps/> --retries 5 --timeout 15 exited with 1 and STDERR: None (Use --print-stacktrace to see more error details.)
. However, I suspect that doesn't know about Google's auth stuff which I did set up correctly with
(see the successful pip install above). Or maybe the issue is that
for Linux is coming from
while for OSX it needs to come from a different repo?? Any help would be appreciated.
user07/07/2021, 7:31 PM
user07/07/2021, 7:36 PM
user07/07/2021, 7:43 PM
user07/08/2021, 12:06 AM
user07/08/2021, 4:33 PM
clean-city-6447207/08/2021, 5:47 PM
build target. How are you handling the deployment piece? With the limited lambda work we have done we used the serverless framework which took care of both building and deploying to AWS.
average-australia-8513707/08/2021, 7:19 PM
curved-television-656807/09/2021, 11:28 AM
curved-television-656807/09/2021, 11:53 AM
witty-crayon-2278607/09/2021, 4:34 PM
gorgeous-eve-1255307/09/2021, 7:34 PM
flat-zoo-3195207/10/2021, 11:08 AM
and friends as ways to generate input for other build tools? I ask this because I'm looking for a way to introduce this at my new org, but there's a lot of build work already done that is deeply incompatible with the pants way of doing things, and just trying to get that all working in pants' model on the side would be a big, high-risk project. It seems more sane to try to introduce it slowly.
proud-dentist-2284407/11/2021, 2:29 AM
on matching classes to extract a dictionary property from the class. Here's the plugin https://github.com/st2sandbox/st2/blob/pants/pylint_plugins/api_models.py#L49-L52 Example matching class's
property: https://github.com/st2sandbox/st2/blob/pants/st2common/st2common/models/system/actionchain.py#L125-L149 Maybe astroid provides a way to get the dictionary?
proud-dentist-2284407/11/2021, 9:42 AM
imports. This import: https://github.com/st2sandbox/st2/blob/pants/st2common/st2common/services/datastore.py#L22
from ... import *
comes from this file (yes I have
from st2client.models import KeyValuePair
in pants.toml): https://github.com/st2sandbox/st2/blob/pants/st2client/st2client/models/__init__.py#L25
[python-infer].inits = true
which brings in the transitive dep: https://github.com/st2sandbox/st2/blob/pants/st2client/st2client/models/keyvalue.py#L26
from st2client.models.keyvalue import * # noqa
If I run the full suite with
, pylint succeeds (except for a known real failure somewhere else). But using a narrow target:
./pants lint ::
pylint fails with:
./pants lint ./st2common/st2common/services::
Inspecting the process-execution dir with
st2common/st2common/services/datastore.py:22:0: E0611: No name 'KeyValuePair' in module 'st2client.models' (no-name-in-module)
is not included, which makes sense since it is not directly imported in
. Is there a way to get
imports to count as direct imports when pants is putting thing together for pylint?
powerful-boots-123407/12/2021, 1:07 PM
, which seems to run into an issue with the same module name being used for two applications. With project-app/app.py and project-app-async/app.py I get the following:
I haven't seen how to fix this without changing the name of the file and that's not really a solution. I tried to make
./pants run project-app:project-app 15:02:53.57 [WARN] The pex_binary target project-app has the field `entry_point='app.py'`, which maps to the Python module `app`, but Pants cannot safely infer a dependency because more than one target owns this module, so it is ambiguous which to use: ['project-app-async/app.py:project-app-async0', 'project-app/app.py:project-app0'].
but that didn't work so the error message is a bit weird that it looks like it wants me to specify which target resolution to use but then it won't let me use the target resolution (is that even a name for this?)
salmon-barista-6316307/12/2021, 11:06 PM
running in a python
pyenv environment. I also have python
installed via pyenv as we need those versions for our interpreter constraints for some of our servers. pants.toml
It finds the 3.6.12 interpreter but i get errors like this when trying to resolve the constraints.
[python-setup] resolve_all_constraints = true interpreter_constraints = ['CPython>=3.6,<3.7'] requirement_constraints = '3rdparty/python/constraints.txt' interpreter_search_paths = [ '<PYENV>', '<PATH>', ]
Anyone see this before?
WARNING: Requirement '/tmp/process-executionlIuSO7/.tmp/tmpfyzwz_5c/home.centos..pyenv.versions.3.6.12.bin.python3.6/pyOpenSSL-20.0.1-py2.py3-none-any.whl' looks like a filename, but the file does not exist ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/tmp/process-executionlIuSO7/.tmp/tmpfyzwz_5c/home.centos..pyenv.versions.3.6.12.bin.python3.6/pyOpenSSL-20.0.1-py2.py3-none-any.whl'
salmon-barista-6316307/12/2021, 11:18 PM
user07/12/2021, 11:26 PM
user07/12/2021, 11:28 PM
salmon-barista-6316307/12/2021, 11:31 PM
. maybe specific to only some of the dependencies??
happy-kitchen-8948207/12/2021, 11:34 PM
salmon-barista-6316307/12/2021, 11:35 PM
happy-kitchen-8948207/12/2021, 11:35 PM