nice-florist-55958
03/12/2022, 6:42 PMpex_binary
and anything else involving lockfile resolution.
I wondered if that meant pantsd
might work now on NFS (were there any changes made to the file-watcher? e.g., using poll mechanism instead of NFS-incompatible inotify
?).
Unfortunately, I am getting the following errors (v2.10.0rc2+git40e4c4d
), both on NFS and local file system:
<http://ivapp1341241.howard.ms.com|ivapp1341241.howard.ms.com> /v/global/user/t/ta/taymarti/casper/codetree/codetree/src 89$ pants -ldebug --print-stacktrace package proj/libs/tools
09:53:27.19 [DEBUG] acquiring lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f0c09f76fd0>
09:53:27.21 [DEBUG] purging metadata directory: /a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/casper/codetree/codetree/src/.pids/c2bc7abd26c8/pantsd
09:53:27.21 [DEBUG] Launching pantsd
09:53:27.21 [DEBUG] purging metadata directory: /a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/casper/codetree/codetree/src/.pids/c2bc7abd26c8/pantsd
09:53:27.21 [DEBUG] pantsd command is: PANTS_DAEMON_ENTRYPOINT=pants.pantsd.pants_daemon:launch_new_pantsd_instance PYTHONPATH=/a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/.pex/venvs/5dbaf96a5f6c943ed10da656e547daf24522d0aa/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055:/ms/dist/python/PROJ/core/3.7.5-0/.exec/@sys/lib/python37.zip:/ms/dist/python/PROJ/core/3.7.5-0/.exec/@sys/lib/python3.7:/ms/dist/python/PROJ/core/3.7.5-0/.exec/@sys/lib/python3.7/lib-dynload:/a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/.pex/venvs/s/3e71c54a/venv/lib/python3.7/site-packages: /a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/.pex/venvs/s/3e71c54a/venv/bin/python3.7 /v/global/user/t/ta/taymarti/.pex/venvs/5dbaf96a5f6c943ed10da656e547daf24522d0aa/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/pex -ldebug --print-stacktrace package proj/libs/tools
09:53:29.72 [DEBUG] pantsd is running at pid 6723, pailgun port is 32817
09:53:29.72 [DEBUG] releasing lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f0c09f76fd0>
09:53:29.72 [DEBUG] Connecting to pantsd on port 32817
09:53:29.72 [DEBUG] Connecting to pantsd on port 32817 attempt 1/3
09:53:29.72 [DEBUG] Connected to pantsd
09:53:29.75 [DEBUG] Launching 1 roots (poll=false).
09:53:29.77 [DEBUG] computed 1 nodes in 0.018837 seconds. there are 7 total nodes.
09:53:29.90 [INFO] Initializing scheduler...
09:53:29.92 [DEBUG] File handle limit is: 10000
09:53:30.51 [DEBUG] Changes to /a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/.pex/venvs/5dbaf96a5f6c943ed10da656e547daf24522d0aa/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055, outside of the buildroot, will not be invalidated.
09:53:30.51 [DEBUG] Changes to /a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/.pex/venvs/5dbaf96a5f6c943ed10da656e547daf24522d0aa/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055, outside of the buildroot, will not be invalidated.
09:53:30.51 [DEBUG] Changes to /ms/dist/python/PROJ/core/3.7.5-0/.exec/@sys/lib/python37.zip, outside of the buildroot, will not be invalidated.
09:53:30.51 [DEBUG] Changes to /ms/dist/python/PROJ/core/3.7.5-0/.exec/@sys/lib/python3.7, outside of the buildroot, will not be invalidated.
09:53:30.51 [DEBUG] Changes to /ms/dist/python/PROJ/core/3.7.5-0/.exec/@sys/lib/python3.7/lib-dynload, outside of the buildroot, will not be invalidated.
09:53:30.51 [DEBUG] Changes to /a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/.pex/venvs/s/3e71c54a/venv/lib/python3.7/site-packages, outside of the buildroot, will not be invalidated.
09:53:30.51 [DEBUG] Changes to /a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/casper/codetree/codetree/src, outside of the buildroot, will not be invalidated.
09:53:30.52 [ERROR] no path specified
Traceback (most recent call last):
File "/a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/.pex/venvs/s/3e71c54a/venv/lib/python3.7/site-packages/pants/bin/daemon_pants_runner.py", line 130, in single_daemonized_run
scheduler, options_initializer = self._core.prepare(options_bootstrapper, complete_env)
File "/a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/.pex/venvs/s/3e71c54a/venv/lib/python3.7/site-packages/pants/pantsd/pants_daemon_core.py", line 180, in prepare
scheduler_restart_explanation,
File "/a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/.pex/venvs/s/3e71c54a/venv/lib/python3.7/site-packages/pants/pantsd/pants_daemon_core.py", line 122, in _initialize
raise e
File "/a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/.pex/venvs/s/3e71c54a/venv/lib/python3.7/site-packages/pants/pantsd/pants_daemon_core.py", line 116, in _initialize
self._services = self._services_constructor(bootstrap_options, self._scheduler)
File "/a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/.pex/venvs/s/3e71c54a/venv/lib/python3.7/site-packages/pants/pantsd/pants_daemon.py", line 85, in _setup_services
bootstrap_options,
File "/a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/.pex/venvs/s/3e71c54a/venv/lib/python3.7/site-packages/pants/option/global_options.py", line 1572, in compute_pantsd_invalidation_globs
glob_relpath = os.path.relpath(glob, buildroot)
File "/ms/dist/python/PROJ/core/3.7.5-0/.exec/@sys/lib/python3.7/posixpath.py", line 457, in relpath
raise ValueError("no path specified")
ValueError: no path specified
See <https://www.pantsbuild.org/v2.10/docs/troubleshooting> for common issues.
Consider reaching out for help: <https://www.pantsbuild.org/v2.10/docs/getting-help>
<http://ivapp1341241.howard.ms.com|ivapp1341241.howard.ms.com> /v/global/user/t/ta/taymarti/casper/codetree/codetree/src 90$ export HOME=/var/tmp/taymarti
<http://ivapp1341241.howard.ms.com|ivapp1341241.howard.ms.com> /v/global/user/t/ta/taymarti/casper/codetree/codetree/src 91$ mkdir -p /var/tmp/taymarti
<http://ivapp1341241.howard.ms.com|ivapp1341241.howard.ms.com> /v/global/user/t/ta/taymarti/casper/codetree/codetree/src 92$ pants -ldebug --print-stacktrace package proj/libs/tools
09:54:02.76 [DEBUG] acquiring lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7fafb5b4fe50>
09:54:02.79 [DEBUG] purging metadata directory: /a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/casper/codetree/codetree/src/.pids/c2bc7abd26c8/pantsd
09:54:02.79 [DEBUG] Launching pantsd
09:54:02.79 [DEBUG] purging metadata directory: /a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/casper/codetree/codetree/src/.pids/c2bc7abd26c8/pantsd
09:54:02.79 [DEBUG] pantsd command is: PANTS_DAEMON_ENTRYPOINT=pants.pantsd.pants_daemon:launch_new_pantsd_instance PYTHONPATH=/var/tmp/taymarti/.pex/venvs/5dbaf96a5f6c943ed10da656e547daf24522d0aa/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055:/ms/dist/python/PROJ/core/3.7.5-0/.exec/@sys/lib/python37.zip:/ms/dist/python/PROJ/core/3.7.5-0/.exec/@sys/lib/python3.7:/ms/dist/python/PROJ/core/3.7.5-0/.exec/@sys/lib/python3.7/lib-dynload:/var/tmp/taymarti/.pex/venvs/s/d4b17305/venv/lib/python3.7/site-packages: /var/tmp/taymarti/.pex/venvs/s/d4b17305/venv/bin/python3.7 /var/tmp/taymarti/.pex/venvs/5dbaf96a5f6c943ed10da656e547daf24522d0aa/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055/pex -ldebug --print-stacktrace package proj/libs/tools
09:54:04.70 [DEBUG] pantsd is running at pid 6917, pailgun port is 45659
09:54:04.70 [DEBUG] releasing lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7fafb5b4fe50>
09:54:04.70 [DEBUG] Connecting to pantsd on port 45659
09:54:04.71 [DEBUG] Connecting to pantsd on port 45659 attempt 1/3
09:54:04.71 [DEBUG] Connected to pantsd
09:54:04.73 [DEBUG] Launching 1 roots (poll=false).
09:54:04.75 [DEBUG] computed 1 nodes in 0.018034 seconds. there are 7 total nodes.
09:54:04.86 [INFO] Initializing scheduler...
09:54:04.88 [DEBUG] File handle limit is: 10000
09:54:05.00 [DEBUG] Changes to /var/tmp/taymarti/.pex/venvs/5dbaf96a5f6c943ed10da656e547daf24522d0aa/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055, outside of the buildroot, will not be invalidated.
09:54:05.00 [DEBUG] Changes to /var/tmp/taymarti/.pex/venvs/5dbaf96a5f6c943ed10da656e547daf24522d0aa/779eb2cc0ca9e2fdd204774cbc41848e4e7c5055, outside of the buildroot, will not be invalidated.
09:54:05.00 [DEBUG] Changes to /ms/dist/python/PROJ/core/3.7.5-0/.exec/@sys/lib/python37.zip, outside of the buildroot, will not be invalidated.
09:54:05.00 [DEBUG] Changes to /ms/dist/python/PROJ/core/3.7.5-0/.exec/@sys/lib/python3.7, outside of the buildroot, will not be invalidated.
09:54:05.00 [DEBUG] Changes to /ms/dist/python/PROJ/core/3.7.5-0/.exec/@sys/lib/python3.7/lib-dynload, outside of the buildroot, will not be invalidated.
09:54:05.00 [DEBUG] Changes to /var/tmp/taymarti/.pex/venvs/s/d4b17305/venv/lib/python3.7/site-packages, outside of the buildroot, will not be invalidated.
09:54:05.00 [DEBUG] Changes to /a/nyn183f2/vol/nyn183f2v18/u_t1445795813/taymarti/casper/codetree/codetree/src, outside of the buildroot, will not be invalidated.
09:54:05.00 [ERROR] no path specified
Traceback (most recent call last):
File "/var/tmp/taymarti/.pex/venvs/s/d4b17305/venv/lib/python3.7/site-packages/pants/bin/daemon_pants_runner.py", line 130, in single_daemonized_run
scheduler, options_initializer = self._core.prepare(options_bootstrapper, complete_env)
File "/var/tmp/taymarti/.pex/venvs/s/d4b17305/venv/lib/python3.7/site-packages/pants/pantsd/pants_daemon_core.py", line 180, in prepare
scheduler_restart_explanation,
File "/var/tmp/taymarti/.pex/venvs/s/d4b17305/venv/lib/python3.7/site-packages/pants/pantsd/pants_daemon_core.py", line 122, in _initialize
raise e
File "/var/tmp/taymarti/.pex/venvs/s/d4b17305/venv/lib/python3.7/site-packages/pants/pantsd/pants_daemon_core.py", line 116, in _initialize
self._services = self._services_constructor(bootstrap_options, self._scheduler)
File "/var/tmp/taymarti/.pex/venvs/s/d4b17305/venv/lib/python3.7/site-packages/pants/pantsd/pants_daemon.py", line 85, in _setup_services
bootstrap_options,
File "/var/tmp/taymarti/.pex/venvs/s/d4b17305/venv/lib/python3.7/site-packages/pants/option/global_options.py", line 1572, in compute_pantsd_invalidation_globs
glob_relpath = os.path.relpath(glob, buildroot)
File "/ms/dist/python/PROJ/core/3.7.5-0/.exec/@sys/lib/python3.7/posixpath.py", line 457, in relpath
raise ValueError("no path specified")
ValueError: no path specified
strong-toothbrush-37759
03/13/2022, 6:23 PMrequirements-dev.txt
) and actual dependencies (living in requirements.txt
). Do I understand correctly, that with Pants we don’t need that Schema anymore, since the BUILD or the dependency inference will package all needed dependencies within the PEX-File?
What is odd in the phase of migration right now is that tailor
is generating a conflicting python_requirements()
inside the src/BUILD
file right now. I understand from the documentation that I can make tailor
ignore the generation using ignore_adding_targets
, but is that really what I need to do in my situation?
Right now after running ./pants tailor
and linting with ./pants lint ::
I get the following error message:
❯ ./pants lint ::
19:19:05.32 [ERROR] 1 Exception encountered:
DuplicateNameError: A target already exists at 'src/BUILD' with name 'pytest' and target type 'python_requirement'. The 'python_requirement' target cannot use the same name.
So here’s the stupid question? Can I give the python_requirement target a name? The documentation has no field about this. 🙂strong-toothbrush-37759
03/13/2022, 8:34 PM./pants test src/core/tests/test_companies.py
for example.
Question #1: In the example-django repo, the tests were placed in a models_test.py
. When I have nested testing folders for submodules of a module, what is the best way to formulate a BUILD file inside of the module? Do I adjust the core
BUILD file with sources=["tests/**/test_*.py"]
or should I not worry at all and let tailor create all the BUILD-files?
Question #2: I’m getting an error which I think tells me that I need to configure root_patterns
correctly. The error is:
Exception: String("Can only merge Directories with no duplicates, but found 2 duplicate entries in :\n\n`pyproject.toml` 1.) file digest=9d7d5d9df3e4ae5a4842a380891776c10adfc04ffdf0d48728db8ff4e7a05943 size=1006 ... 2.) file digest=55e6c945374e7d8f58b1d90e4dc00dee93a906850e953db2512938ead8b84fef size=994
I’m gonna post an example of our project-structure inside the thread here to not spam #general too much. The question is: How do I setup source-roots
correctly? I’ve read the documentation about source-roots a couple of times now, but I’m not really sure what’s the optimal way. Maybe this error is again me missing an error inside of our pyproject.toml
, but I hope it’s not 😅 .acceptable-football-32760
03/14/2022, 12:15 PM./pants package ::
reruns the whole built when invoked from a new terminal window? I'm trying to make it reuse the existing runs cache etc. No changes was made to the [GLOBAL]
section apart from the following settings - with bunch of o
[GLOBAL]
dynamic_ui = false
pants_version = "2.10.0rc1"
backend_packages = [
"pants.backend.plugin_development",
"pants.backend.python.lint.black",
"pants.backend.python.lint.isort",
"pants.backend.python.typecheck.mypy",
"pants.backend.python",
"deploy_package",
"torch_requirement",
"mypy_requirement",
]
build_patterns = ["BUILD.pants"]
pythonpath = ["%(buildroot)s/tools/pants/pants-plugins"]
# NOTE: this is needed after pantsbuild v2.11
use_deprecated_python_macros = false
Then I run ./pants package ::
from one tmux pane, then create another pane and run it there. In both cases it rebuilds everything from scratch.
Maybe a more generalized question - what environment goes into the definition of "cache hit" (sorry for potentially sloppy terminology!) -- this knowledge is useful to me in case I want to invoke pants from somewhere else.bitter-ability-32190
03/14/2022, 6:47 PMswift-chef-48262
03/14/2022, 8:35 PMhigh-yak-85899
03/14/2022, 10:10 PMIn-repo plugin code should not depend on other in-repo code outside of theThis seems really prohibitive to developing new plugins. I have some custom code generation that uses other internal libraries to verify the generated code along the way among other things. I'm curious what's recommended for cases like this.folder. Thepants-plugins
folder helps isolate plugins from regular code, which is necessary due to how Pants's startup sequence workspants-plugins
hundreds-father-404
03/14/2022, 10:11 PMicy-hair-30586
03/15/2022, 8:22 AMrequirements=["x==1.0.1"],
, and i would like to build a docker image with FROM x-1.0.1-py3.8
. I’ve figured out how to do it through docker build args, but that involves a pants peek
and some command line wrangling. Any recommendations for a simpler way to do it?strong-toothbrush-37759
03/15/2022, 10:46 AM❯ p test src/core/tests/test_pants.py
11:43:37.19 [INFO] Filesystem changed during run: retrying `Test` in 500ms...
11:43:37.19 [INFO] Canceled: Building requirements.pex with 23 requirements: ...
11:43:38.00 [INFO] Filesystem changed during run: retrying `Test` in 500ms...
11:43:38.00 [INFO] Canceled: Building requirements.pex with 23 requirements: ...
11:43:54.38 [INFO] Filesystem changed during run: retrying `Test` in 500ms...
11:43:54.44 [INFO] Canceled: Building requirements.pex with 23 requirements: ...
11:43:57.25 [INFO] Canceled: Building requirements.pex with 23 requirements: ...
11:43:57.25 [INFO] Filesystem changed during run: retrying `Test` in 500ms...
11:44:26.75 [INFO] Completed: Building requirements.pex with 23 requirements: ...
strong-toothbrush-37759
03/15/2022, 12:00 PMPants
🙌 🚀 🎉 ! It’s running the tests on the development (not test) database and I needed to craft a lot of things manually, but at least this is like the first big success for me with Pants! 👖 THANKS a lot to everyone who helped me the last couple of days 😄 I’m sure to bug you a little more with questions as they arise.wide-zoo-86070
03/15/2022, 2:27 PMpants.option.errors.ParseError: Error computing value for --requirement-constraints in scope 'python' (may also be from PANTS_* environment variables).
Caused by:
File value `constraints.txt` for option `requirement_constraints` in `scope 'python'` does not exist.
curved-manchester-66006
03/15/2022, 3:13 PMpants export
, but there isn't any magic 'out of the box'. Is that right? (I saw https://github.com/pantsbuild/pants/issues/13260)
• Pants itself is bootstrapped as a python app with a rust core (python code calling rust), but there isn't a blessed/official/supported way to have python targets depending on rust targets today?happy-kitchen-89482
03/15/2022, 3:50 PMambitious-student-81104
03/15/2022, 4:55 PMthe idea is that there would a build-time container, and the pex would be built in that, and then copied into the deployment image, which is what theIs this build-time container gonna have all the source code needed and be re-used to build whatever we need to deploy?target describesdocker_image
busy-vase-39202
03/15/2022, 5:12 PMacceptable-football-32760
03/15/2022, 10:02 PMexclusive
test (meaning it will be invoked not in parallel with other build targets). So basically I tried my best to delegate stuff exclusively to pants so that no two invocations run.
It works like a charm, yet from time to time (really really rarely so I can't track it down) I get the error in CI:
16:27:43.55 [INFO] Completed: Building build_backend.pex from setuptools_default_lockfile.txt
16:27:43.57 [ERROR] 1 Exception encountered:
Exception: Failed to execute: Process {
argv: [
"../build_backend.pex_pex_shim.sh",
"backend_shim.py",
],
env: {},
working_directory: Some(
RelativePath(
"chroot",
),
),
input_digests: InputDigests {
complete: Digest {
hash: Fingerprint<23502f8ccd2f9a66600309139bc0bcf8fbb26194c30736d49fd8574d916fb665>,
size_bytes: 392,
},
nailgun: Digest {
hash: Fingerprint<e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855>,
size_bytes: 0,
},
input_files: Digest {
hash: Fingerprint<23502f8ccd2f9a66600309139bc0bcf8fbb26194c30736d49fd8574d916fb665>,
size_bytes: 392,
},
immutable_inputs: {},
use_nailgun: [],
},
output_files: {},
output_directories: {
RelativePath(
"dist",
),
},
timeout: None,
execution_slot_variable: None,
concurrency_available: 0,
description: "Run setuptools.build_meta:__legacy__ for //:devtools",
level: Debug,
append_only_caches: {
CacheName(
"pex_root",
): RelativePath(
".cache/pex_root",
),
},
jdk_home: None,
platform_constraint: None,
cache_scope: Successful,
}
Error launching process: Os { code: 26, kind: ExecutableFileBusy, message: "Text file busy" }
I saw e.g. this https://github.com/pantsbuild/pants/issues/10507 but it seems closed. I know what I'm doing there (putting one build system as a step of another) is really a hack but that's how we currently live, and I know there are too many unknowns that I didn't provide in this post, -- so I just try my luck here - can it be there are some potential explanations for that?
Thank you, pants is amazing, I wish C++ is there once, too 🙂 And we'll drop bazel alltogetherred-account-49986
03/16/2022, 9:58 AM./pants test foo/tests::
, pants apparently runs pytest individually on every test file inside that folder. I guess this is to allow parallel test execution. However, then the output also looks like running pytest individually, e.g. I have one pytest summary printed to terminal per test file and one pytest html report generated per test file if I use the pytest-html plugin. I would rather prefer it to behave like pytest is being run on all files at once, even if I lose parallel execution. I have found a screenshot of an older version of v2 here https://github.com/pantsbuild/pants/pull/9594 where the output looks exactly like I expect it (one test summary for multiple files), but I'm not sure if/how I can achieve that in the current pants version?wide-zoo-86070
03/16/2022, 1:59 PM[black]
version = 'black==19.10b0'
lockfile = 'black_lockfile.txt'
[python-repos]
indexes = "['<http://xyz.com/artifactory/api/pypi/pypi-abc/simple>', '<http://xyz.fg.rbc.com/artifactory/api/pypi/pypi/simple>']"
However, i see the following error which seems it does not go to customized artifactory.
Process 'Generate lockfile for black' failed with exit code 1.
HTTPSConnectionPool(host='<http://pypi.org|pypi.org>', port=443): Max retries exceeded with url: /pypi/19.10b0/json
ambitious-student-81104
03/16/2022, 3:44 PMrefined-addition-53644
03/16/2022, 5:07 PMprophet
which has dependency on pystan
when running tests using pants.
Please see the 🧵high-yak-85899
03/16/2022, 5:53 PMentry_points
capability that exists with setup.py
in pants? Maybe like some kind of path alias or something in pants.toml
?bland-father-19717
03/17/2022, 5:26 AM./pants export ::
command, but is it possible to export the [mypy].extra_type_stubs
in pants.yaml as well?rapid-crayon-8232
03/17/2022, 9:21 AMpytest
as a dependency in your requirements.txt
and you import pytest
in your test files or conftest.py
so it is discovered by dependency inference, what pytest distribution is used for the tests ? the global defined in pants.toml
or the one in the user defined lock file ?
I know It's confusing adding pytest
as a dependency, but the main use case is for IDE support, ie: when running ./pants export //:poetry
, I'd like to have black
, isort
, pytest
, ... exported toorapid-crayon-8232
03/17/2022, 10:43 AMInstalling lock.txt for the resolve 'default'
I've tried with ./pants --no-python-resolve-all-constraints package monorepo/my_lib:cli
But it is still installing the whole resolve (as per the logs^^)
I'm on version 2.10.0rc4
refined-addition-53644
03/17/2022, 1:01 PMpython_requirement
target using a local .tar.gz
distribution? You can do this with pip install local.tar.gz
rapid-crayon-8232
03/17/2022, 2:14 PMYou can also install from local files using PEP 440 direct references. You must use an absolute path to the file, and you should ensure that the file exists on your machine.
Copy codeDjango @ file:///Users/pantsbuild/prebuilt_wheels/django-3.1.1-py3-none-any.whl
wide-zoo-86070
03/17/2022, 3:07 PMa.py
import x
import y
import z
......
......
when I do ./pants dependencies a.py
. I only see x
and y
, but not z
. Then I started to investigate more. First, If I do ./pants list :
, I do see //:z
, which suggests me that pants does know z
which is from requirements.txt
. Second, I add --no-process-execution-local-cleanup
flag to the ./pants dependencies
, then go to the cached folder. When I run __run.sh
in that folder, I do see z
in the output. It suggest me that z
should be treated as a dependency in a.py
. I am wondering why ./pants dependencies a.py
does not show z
. I took a look at https://www.pantsbuild.org/docs/troubleshooting#import-errors-and-missing-dependencies but i am not sure if any of them applies here.hundreds-father-404
03/17/2022, 3:27 PMgenerate-lockfiles
goal in Pants 2.10 and 2.11, so you'd to manually generate the locks if you use a lockfile (which we recommend) https://www.pantsbuild.org/v2.10/docs/python-third-party-dependencies#generate-lockfiles-goal-vs-manual-lockfile-generation
Pants 2.11 or 2.12 will hopefully add support for VCS (git) and local path requirements to locks, thanks to switching to Pex for lockfiles rather than Poetryhundreds-father-404
03/17/2022, 4:19 PMcontext_aware_object_factories
or objects
in their repo? If so, please let us know - we're trying to figure out the future of those APIs