nixpkgs/pkgs/development/interpreters
Pierre Bourdon 1f197e240e
pythonRelaxDepsHook: improve Requires-Dist parsing
Prior to this commit, pythonRelaxDeps would only support removing
version constraints from "Requires-Dist" lines formatted in a particular
way ("foo (>= 1.2.3)"). This way is deprecated as per PyPA Core Metadata
Specs v2.1 [1]:

> Tools parsing the format should accept optional parentheses around
> this, but tools generating it should not use parentheses.

Additionally, a "Requires-Dist" dependency specification can contain
other metadata than just package name and version (extra names,
environment marker). These were being silently dropped by the prior
version of pythonRelaxDeps, or the version could not be relaxed.

The actual grammar is defined in PEP 508 [2]. Our tool of choice here is
sed extended regexps, so there's only so much we can do to be correct
with this parser. The regexp implemented in this commit makes an attempt
at supporting [extra] names, ; env_markers, as well as version specs
without parentheses. There are still unsupported features (URL specs) as
well as unhandled edge cases, but at some point trying to make the
regexp better is bound to awake ZALGO [3].

[1] https://packaging.python.org/en/latest/specifications/core-metadata/#requires-dist-multiple-use
[2] https://peps.python.org/pep-0508/#grammar
[3] https://stackoverflow.com/a/1732454/179806
2022-10-31 17:05:12 +01:00
..
acl2 treewide: *Flags convert to list from str 2022-10-10 15:30:59 +03:00
alda
angelscript angelscript: 2.35.1 -> 2.36.0 2022-10-01 07:36:39 +00:00
asmrepl
bats bats: 1.8.0 -> 1.8.2 2022-10-20 05:14:03 +00:00
bic
boron boron: init at 2.0.8 2022-07-16 19:59:30 +01:00
bqn cbqn: pass adjusted linker flags for darwin 2022-10-10 12:01:02 +02:00
bwbasic
ceptre
cg3 cg3: 1.3.7 -> 1.3.9 2022-10-08 18:06:15 +08:00
chibi
cling cling: use makeWrapper for build platform 2022-08-14 00:17:01 +03:00
clips
clisp clisp hg: remove tohl from meta.maintainers list 2022-10-23 01:19:49 -03:00
clojure clojure: 1.11.1.1177 -> 1.11.1.1182 2022-10-26 06:45:54 +00:00
cyclone
dart dart: set sourceProvenance to binaryNativeCode 2022-10-15 16:07:45 +01:00
dhall
duktape duktape: force link shared library against libm 2022-07-22 17:05:42 +08:00
dzaima-apl
eff
elixir elixir_1_14: 1.14.0 -> 1.14.1 2022-10-11 18:45:15 -04:00
erlang erlangR22: mark with knownVulnerabilities CVE-2022-37026 2022-10-01 09:00:26 +09:00
evcxr evcxr: 0.14.0 -> 0.14.1 2022-10-29 17:05:27 +00:00
falcon
gauche
gnu-apl
gnudatalanguage gnudatalanguage: fix build on aarch64-darwin 2022-10-11 08:22:46 +02:00
groovy
gtk-server gtk-server: remove tohl from meta.maintainers list 2022-10-23 01:22:31 -03:00
guile guile_3_0: Enable parallel build when not cross-compiling 2022-08-27 13:51:04 -07:00
hashlink hashlink: add x86_64-darwin compatibility (#193580) 2022-10-01 23:41:52 +02:00
hugs
icon-lang
io treewide: move pkg-config, autoreconfHook, intltool to nativeBuildInputs 2022-09-26 17:53:26 +03:00
ivy ivy: 0.1.13 -> 0.2.8 2022-10-08 22:25:22 -04:00
j treewide: use isAarch where appropriate 2022-07-30 16:18:27 +00:00
janet janet: build fixed on darwin 2022-09-18 10:35:39 +10:00
jelly
jimtcl
joker joker: 1.0.1 -> 1.0.2 2022-10-25 17:34:04 +00:00
jruby jruby: 9.3.7.0 -> 9.3.8.0 2022-09-21 08:09:13 +00:00
jython jython: 2.7.2b3 -> 2.7.3 2022-09-21 08:09:31 +00:00
kerf treewide: optional -> optionals where the argument is a list 2022-10-10 15:40:21 +03:00
kona
lfe treewide: makeWrapper buildInputs to nativeBuildInputs 2022-08-16 13:14:19 +03:00
lolcode
love
lua-5 Merge master into staging-next 2022-10-14 00:04:53 +00:00
luajit luajit_2_1: 2.1.0-2022-04-05 -> 2.1.0-2022-10-04 2022-10-08 05:45:16 +00:00
luau luau: 0.550 -> 0.551 2022-10-29 04:20:00 +00:00
lunatic lunatic: 0.10.0 -> 0.10.1 2022-09-26 08:59:49 -04:00
maude treewide: makeWrapper buildInputs to nativeBuildInputs 2022-08-16 13:14:19 +03:00
metamath
micropython micropython: 1.19 -> 1.19.1 2022-07-31 23:55:17 +00:00
mujs
nextflow nextflow: 21.10.6 -> 22.04.5 2022-07-29 02:12:24 +00:00
ngn-k
nickel nickel: 0.2.0 -> 0.2.1 2022-08-10 21:00:18 +00:00
npiet
oak
octave
perl perl: fix build with libxcrypt 2022-10-09 18:07:54 +02:00
php php81: 8.1.11 -> 8.1.12 2022-10-29 08:34:15 +02:00
picoc
picolisp picolisp: remove tohl 2022-10-23 11:36:17 -03:00
python pythonRelaxDepsHook: improve Requires-Dist parsing 2022-10-31 17:05:12 +01:00
python-cosmopolitan treewide: *Flags convert to list from str 2022-10-10 15:30:59 +03:00
qnial qnial: fix build with libxcrypt 2022-10-09 18:10:42 +02:00
quickjs
racket treewide: optional -> optionals where the argument is a list 2022-10-10 15:40:21 +03:00
rakudo zef: 0.13.8 -> 0.14.2 2022-09-22 05:59:02 +00:00
rascal
red
regina
renpy renpy: 8.0.1 -> 8.0.3 2022-09-15 10:08:06 +08:00
ruby ruby: move towards ruby 3 2022-10-06 17:09:38 +02:00
s9fes
scheme48
scsh
self
shen-sbcl
shen-sources
sollya
spidermonkey treewide: optional -> optionals where the argument is a list 2022-10-10 15:40:21 +03:00
starlark starlark: unstable-2022-03-02 -> 2022-08-17 2022-09-11 17:54:45 +02:00
supercollider
tcl
tclreadline
tinyscheme tinyscheme: set mainProgram 2022-07-18 22:27:23 -05:00
trealla trealla: 1.20.31 -> 2.2.6 2022-09-25 01:51:06 -05:00
unicon-lang unicon-lang: fix build with libxcrypt 2022-10-09 18:10:43 +02:00
wasm3 wasm3: add many knownVulnerabilities 2022-09-25 18:02:35 +01:00
wasmer wasmer: 2.1.1 -> 2.3.0 2022-07-31 05:56:06 +00:00
wasmtime wasmtime: 2.0.0 -> 2.0.1 2022-10-28 00:44:32 +00:00
yabasic yabasic: 2.90.1 -> 2.90.2 2022-08-02 08:19:11 +00:00
yex-lang
zuo zuo: 2022-04-23 -> 2022-07-25 2022-07-26 04:20:00 +00:00