https://pantsbuild.org/ logo
#general
Title
# general
b

bland-father-19717

08/10/2022, 8:32 AM
I commented on a closed issue about a problem with trying to use tensorflow that doesn’t work. https://github.com/pantsbuild/pants/issues/16055#issuecomment-1210154370
e

enough-analyst-54434

08/10/2022, 3:57 PM
The suggestion there still works. You may not have known about the special `%(buildroot)s`substitution avaiable in `pants.toml`config files. I specialized the recommendation on the ticket to exactly what you're trying to do.
b

bland-father-19717

08/10/2022, 4:00 PM
Thank you. Also, just a minor detail, is
pip wheel
in 1.) correct
pip download
?
e

enough-analyst-54434

08/10/2022, 4:09 PM
pip wheel
is correct. The distribution might be available as sdist-only (for example: https://pypi.org/project/cowsay/5.0/#files) in which case you want Pip to turn it into a wheel for you.
b

bland-father-19717

08/10/2022, 4:15 PM
I get the following error when I run it, is this a problem with the environment?
Copy code
$ pip wheel --dest find-links-repo termcolor==1.1

Usage:   
  pip wheel [options] <requirement specifier> ...
  pip wheel [options] -r <requirements file> ...
  pip wheel [options] [-e] <vcs project url> ...
  pip wheel [options] [-e] <local project path> ...
  pip wheel [options] <archive url/path> ...

no such option: --dest
e

enough-analyst-54434

08/10/2022, 4:24 PM
My apologies, but also,
--help
is your friend. It's
--wheel-dir
not
--dest-dir
.
đź‘Ť 1
b

bland-father-19717

08/10/2022, 4:27 PM
Sorry, I haven’t used wheel much and wasn’t sure. Thanks for the detailed explanation. I will try the method you suggested.
Thank you. I tried the method you suggested and it worked. Very helpful!
One problem occurred. I ran “.pant generate-lockfiles” in my local environment, generated lockfile, committed the generated file to Github, and built it with CI and it failed! “. /pants generate-lockfiles” will create a lockfile as follows, and the lockfile will contain the absolute path of the environment in which generate-lockfiles was run. Is there any workaround or solution to this?
Copy code
{
          "artifacts": [
            {
              "algorithm": "sha256",
              "hash": "2c4b2fc5aece485b791405c8f96c67c35c25ed503f248ec68d0df2c4964267ec",
              "url": "file:///path/to/rootdir/thirdparty/python/wheels/termcolor-1.1.0-py3-none-any.whl"
            },
            {
              "algorithm": "sha256",
              "hash": "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b",
              "url": "<https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz>"
            }
          ],
          "project_name": "termcolor",
          "requires_dists": [],
          "requires_python": null,
          "version": "1.1"
        },
@enough-analyst-54434 Thanks for your help!
3 Views