bored-energy-25252
08/17/2022, 9:58 AMbored-energy-25252
08/17/2022, 10:00 AMbored-energy-25252
08/17/2022, 10:07 AMlate-ram-12573
08/17/2022, 1:35 PMcool-yacht-37128
08/17/2022, 2:25 PMexperimental_shell_command
?hundreds-father-404
08/17/2022, 3:27 PMexport
includes Python tools
โข updating Pants to use Py37+ by default
โข adding env var support to experimental_shell_command
Dan is also quite active in this Slack, often helping others and sharing valuable feedback. Thanks Dan for making the community a better place to be! ๐
Posted in #announceflat-zoo-31952
08/17/2022, 5:40 PMbored-glass-58755
08/17/2022, 7:12 PMbitter-ability-32190
08/17/2022, 7:32 PMclever-ghost-87030
08/17/2022, 7:45 PM./pants generate-lockfiles fmt ::
ProcessExecutionFailure: Process 'Find interpreter for constraints: CPython<4.0,>=3.9' failed with exit code 102.
It seems to think the interpreter is broken:
Skipped the following broken interpreters:
1.) /mnt/github_actions_runner/_work/_tool/Python/3.10.6/x64/bin/python3.10:
/mnt/github_actions_runner/_work/_tool/Python/3.10.6/x64/bin/python3.10: error while loading shared libraries: libpython3.10.so.1.0: cannot open shared object file: No such file or directory
2.) /mnt/github_actions_runner/_work/_tool/Python/3.9.13/x64/bin/python3.9:
/mnt/github_actions_runner/_work/_tool/Python/3.9.13/x64/bin/python3.9: error while loading shared libraries: libpython3.9.so.1.0: cannot open shared object file: No such file or directory
Not sure how to fix this, any help would be appreciatedincalculable-grass-76623
08/18/2022, 12:12 AM./pants test libs/somelib/tests/decorators/test_foobar.py
After this begins, Pants
starts by building a pex
from the requirements.txt .. (and tests_requirements.txt)
10:06:26.17 [INFO] Canceled: Building requirements.pex with 31 requirements: ... etc ... (381 characters truncated)
10:06:32.25 [INFO] Completed: Building pytest.pex from pytest_default.lock
10:07:08.96 [INFO] Completed: Building requirements.pex with 31 requirements: ... etc ... (381 characters truncated)
the requirements are in the BUILD
file as
python_requirements(
name="requirements"
)
python_requirements(
name="test_requirements",
source="test_requirements.txt",
)
two questions.
1. why does Pants "Cancel" the first build but then proceed immediately to build it.
2. how can I get Pants to cache this file, it hasn;t changed and everytime i run the test, it rebuilds the requirements.pex which is 60s.cold-sugar-54376
08/18/2022, 2:48 AMnumpy
(for example):
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
WARNING: You are using pip version 20.3.4; however, version 22.2.2 is available.
This is on an M1 mac (12.5) with pants 2.12.0happy-kitchen-89482
08/18/2022, 3:38 AMhappy-kitchen-89482
08/18/2022, 3:39 AMhappy-kitchen-89482
08/18/2022, 3:40 AMcold-sugar-54376
08/18/2022, 3:50 AMcold-sugar-54376
08/18/2022, 3:51 AMcold-sugar-54376
08/18/2022, 3:51 AMhappy-kitchen-89482
08/18/2022, 4:23 AMhappy-kitchen-89482
08/18/2022, 4:25 AMpip install numpy==1.23.1
in a virtualenvhappy-kitchen-89482
08/18/2022, 4:25 AMcold-sugar-54376
08/18/2022, 4:43 AMcold-sugar-54376
08/18/2022, 4:47 AMCollecting numpy==1.23.1
Downloading numpy-1.23.1.tar.gz (10.7 MB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 10.7 MB 14.7 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: numpy
Building wheel for numpy (PEP 517) ... done
Created wheel for numpy: filename=numpy-1.23.1-cp39-cp39-macosx_12_0_arm64.whl size=5080188 sha256=40bc478bef790e163c1e73a5a4dd3ada5bee6a29a66ff35c12a5a800ef9dc665
Stored in directory: /Users/ashu/Library/Caches/pip/wheels/e9/08/af/c32ddeb26bf7cf91805eb7b3db6db127625aed4c121f7ad811
Successfully built numpy
Installing collected packages: numpy
Successfully installed numpy-1.23.1
cold-sugar-54376
08/18/2022, 5:03 AMassert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
AssertionError: would build wheel with unsupported tag ('cp39', 'cp39', 'macosx_12_5_arm64')
cold-sugar-54376
08/18/2022, 5:03 AMaverage-flag-94768
08/18/2022, 8:43 AMbored-glass-58755
08/18/2022, 1:27 PMbrief-dinner-12483
08/18/2022, 1:58 PMPATH
in the Dockerfile
.
Looks something like this:
# Dockerfile
...
RUN git clone <https://github.com/asdf-vm/asdf.git> /root/.asdf --branch v0.10.0
ENV PATH=/root/.asdf/shims:/root/.asdf/bin:$PATH
COPY .tool-versions ./.tool-versions
RUN asdf plugin-add python && \
asdf plugin-add nodejs && \
asdf plugin-add yarn && \
asdf install python && \
asdf install nodejs && \
asdf install yarn
...
RUN yarn run gulp compile
...
So I'm setting the /root/.asdf/bin
path to be part of the PATH
for the Dockerfile, but when the line RUN yarn run gulp compile
executes in the docker_image
target, I get the following error:
Traceback (most recent call last):
File "/pants/setup/bootstrap-Linux-x86_64/2.13.0rc0+git30af7f9c_py38/lib/python3.8/site-packages/pants/engine/process.py", line 272, in fallible_to_exec_result_or_raise
raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Searching for `python3` on PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin' failed with exit code 127.
python3
can't be found and PATH
is missing /root/.asdf/bin
. I can't tell if that's the PATH
from my local host or if that's inside the container but I know that on my local I have:
[python-bootstrap]
# All pants users should configure asdf for 3.8.
search_path = [
"<ASDF_LOCAL>",
]
in my pants.toml
, so pants should know to check for asdf locally, and I've set the PATH
in the context of the container build.
I'm not sure what my next steps are and I'd appreciate any help!quaint-forest-8735
08/18/2022, 2:33 PMpex
executable for pants_jupyter_plugin
instead of fetching it from GitHub? (ie. https://github.com/pantsbuild/pants-jupyter-plugin/blob/ae67015a7d011315973ccc4416fdabd115a79197/pants_jupyter_plugin/pex.py#L45-L50)
We were attempting to use pex + pants_jupyter_plugin to isolate user notebook dependencies from the python environment used to launch jupyter notebook server in a deployment that was behind a heavily restricted firewall (that in particular was denying access to <http://github.com|github.com>
& *.<http://githubusercontent.com|githubusercontent.com>
), and the kernel failed to connect if the pex executable wasn't present on startup. Unfortunately we needed to stop using this in the near-term to unblock, but would love to figure out a path forward since using pex to isolate nb deps is pretty ideal for usfresh-cat-90827
08/18/2022, 3:06 PMpython_distribution
target using a handwritten setup.py
file. The docs say that
If you use a handwritten setup.py ... Pants will bundle whatever the script tells it to.Running
python3 setup.py bdist_wheel
produces a wheel with expected contents, whereas ./pants package //:say-hello
produces a wheel with dist-info
metadata only. Have I misunderstood how Pants runs the existing setup.py
?