swift-dawn-80732
02/10/2022, 11:48 PMFailed to resolve for platform linux_x86_64-cp-38-cp38. Resolve requires evaluation of unknown environment marker: 'python_full_version' does not exist in evaluation environment.
I'm using Poetry to manage dependencies. I generated the constraints.txt
file running poetry export --dev --without-hashes -o constraints.txt
, and it contains lines like this:
isort==5.10.1; python_full_version >= "3.6.1" and python_version < "4.0"
which makes me believe that's related to the error. Could that be the case? Appreciate your help, thank you!high-energy-55500
02/11/2022, 2:10 PM[python-bootstrap].search_path
works: it doesn’t seem to care about the order in which arguments are passed?
we support both python 3.8 and 3.9 on our monorepo, and currently explicitly declare these in `pants.toml`:
[python]
interpreter_constraints = [">=3.8,<3.10"]
[python-bootstrap]
search_path = ["<PYENV_LOCAL>", "<PYENV>", "<PATH>"]
names = ["python3.9", "python3.8", "python3", "python"]
m1 macs only work with python 3.9 because of incompatibility issues, but i would expect this not to be a problem since we use pyenv to set the local (and global) python version to be 3.9. however, since python 3.8 is also installed on my machine as part of Xcode’s command line tools, it seems like pants always uses 3.8 from <PATH>
regardless of the order in search_path
(i guess it’s using the paths in alphabetical order?)
pex.environment.ResolveError: A distribution for sqlalchemy could not be resolved in this environment.Found 1 distribution for sqlalchemy that do not apply:
1.) The wheel tags for SQLAlchemy 1.4.31 are cp38-cp38-macosx_10_14_arm64 which do not match the supported tags of DistributionTarget(interpreter=PythonInterpreter('/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/bin/python3.8', PythonIdentity('/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/bin/python3.8', 'cp38', 'cp38', 'macosx_12_0_arm64', (3, 8, 9)))):
the only way i can get pants to use the correct python version is if I set search_path
to not include <PATH>
at all. I would expect that the paths and names are searched in the order they are provided, i.e. first check <PYENV_LOCAL>
for the first of ["python3.9", "python3.8", "python3", "python"]
that exists, next check <PYENV>
, and so onwide-midnight-78598
02/11/2022, 9:00 PM./pants deploy {target}
somewhere? I could swear I saw that at some point in the past - but now I feel like I'm making it upbitter-ability-32190
02/11/2022, 9:59 PM[Step 5/7] ✓ flake8 succeeded.
[21:56:22]
[Step 5/7] mypy failed.
[21:56:22]
[Step 5/7] ✓ pylint succeeded.
From my CI
And in GH PR:
𐄂 ConditionallySucceedsChecker failed.
𐄂 FailingChecker failed.
✓ SuccessfulChecker succeeded.
fresh-cat-90827
02/12/2022, 9:55 PMBUILD
files in PyCharm and VSCode via the Bazel plugin 🙂melodic-thailand-99227
02/13/2022, 6:01 PMpants test
in CI and I want to get the list of failed test in a structured output, but also have the dynamic UI in CI.
Is it possible?hallowed-plastic-91664
02/14/2022, 1:14 AM./pants package ::
or
./pants build ::
while I wait for go + protobuf support, I am wondering if it’s possible to use https://www.pantsbuild.org/docs/run-shell-commands target to compile the proto files manually before processing the go build processfreezing-photographer-88553
02/14/2022, 11:05 AMsrc
├── projects
│ └── one_shot
│ ├── one_shot <------- source code
│ ├── requirements.txt
│ └── test_one_shot <------- test code, requires one_shot and sail to be installed
└── sail <------- old source code
Running ./pants test ./src/projects/one_shot/test_one_shot/test_file.py
will fail because the sail
package is not installed. How can I specify this dependency on first-party code in a BUILD file ?freezing-photographer-88553
02/14/2022, 12:09 PMpolite-garden-50641
02/14/2022, 2:12 PMgo vet
https://pkg.go.dev/cmd/vet supported under pants 2.10 or 2.11 dev releases ? I looked at the docs and I don't see it mentioned there. https://www.pantsbuild.org/v2.11/docs/gofreezing-photographer-88553
02/14/2022, 2:43 PM>> ./pants tests target
[ERROR] 1 Exception encountered:
FileNotFoundError: [Errno 2] No such file or directory: '.cache/pants/setup/bootstrap-Darwin-x86_64/pants.0fpKJL/install/lib/python3.9/site-packages/pants/backend/python/subsystems/pytest_lockfile.txt'
The pytest_lockfile.txt is missing and prevents pants from running tests. Any idea of how to resolve this issue ?freezing-photographer-88553
02/14/2022, 3:27 PMpants tests
. Unfortunately, these binaries are not detected.
Any idea of how to solve this issue ?happy-kitchen-89482
02/14/2022, 5:24 PMhappy-kitchen-89482
02/14/2022, 6:10 PMbig-television-45965
02/14/2022, 9:26 PM./pants publish ...
always fails with denied: requested access to the resource is denied
incalculable-yacht-75851
02/14/2022, 10:19 PM./pants --changed-since=origin/main --changed-dependees=transitive test
but exclude test suites that contain a pattern? (eg *integration*
)polite-secretary-23285
02/15/2022, 4:57 PMIncremental Adoption
-section in the documentation but got stuck at running ./pants count-loc '**'
.
it fails with: BinaryNotFoundError: Cannot find unzip
on ['/bin', '/usr/bin', '/usr/local/bin']
I'm on NixOS and unzip is indeed not located in any of those paths (by design), but it's available through $PATH
.
any hints?better-sunset-63499
02/15/2022, 5:17 PMfile
or resource
that allows pulling from a URL? I see jvm_artifact
has a url=
option for pulling third-party jars, and in a plugin you are given DownloadFile
https://www.pantsbuild.org/docs/rules-api-file-system#downloadfile if you write a custom pluginacoustic-librarian-3937
02/15/2022, 5:35 PM[GLOBAL]
pants_version = "2.9.0"
backend_packages = [
"pants.backend.python.lint.black",
"pants.backend.python.lint.flake8"
]
How do I correctly set up my path such that VS code is able to find the executable for black
and flake8
to allow it to invoke those linters/formatters? I am creating a virtual environment the pre-export way but I don't see black or flake8 binaries in the bin directory for that venvbetter-sunset-63499
02/15/2022, 6:16 PMimport zipfile
def myrule(input: artifact....):
with (zipfile.open(input.relative_path, 'r') as inzip, zipfile.open(input.output_path, 'w') as outzip):
for f in inzip.files:
outzip.write(f.name.replace('someprefix/', ''))
I see the Process
object as a way to execute a shell command, but in this case I can do everything I want in no-deps python. Do I need to write the script and use Process(['python3', 'myscript.py']....)
or is there an easier way?busy-vase-39202
02/15/2022, 10:34 PMhigh-energy-55500
02/16/2022, 12:55 AM./pants dependencies --dependencies-transitive src/path/to/module_A.py
however, i’m trying to understand how another package (module B) is getting called, and i’d like to be able to see the tree from module B to Ahappy-kitchen-89482
02/16/2022, 2:31 AM./pants paths
raises a ValueError if there is not at least one dependency path between the --from and --to targets. I think that it should instead emit an empty list.curved-television-6568
02/16/2022, 8:17 AMpip
related question, fishing for community experiences/knowledge. 🎣polite-secretary-23285
02/16/2022, 8:58 AMechoing-london-29138
02/16/2022, 11:43 AMnarrow-vegetable-37489
02/16/2022, 12:21 PMring
) that I'm not really sure why it's happening from looking at the output. The constraints file comes from poetry export
, and Poetry is able to install the dependency just fine. Logs in thread.polite-secretary-23285
02/16/2022, 2:53 PMlimited-insurance-37393
02/16/2022, 4:39 PMhigh-yak-85899
02/16/2022, 7:24 PMboto3
maps to boto3-stubs
and gets confused on imports. I can go manually add this dependency since it doesn't show up in too many places, but I'm surprised it's getting confused. I even updated my module_mapping
to try to force the resolution, but it wasn't happy.