proud-dentist-22844
05/18/2021, 6:49 PM./pants test --debug
)?
I followed the tip here: https://www.pantsbuild.org/v2.5/docs/python-test-goal#running-tests-interactively
And I see that it connects to pycharm, and stdout is getting forwarded, but I'm unable to step through the code.steep-carpenter-74400
05/18/2021, 9:48 PMNo module named main
error -- which I can see is due to having two projects with a src/main.py
. Indicative project structure here:
├── BUILD
├── apple-pie-api
│ ├── BUILD
│ ├── Pipfile
│ ├── Pipfile.lock
│ ├── requirements.txt
│ └── src
│ ├── main.py
│ ...
├── common-requirements.txt
├── pants
├── pants.toml
└── randmoji-api
│ ├── BUILD
│ ├── Pipfile
│ ├── Pipfile.lock
│ ├── requirements.txt
│ └── src
│ ├── main.py
│ ...
├ ...
I hit the issue when I try to execute the output pex for one of the projects; e.g., via ./pants package apple-pie-api:pex_binary && ./dist/apple-pie-api/pex_binary.pex
.
Renaming one of the main.py
(e.g., to main2.py
) does the trick. But I'm wondering if there's a way to avoid needing to do that?
Looking at the source roots https://www.pantsbuild.org/docs/source-roots this isn't in those example set ups, so perhaps I'm off piste here? But this is a set up I'd like to use as part of a transition to pants.proud-dentist-22844
05/19/2021, 12:31 AMdependencies
In the old Makefile, in one of the targets that happened before running tests, it looped over contrib/runners/*
and ran python setup.py develop --no-deps
(deps were already installed in another step). How do I do something similar?
ie: Whenever running any of the tests under https://github.com/st2sandbox/st2/tree/pants/st2common/tests,
I need to make sure that each of the packages under https://github.com/st2sandbox/st2/tree/pants/contrib/runners is installed.proud-dentist-22844
05/19/2021, 1:34 AMbig-fall-51153
05/19/2021, 1:10 PMfiledeps
)hundreds-father-404
05/20/2021, 3:02 AMpowerful-florist-1807
05/20/2021, 7:55 AMbig-fall-51153
05/20/2021, 1:48 PMpex_binary
against the source code and modify the filesystem in-place. Specifically, I need to be able to run django
management commands like ./pants run manage.py -- makemigrations
that writes out migrations files. I'm thinking the answer is that if I need to run side-effecting code like that that i need to do it via a pants plugin like other codegen tools?ambitious-actor-36781
05/20/2021, 3:47 PMpowerful-florist-1807
05/20/2021, 6:04 PMuser
05/20/2021, 10:31 PMuser
05/21/2021, 4:28 AMbig-xylophone-43403
05/21/2021, 7:20 PMpackage
goal in Pants 2.4.0 🧵user
05/21/2021, 9:48 PMbest-nightfall-7221
05/23/2021, 6:56 PMjar_library
has a managed_dependencies
field, but scala_library
does not? Would it still work if I passed it in via the payload?
class AiqScalaLibrary(ScalaLibrary):
def __init__(self, java_sources=None, payload=None, managed_dependencies=None, **kwargs):
if managed_dependencies is not None:
payload = payload or Payload()
payload.add_fields({
'managed_dependencies': PrimitiveField(managed_dependencies),
})
super(AiqScalaLibrary, self).__init__(java_sources=java_sources,payload=payload,**kwargs)
I'm trying to use managed_dependencies
to build a top-level jvm binary, which deps on a scala library, which (deep down) has another scala dep where I want to enforce v1 or v2 of ituser
05/24/2021, 3:26 AMuser
05/24/2021, 3:27 AMuser
05/24/2021, 3:27 AMuser
05/24/2021, 3:27 AMcalm-ambulance-65371
05/25/2021, 6:11 PMValueError: Failed to begin watching the filesystem: Bad file descriptor (os error 9)
narrow-vegetable-37489
05/26/2021, 1:27 PMcurved-electrician-64177
05/26/2021, 10:31 PMjolly-midnight-72759
05/26/2021, 11:28 PMzip
. Is there a way to get a list of all the system dependencies pants and its plugins have? I’d like to use that as an input foe configuring our build servers.polite-garden-50641
05/27/2021, 1:06 AMalways
the same as true
and is never
the same as false
what about nondeployables
, what does this option value mean?big-fall-51153
05/27/2021, 2:04 PMmanage.py
running under the run
without chroot solutionbusy-vase-39202
05/27/2021, 2:41 PMcurved-electrician-64177
05/27/2021, 3:12 PM[pytest]
version = "pytest==6.2.4"
And I can see correct version (6.2.4) is used during the test:
./pants test ::
11:08:01.21 [WARN] The constraints file constraints.txt does not contain entries for the following requirements: pytest
11:08:01.21 [WARN] Ignoring `[python_setup].resolve_all_constraints` option because constraints file does not cover all requirements.
11:08:01.22 [INFO] Completed: test - helloworld/greet/greeting_test.py:tests succeeded.
============================= test session starts ==============================
platform darwin -- Python 3.7.7, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /private/var/folders/35/0694cnm970qfhkpw87g3xwdw0000gp/T/process-executionSa6d5C
plugins: cov-2.11.1
collected 1 item
But when I try to inspect all dependencies it shows different version (6.2.3, the one I used before):
./pants --no-pantsd --tag=-lockfile_ignore dependencies --type=3rdparty ::
ansicolors>=1.0.2
protobuf>=3.11.3
pytest==6.2.3
setuptools<54.0,>=50.3.0
translate>=3.2.1
big-fall-51153
05/27/2021, 6:17 PMmanage.py
, I have figured out a workaround for getting runserver
reloading to work under a pex_binary
here: https://pantsbuild.slack.com/archives/C046T6T9U/p1622139116141200?thread_ts=1622124247.126600&cid=C046T6T9Uhundreds-father-404
05/27/2021, 8:53 PMbig-fall-51153
05/28/2021, 3:16 PMname
argument from a plugin since setup_py
appears to be a direct alias for PythonArtifact.__init__
, which has assertions that argument is being provided?