mach-nix
mach-nix copied to clipboard
refs/tags/3.4.0 - resolvelib # tinycss2 : raise Exception(f"couldn't parse: '{line}'") Exception: couldn't parse: 'tinycss2 (>=1.1.0<1.2) ; extra == 'css''
"refs/tags/3.4.0"
warning: unknown setting 'experimental-features'
warning: unknown setting 'experimental-features'
building '/nix/store/lfw2pk77pz06lbcliv1zyfc60risp8bd-pypi-deps-db.drv'...
building '/nix/store/z1sdv415iv9kc9valkr0xbi56nkz5nr7-mach_nix_file.drv'...
Multiple nixpkgs attributes found for pip-21.1.3: ['bootstrapped-pip', 'pip']
Picking 'pip' as base attribute name.
Traceback (most recent call last):
File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/generate.py", line 110, in <module>
main()
File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/generate.py", line 103, in main
do()
File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/generate.py", line 66, in do
expr = generator.generate(reqs)
File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/generators/overides_generator.py", line 36, in generate
pkgs = self.resolver.resolve(reqs)
File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/resolver/resolvelib_resolver.py", line 55, in resolve
result = resolvelib.Resolver(Provider(self.nixpkgs, self.deps_provider), reporter).resolve(reqs, max_rounds=1000)
File "/nix/store/0pbdnjk3mky2fd3qif5cspy37fzkmkll-python3-3.9.12-env/lib/python3.9/site-packages/resolvelib/resolvers.py", line 413, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/nix/store/0pbdnjk3mky2fd3qif5cspy37fzkmkll-python3-3.9.12-env/lib/python3.9/site-packages/resolvelib/resolvers.py", line 310, in resolve
failure_causes = self._attempt_to_pin_criterion(name, criterion)
File "/nix/store/0pbdnjk3mky2fd3qif5cspy37fzkmkll-python3-3.9.12-env/lib/python3.9/site-packages/resolvelib/resolvers.py", line 223, in _attempt_to_pin_criterion
criteria = self._get_criteria_to_update(candidate)
File "/nix/store/0pbdnjk3mky2fd3qif5cspy37fzkmkll-python3-3.9.12-env/lib/python3.9/site-packages/resolvelib/resolvers.py", line 214, in _get_criteria_to_update
for r in self._p.get_dependencies(candidate):
File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/resolver/resolvelib_resolver.py", line 39, in get_dependencies
install_requires, setup_requires = self.provider.get_pkg_reqs(candidate)
File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/data/providers.py", line 195, in get_pkg_reqs
return provider.get_pkg_reqs(c)
File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/data/providers.py", line 353, in get_pkg_reqs
install_reqs = list(filter_reqs_by_eval_marker(parse_reqs(reqs_raw), self.context_wheel, c.selected_extras))
File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/cache.py", line 14, in cache_wrapper
result = tuple(result)
File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/requirements.py", line 77, in parse_reqs
yield Requirement(*parse_reqs_line(line))
File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/requirements.py", line 143, in parse_reqs_line
raise Exception(f"couldn't parse: '{line}'")
Exception: couldn't parse: 'tinycss2 (>=1.1.0<1.2) ; extra == 'css''
builder for '/nix/store/z1sdv415iv9kc9valkr0xbi56nkz5nr7-mach_nix_file.drv' failed with exit code 1
error: build of '/nix/store/z1sdv415iv9kc9valkr0xbi56nkz5nr7-mach_nix_file.drv' failed
(use '--show-trace' to show detailed location information)
Related to https://github.com/DavHau/mach-nix/pull/419?
Please provide a repro.
Could be due to extra or tinycss2 (>=1.1.0<1.2) is in issue?
I have to search for the package ..
Could be due to extra or tinycss2 (>=1.1.0<1.2) is in issue?
Yeah It's an error of the requirements parser of mach-nix. It cannot deal with the format
I found the package: bleach
Reproduction:
{
description = "python";
inputs = {
pypi-deps-db = {
url = "github:DavHau/pypi-deps-db/cfa5e9c011254570d9296247064c8d65f5a0e93d";
inputs.mach-nix.follows = "mach-nix";
};
mach-nix = {
url = "github:DavHau/mach-nix/3.4.0";
inputs.pypi-deps-db.follows = "pypi-deps-db";
};
};
outputs = { self, nixpkgs, mach-nix, ... }@inputs:
let
l = nixpkgs.lib // builtins;
supportedSystems = [ "x86_64-linux" "aarch64-darwin" ];
forAllSystems = f: l.genAttrs supportedSystems
(system: f system (import nixpkgs {inherit system;}));
in
{
defaultPackage = forAllSystems (system: pkgs: mach-nix.lib."${system}".mkPython {
requirements = "bleach==5.0.0";
});
};
}
Is there a way to fix this locally?
Is there a way to fix this locally?
I suppose adding 'bleach==4.1.0' to your requirements might (might!) be a workaround.
Could be due to extra or tinycss2 (>=1.1.0<1.2) is in issue?
Yeah It's an error of the requirements parser of mach-nix. It cannot deal with the format
Would it be possible, if you're working on that code, to get any information about the package that's failing the parsing in the error message?
It seems to be caused by a missing comma which was fixed just after v5.0.0 and should be fixed once v5.0.1 is released: https://github.com/mozilla/bleach/pull/655
how to use bleach from github "as provider"?
@otaku What does @inputs mean in your code?