incalculable-yacht-75851
01/04/2022, 10:24 PM./pants -l=debug lint pants-plugins::
and it passes all the python files to prettier but not the markdown file. I want the prettier plugin to operate on all files in a project (BUILD context).bitter-ability-32190
01/11/2022, 4:02 PMbitter-ability-32190
01/11/2022, 4:06 PMcookiecutter
script for common tasks would really speed up stamping out new linter/formatters: https://github.com/cookiecutter/cookiecutter
(The result doesn't have to be perfect, but any templating goes a long way)wide-midnight-78598
01/12/2022, 4:42 PMwide-midnight-78598
01/13/2022, 1:56 PMoutput_directories
doesn't appear to visibly do anything
https://github.com/sureshjoshi/pants-pyoxidizer-plugin/blob/33be0f2e2d03b0a487d9e0[…]1062b3bb28afa85e/pants-plugins/experimental/pyoxidizer/rules.pywide-midnight-78598
01/13/2022, 5:40 PMwide-midnight-78598
01/17/2022, 6:52 PME Engine traceback:
E in select
E in experimental.pyoxidizer.rules.package_pyoxidizer_binary (src:test-bin)
E in pants.backend.python.util_rules.pex.create_pex (pyoxidizer.pex)
E in pants.backend.python.util_rules.pex.build_pex (pyoxidizer.pex)
E in pants.backend.python.util_rules.pex.find_interpreter (CPython>=3.8)
E in pants.engine.process.fallible_to_exec_result_or_raise
E in pants.backend.python.util_rules.pex_cli.setup_pex_cli_process
E in pants.backend.python.util_rules.pex_environment.find_pex_python
E in pants.python._binaries_rules.find_python
E Traceback (most recent call last):
E File "/Users/sj/.cache/pants/named_caches/pex_root/venvs/de04010553f1713b72512ad07d1b20b66bf8f840/f5cef8ebdbaf03ed774d467ae52a457e8fe3774a/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 705, in native_engine_generator_send
E res = func.send(arg)
E File "/Users/sj/.cache/pants/named_caches/pex_root/venvs/de04010553f1713b72512ad07d1b20b66bf8f840/f5cef8ebdbaf03ed774d467ae52a457e8fe3774a/lib/python3.9/site-packages/pants/python/_binaries_rules.py", line 82, in find_python
E raise BinaryNotFoundError(
E pants.engine.process.BinaryNotFoundError: Was not able to locate a Python interpreter to execute rule code.
E Please ensure that Python is available in one of the locations identified by `[python-bootstrap] search_path`, which currently expands to:
E []
wide-midnight-78598
01/18/2022, 1:22 AMpython_sources(
name="libtest"
)
python_distribution(
name="test-dist",
dependencies=[":libtest"],
wheel=True,
sdist=False,
provides=python_artifact(
name="test-dist",
version="0.1.0",
),
)
pyoxidizer_binary(
name="test-bin",
entry_point="hellotest.main",
dependencies=[":test-dist"],
)
wide-midnight-78598
01/18/2022, 3:59 PMhundreds-father-404
01/20/2022, 1:24 AMwide-midnight-78598
01/28/2022, 7:56 PMwide-midnight-78598
02/02/2022, 6:11 AMpython_distribution
to add imports to the setup.py?
in setup_py.py
we have the following:
SETUP_BOILERPLATE = """
# DO NOT EDIT THIS FILE -- AUTOGENERATED BY PANTS
# Target: {target_address_spec}
from setuptools import setup
setup(**{setup_kwargs_str})
"""
but if I need another import in there, can that be added via the BUILD file? Or do I just need to use a custom setup.py/auto-generate my ownsome-farmer-97614
02/08/2022, 12:49 PMcurved-television-6568
02/08/2022, 1:37 PMbitter-ability-32190
02/08/2022, 2:11 PMhundreds-father-404
02/08/2022, 3:20 PMsome-farmer-97614
02/08/2022, 4:11 PMhundreds-father-404
02/08/2022, 4:13 PMsome-farmer-97614
02/08/2022, 4:24 PMbusy-vase-39202
02/08/2022, 5:46 PMwide-midnight-78598
02/09/2022, 12:37 AMwide-midnight-78598
02/10/2022, 4:48 AMDistBuildRequest
or DistBuildChrootRequest
support adding arbitrary dependencies? https://github.com/pantsbuild/pants/blob/0ce449f9181c690dbf60b2bc51b0e97f285eb9ae/src/python/pants/backend/python/goals/setup_py.py#L385-L417
I'm working on the mypyc
plugin, and it works relatively well, but when I add a 3rd party dep, it cannot be found - I assume because it can't find the dep within the build context. I manually hackjobbed this by creating a custom pyproject.toml and then adding my dep to the [build-system].requires field, just to see if it would work. Seemingly it does, so now I'm trying to figure out how to correctly get it into the pipeline. I can access the field in the transitive dependencies, so that's not a problem.
The end goal is a wheel with the compiled objects inside.better-sunset-63499
02/14/2022, 1:19 PMfast-notebook-4005
02/15/2022, 9:56 PMTraceback (most recent call last):
File "/srv/submodules/obscura-plugins/plugins/setup.py", line 4, in <module>
from Cython.Build import cythonize
ModuleNotFoundError: No module named 'Cython'
Exception message: Command '['/usr/bin/python3.7', '/srv/submodules/obscura-plugins/plugins/setup.py', 'build_ext', '--inplace', '--verbose']' returned non-zero exit status 1.
is there a "simple" fix to get this working under 3.7? if I have to upgrade Pants and/or Cython to get it to work I will, but my goal in the short term is to do the minimum necessary to get upgraded to 3.7, and then tackle the rest of the tech debt separately
pants.toml: http://ix.io/3PIe
register.py of the plugin: http://ix.io/3PIi
compile_cython.py: http://ix.io/3PIj
BUILD containing the Cython target: http://ix.io/3PIk
the setup.py living next to that BUILD file, where the exception above is being thrown from: http://ix.io/3PImwitty-crayon-22786
02/18/2022, 5:29 PMhelm
support: https://github.com/pantsbuild/pants/pull/14487 … i’ve been busy in the last few days, but will take a look soon. in the meantime though, if anyone who is familiar with helm
has time to take a look, that would be really helpful!witty-family-13337
02/21/2022, 3:32 PMWSDL -> Java
code generation backend in case any early feedback can be received. I’m having issues now to run the tests in pants (some import error related to the .so
binary of the engine) so I leave it as draft as I couldn’t run all the tests: https://github.com/pantsbuild/pants/pull/14545bitter-ability-32190
02/23/2022, 5:39 PMsource_files = await Get(
SourceFiles,
SourceFilesRequest(field_set.source for field_set in request.field_sets),
)
source_files_snapshot = (
source_files.snapshot
if request.prior_formatter_result is None
else request.prior_formatter_result
)
input_digest = source_files_snapshot.digest
digest_contents = await Get(DigestContents, Digest, input_digest)
output_digest = await Get(
Digest,
CreateDigest(
FileContent(path=file_content.path, content=maybe_add_copyright(file_content.content))
for file_content in digest_contents
),
)
return FmtResult(
input=input_digest,
output=output_digest,
stdout="",
stderr="",
formatter_name=request.name,
)
careful-address-89803
02/23/2022, 8:51 PMansible-lint
, which requires the ansible
script to be there too. I tried subclassing PythonToolBase and adding 'ansible==5.3.0' to the extra requirements, but it looks like it's not included in the PEX as I get "No such file or directory: 'ansible'" when running .ansible-lint
.
I'm not sure what question to ask. Is it possible to have a PEX with multiple binaries? Can I have a PythonToolBase depend/include another PythonToolBase? Is there a better way to do this?
Any help is appreciated :)rapid-bird-79300
02/23/2022, 10:40 PMgo
with
go install <http://github.com/verloop/twirpy/protoc-gen-twirpy@latest|github.com/verloop/twirpy/protoc-gen-twirpy@latest>
Is it possible to use go
like this in pants via an external tool? Or would we need to install go
as an external tool first and then we can install plugins with it?wide-midnight-78598
02/24/2022, 12:48 AMdeploy
target I'm working on.
I was planning to do a similar dependencies inference as what Docker does re: copying PEXes and being able to pull in files/resource/etc (https://www.pantsbuild.org/docs/docker#adding-dependencies-to-your-docker_image-targets)
In my current state of mind, this makes sense to me, given how I've been using my internal ansible deployment target. However, from a wider perspective, I don't know if this could cause more trouble, since there isn't a singular Dockerfile to look through, but rather a set of roles and a larger number of potential inference locations