agreeable-carpet-43488
04/21/2024, 2:50 PMwide-midnight-78598
04/21/2024, 3:17 PMagreeable-carpet-43488
04/21/2024, 3:31 PMinstall_from_resolve in [black] for examplehappy-kitchen-89482
04/21/2024, 3:48 PMpants.py27.toml config file that overrides the relevant settings in the regular pants.toml, and then invoke Pants on just the Python 2.7 targets with --pants-configfiles=pants.py27.toml.happy-kitchen-89482
04/21/2024, 3:49 PM--tag=py27happy-kitchen-89482
04/21/2024, 3:50 PMhappy-kitchen-89482
04/21/2024, 3:51 PMpants py27 lint :: expands to pants --tag=py27 --pants-configfiles=pants.py27.toml lint :: which will then only run on the python 2.7 targets, and with the right confighappy-kitchen-89482
04/21/2024, 3:52 PMpants --tag=-py27 lint :: (or a macro that expands to the same) to select everything but the python 2.7 codewide-midnight-78598
04/21/2024, 4:04 PMpants.toml 😆careful-address-89803
04/21/2024, 5:02 PMblack==1.2.3; python<3) might work? I think that will cause both versions of black to be registered in the lockfile, and the right one will be picked by the interpreter constraints of the python files. Not sure though.curved-television-6568
04/22/2024, 5:16 AMhappy-kitchen-89482
04/22/2024, 5:20 AMhappy-kitchen-89482
04/22/2024, 5:20 AMhappy-kitchen-89482
04/22/2024, 5:21 AM--black-install-from-resolve=black-py27happy-kitchen-89482
04/22/2024, 5:21 AMcurved-television-6568
04/22/2024, 7:27 AMagreeable-carpet-43488
04/22/2024, 8:57 AMInvalid requirement 'black==21.12b0;python<3' in foo/black-requirements.txt at line 1: Parse error at "';python<'": Expected string_end
As for the solution suggested by @happy-kitchen-89482, I want both versions to run at the same time (running the lint/build command one) if I understand correctly your solution requires me to have to run pants twice and that's not exactly what I'm looking forcurved-television-6568
04/22/2024, 12:56 PMpython_version<3 .. not sure that'll do it though, as black still seems to require a Py 3.x also when working on Py 2.7 code..curved-television-6568
04/22/2024, 1:51 PM