freezing-vegetable-92896
11/02/2021, 8:16 PMscs
in particular) to install on a mac. It looks like the issue is with pants picking up a universal binary and attempting to build an arm64 version of the library that we don't need and failing. I've been able to install in docker, but still struggling on mac native. One of my co-workers was able to get it to work by forcing an interpreter_constraints
to a version that doesn't have a universal binary installed. This feels like a fairly unmaintainable hack, so I'm hoping there is a better wayfreezing-vegetable-92896
11/02/2021, 9:50 PMattrs
in our internal artifactory
. My best guess is that our artifactory is returning an empty list or an error that is then causing pants to fail. Is there a better way I should be handling this? I'm currently adding things with [python-repos].indexes.add
stale-nightfall-29801
11/03/2021, 9:49 AMbrash-baker-91190
11/03/2021, 1:38 PMplain-fireman-49959
11/03/2021, 1:55 PM./pants dependencies projects/example
doesn't return any dependency, I tried both poetry_requirements
and python_requirements
. If pants can indeed support this setup, do you have any examples of open source monorepo?high-energy-55500
11/03/2021, 3:09 PMmartim@Argon repo % poetry update
Updating dependencies
Resolving dependencies... (22.5s)
Writing lock file
Package operations: 0 installs, 8 updates, 1 removal
• Removing requests-unixsocket (0.2.0)
• Updating jupyter-server (1.11.1 -> 1.11.2)
• Updating botocore (1.22.8 -> 1.22.9)
• Updating yarl (1.7.0 -> 1.7.2)
• Updating boto3 (1.19.8 -> 1.19.9)
• Updating isort (5.9.3 -> 5.10.0)
• Updating regex (2021.10.23 -> 2021.11.2)
• Updating pantsbuild.pants (2.7.0 -> 2.7.1): Failed
RuntimeError
Unable to find installation candidates for pantsbuild.pants (2.7.1)
at ~/.poetry/lib/poetry/installation/chooser.py:72 in choose_for
68│
69│ links.append(link)
70│
71│ if not links:
→ 72│ raise RuntimeError(
73│ "Unable to find installation candidates for {}".format(package)
74│ )
75│
76│ # Get the best link
red-ghost-2220
11/03/2021, 5:00 PMmodern-leather-27612
11/03/2021, 8:40 PM./pants run source/tool
(well, and get that GitLab token).
As y'all suggested, I got documentation building with Sphinx working by creating a PEX target that includes Sphinx, its plugins, and the repository's source code as dependencies. The one snafu and remaining issue is that Sphinx won't find the source code. I had to explicitly:
sys.path.insert(0, os.path.abspath('../libraries'))
sys.path.insert(0, os.path.abspath('../tasks'))
in Sphinx' conf.py
. I'm not sure why. But it won't work without.modern-leather-27612
11/03/2021, 8:45 PMrequirements.txt
. For some projects or some branches, we also pin internal dependencies. With a Pants-based monorepo, it makes sense to develop and test against the union of internal libraries, i.e., the source code as is. I can see how to cut different libraries from the monorepo as well. But I don't see a good solution to distributing libraries with pinned internal dependencies. Essentially, I'm asking how can I layer a packaged and possibly pinned view on top of the all sources in a big soup view of the monorepo with Pants. Any help in resolving this last remaining issue would be fantastic.ambitious-actor-36781
11/04/2021, 1:06 AMsources
field default, but w/ some extras?boundless-garage-48817
11/04/2021, 8:40 AMfreezing-vegetable-92896
11/04/2021, 4:25 PM--no-process-execution-local-cleanup
. I ended up filling up quite a bit of my disk yesterday running repeatedly to debugplain-carpet-73994
11/04/2021, 5:15 PMconstraints.txt
. In fact, it contained only a few shell scripts. But the CI failed with:
WARNING: Discarding <https://files.pythonhosted.org/packages/01/1b/d3ddcabd5817be02df0e6ee20d64f77ff6d0d97f83b77f65e98c8a651981/numpy-1.18.5.zip#sha256=34e96e9dae65c4839bd80012023aadd6ee2ccb73ce7fdf3074c62f301e63120b> (from <https://pypi.org/simple/numpy/>) (requires-python:>=3.5). Command errored out with exit status 1: /builds/companionlabs/companionlabs-central/python/.pants/named_caches/pex_root/venvs/short/d492f796/bin/python3.7 /builds/companionlabs/companionlabs-central/python/.pants/named_caches/pex_root/venvs/short/d492f796/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/process-executionM0T3Ob/.tmp/tmp6sx3gu76 Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement numpy
ERROR: No matching distribution found for numpy
This is the same version of numpy we've been using successfully on ARM for months. And we're using Python3.7 but it seems to say it's discarding numpy
as it requires python:>=3.5
which would seem to be fine. Any ideas?loud-laptop-17949
11/04/2021, 9:02 PMambitious-actor-36781
11/04/2021, 9:31 PMsources
of the python_sources
to ***/**.py, !**/test_*.py
?eager-dress-66405
11/05/2021, 7:04 AMpybedtools
?freezing-photographer-88553
11/05/2021, 2:21 PMrich-dawn-84724
11/05/2021, 2:40 PMpython_tests
target to to run in series? Using pants 2.7brief-flag-35586
11/05/2021, 6:27 PMloud-laptop-17949
11/05/2021, 7:49 PMcreamy-airplane-38079
11/05/2021, 8:47 PMIntelliJ 2020.2.4
, pants plugin 1.16
, with pants 1.30.5rc1
. It sometimes will work and some other it will run way too long ( before I cancel it). When it does run long and I cancel it I can see the following output
pants --spec-file=/private/var/folders/jl/2530nrx54zl8q3bmz7bcg3yc0000gn/T/pants_target_specs1366.in --no-quiet --export-available-target-types export --output-file=/private/var/folders/jl/2530nrx54zl8q3bmz7bcg3yc0000gn/T/pants_depmap_run2768.out --formatted
Exit code: 120
16:24:41 00:00 [main]
(To run a reporting server: ./pants server)
16:24:47 00:06 [setup]
16:24:47 00:06 [parse]
Executing tasks in goals: bootstrap -> imports -> unpack-jars -> unpack-wheels -> deferred-sources -> native-compile -> link -> gen -> jvm-platform-validate -> pyprep -> export
16:24:48 00:07 [bootstrap]
16:24:48 00:07 [substitute-aliased-targets]
16:24:48 00:07 [jar-dependency-management]
16:24:48 00:07 [bootstrap-jvm-tools]
16:24:48 00:07 [provide-tools-jar]
16:24:48 00:07 [imports]
16:24:48 00:07 [ivy-imports]
16:24:48 00:07 [unpack-jars]
16:24:48 00:07 [unpack-jars]
16:24:48 00:07 [unpack-wheels]
16:24:48 00:07 [unpack-wheels]
16:24:48 00:07 [deferred-sources]
16:24:48 00:07 [deferred-sources]
16:24:48 00:07 [native-compile]
16:24:48 00:07 [conan-prep]
16:24:48 00:07 [conan-fetch]
16:24:48 00:07 [c-for-ctypes]
16:24:48 00:07 [cpp-for-ctypes]
16:24:49 00:08 [link]
16:24:49 00:08 [shared-libraries]
16:24:49 00:08 [gen]
16:24:49 00:08 [protoc]
16:24:49 00:08 [thrift-java]
16:24:49 00:08 [thrift-py]
16:24:49 00:08 [py-thrift-namespace-clash-check]
16:24:49 00:08 [grpcio-prep]
16:24:49 00:08 [grpcio-run]
16:24:49 00:08 [scalapb-gen]
16:24:49 00:08 [jooq-gen]
16:24:49 00:08 [jvm-platform-validate]
16:24:49 00:08 [jvm-platform-validate]
16:24:49 00:08 [pyprep]
16:24:49 00:08 [interpreter]
16:24:49 00:08 [build-local-dists]
16:24:49 00:08 [requirements]
16:24:49 00:08 [sources]
16:24:49 00:08 [export]
16:24:49 00:08 [export]
Waiting for background workers to finish.
16:25:00 00:19 [complete]
SUCCESS
20:24:44 [INFO] initializing pantsd...
20:24:47 [INFO] pantsd initialized.
20:24:47 [WARN] Unmatched glob from products/datalogue/utilities/test/resources:resources's `sources` field: "products/datalogue/utilities/test/resources/*/**"
Seems like its getting stuck after initializing pantsd but have no clue how to debug this or find the root cause. Given this running all within IntelliJ , I am not sure how to add any debug logs to the pants process. Any tips on how I can go about finding the issue ? Can also share the intellij logs if that can be helpfulsilly-byte-14207
11/05/2021, 10:29 PMscrapy runspider myproj/spider/myspider.py
but now I've got:
python_library()
pex_binary(
name="bin",
entry_point="scrapy.cmdline:execute"
)
which will execute scrapy but I can't figure how to pass the runspider myproj/spider/myspider.py
Question 2: Is there a python plugin (or command I missed) that will generate a virtualenv for local development? In the example above I can use pants to generate a pex, but can I use pants to build a virtualenv so I can hack on the project as well? I know I can take a pex and turn that into a virtualenv but was wondering if this is built inhundreds-father-404
11/05/2021, 11:22 PM[GLOBAL]
backend_packages = [
"pants.backend.shell",
"pants.backend.shell.lint.shellcheck",
]
Should maybe just require pants.backend.shell.lint.shellcheck
? Thoughts welcomed! 🧵ambitious-actor-36781
11/08/2021, 12:44 AMgunicorn
) into a .pex
?
setting script="gunicorn"
works... but doesn't allow specifying the myproject.wsgi
argument.narrow-activity-17405
11/08/2021, 8:01 AMambitious-actor-36781
11/09/2021, 3:14 AMpython_library
and the 2.8.0 python_sources
just the name?
it /feels/ like everything works differentlycalm-alarm-89082
11/09/2021, 11:15 AMbitter-ability-32190
11/09/2021, 3:05 PMdazzling-diamond-4749
11/09/2021, 4:55 PMcreamy-airplane-38079
11/09/2021, 9:10 PM