Merge pull request #174000 from mweinelt/pep621-optional-dependencies

main
Martin Weinelt 2 years ago committed by GitHub
commit bc38fcac7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      doc/languages-frameworks/python.section.md
  2. 2
      pkgs/applications/networking/syncplay/default.nix
  3. 2
      pkgs/applications/office/paperless-ngx/default.nix
  4. 4
      pkgs/development/python-modules/Mako/default.nix
  5. 6
      pkgs/development/python-modules/adb-shell/default.nix
  6. 8
      pkgs/development/python-modules/androidtv/default.nix
  7. 6
      pkgs/development/python-modules/autobahn/default.nix
  8. 2
      pkgs/development/python-modules/buildbot/default.nix
  9. 2
      pkgs/development/python-modules/clize/default.nix
  10. 2
      pkgs/development/python-modules/dask/default.nix
  11. 2
      pkgs/development/python-modules/datashader/default.nix
  12. 4
      pkgs/development/python-modules/django_modelcluster/default.nix
  13. 2
      pkgs/development/python-modules/fastapi/default.nix
  14. 10
      pkgs/development/python-modules/flask-security-too/default.nix
  15. 6
      pkgs/development/python-modules/httpcore/default.nix
  16. 2
      pkgs/development/python-modules/httpx-socks/default.nix
  17. 8
      pkgs/development/python-modules/httpx/default.nix
  18. 4
      pkgs/development/python-modules/ibis-framework/default.nix
  19. 2
      pkgs/development/python-modules/ldaptor/default.nix
  20. 4
      pkgs/development/python-modules/magic-wormhole-mailbox-server/default.nix
  21. 4
      pkgs/development/python-modules/magic-wormhole/default.nix
  22. 8
      pkgs/development/python-modules/passlib/default.nix
  23. 4
      pkgs/development/python-modules/pure-python-adb/default.nix
  24. 4
      pkgs/development/python-modules/pygatt/default.nix
  25. 4
      pkgs/development/python-modules/python-barcode/default.nix
  26. 4
      pkgs/development/python-modules/pytradfri/default.nix
  27. 6
      pkgs/development/python-modules/rdflib/default.nix
  28. 2
      pkgs/development/python-modules/redis/default.nix
  29. 4
      pkgs/development/python-modules/relatorio/default.nix
  30. 4
      pkgs/development/python-modules/requests-aws4auth/default.nix
  31. 2
      pkgs/development/python-modules/samsungctl/default.nix
  32. 6
      pkgs/development/python-modules/samsungtvws/default.nix
  33. 2
      pkgs/development/python-modules/treq/default.nix
  34. 6
      pkgs/development/python-modules/trytond/default.nix
  35. 2
      pkgs/development/python-modules/twisted/default.nix
  36. 2
      pkgs/development/python-modules/txtorcon/default.nix
  37. 4
      pkgs/development/python-modules/vivisect/default.nix
  38. 4
      pkgs/development/python-modules/volvooncall/default.nix
  39. 2
      pkgs/development/tools/devpi-server/default.nix
  40. 18
      pkgs/servers/home-assistant/component-packages.nix
  41. 6
      pkgs/servers/home-assistant/parse-requirements.py
  42. 2
      pkgs/servers/radicale/3.x.nix
  43. 4
      pkgs/tools/networking/p2p/tahoe-lafs/default.nix
  44. 4
      pkgs/tools/security/wapiti/default.nix

@ -982,12 +982,13 @@ in python.withPackages(ps: [ps.blaze])).env
#### Optional extra dependencies #### Optional extra dependencies
Some packages define optional dependencies for additional features. With Some packages define optional dependencies for additional features. With
`setuptools` this is called `extras_require` and `flit` calls it `extras-require`. A `setuptools` this is called `extras_require` and `flit` calls it
`extras-require`, while PEP 621 calls these `optional-dependencies`. A
method for supporting this is by declaring the extras of a package in its method for supporting this is by declaring the extras of a package in its
`passthru`, e.g. in case of the package `dask` `passthru`, e.g. in case of the package `dask`
```nix ```nix
passthru.extras-require = { passthru.optional-dependencies = {
complete = [ distributed ]; complete = [ distributed ];
}; };
``` ```
@ -997,7 +998,7 @@ and letting the package requiring the extra add the list to its dependencies
```nix ```nix
propagatedBuildInputs = [ propagatedBuildInputs = [
... ...
] ++ dask.extras-require.complete; ] ++ dask.optional-dependencies.complete;
``` ```
Note this method is preferred over adding parameters to builders, as that can Note this method is preferred over adding parameters to builders, as that can

@ -14,7 +14,7 @@ buildPythonApplication rec {
}; };
propagatedBuildInputs = [ twisted certifi ] propagatedBuildInputs = [ twisted certifi ]
++ twisted.extras-require.tls ++ twisted.optional-dependencies.tls
++ lib.optional enableGUI pyside2; ++ lib.optional enableGUI pyside2;
nativeBuildInputs = lib.optionals enableGUI [ qt5.wrapQtAppsHook ]; nativeBuildInputs = lib.optionals enableGUI [ qt5.wrapQtAppsHook ];

@ -122,7 +122,7 @@ py.pkgs.pythonPackages.buildPythonApplication rec {
threadpoolctl threadpoolctl
tika tika
tqdm tqdm
twisted.extras-require.tls twisted.optional-dependencies.tls
txaio txaio
tzlocal tzlocal
urllib3 urllib3

@ -30,7 +30,7 @@ buildPythonPackage rec {
markupsafe markupsafe
]; ];
passthru.extras-require = { passthru.optional-dependencies = {
babel = [ babel = [
babel babel
]; ];
@ -39,7 +39,7 @@ buildPythonPackage rec {
checkInputs = [ checkInputs = [
pytestCheckHook pytestCheckHook
mock mock
] ++ passthru.extras-require.babel; ] ++ passthru.optional-dependencies.babel;
disabledTests = lib.optionals isPyPy [ disabledTests = lib.optionals isPyPy [
# https://github.com/sqlalchemy/mako/issues/315 # https://github.com/sqlalchemy/mako/issues/315

@ -33,7 +33,7 @@ buildPythonPackage rec {
rsa rsa
]; ];
passthru.extras-require = { passthru.optional-dependencies = {
async = [ async = [
aiofiles aiofiles
]; ];
@ -47,8 +47,8 @@ buildPythonPackage rec {
pycryptodome pycryptodome
pytestCheckHook pytestCheckHook
] ]
++ passthru.extras-require.async ++ passthru.optional-dependencies.async
++ passthru.extras-require.usb; ++ passthru.optional-dependencies.usb;
disabledTests = lib.optionals (pythonAtLeast "3.10") [ disabledTests = lib.optionals (pythonAtLeast "3.10") [
# Tests are failing with Python 3.10 # Tests are failing with Python 3.10

@ -28,19 +28,19 @@ buildPythonPackage rec {
pure-python-adb pure-python-adb
]; ];
passthru.extras-require = { passthru.optional-dependencies = {
async = [ async = [
aiofiles aiofiles
]; ];
inherit (adb-shell.extras-require) usb; inherit (adb-shell.optional-dependencies) usb;
}; };
checkInputs = [ checkInputs = [
mock mock
pytestCheckHook pytestCheckHook
] ]
++ passthru.extras-require.async ++ passthru.optional-dependencies.async
++ passthru.extras-require.usb; ++ passthru.optional-dependencies.usb;
disabledTests = [ disabledTests = [
# Requires git but fails anyway # Requires git but fails anyway

@ -68,8 +68,8 @@ buildPythonPackage rec {
mock mock
pytest-asyncio pytest-asyncio
pytestCheckHook pytestCheckHook
] ++ passthru.extras-require.scram ] ++ passthru.optional-dependencies.scram
++ passthru.extras-require.serialization; ++ passthru.optional-dependencies.serialization;
postPatch = '' postPatch = ''
substituteInPlace setup.py \ substituteInPlace setup.py \
@ -89,7 +89,7 @@ buildPythonPackage rec {
"autobahn" "autobahn"
]; ];
passthru.extras-require = rec { passthru.optional-dependencies = rec {
all = accelerate ++ compress ++ encryption ++ nvx ++ serialization ++ scram ++ twisted ++ ui ++ xbr; all = accelerate ++ compress ++ encryption ++ nvx ++ serialization ++ scram ++ twisted ++ ui ++ xbr;
accelerate = [ /* wsaccel */ ]; accelerate = [ /* wsaccel */ ];
compress = [ python-snappy ]; compress = [ python-snappy ];

@ -54,7 +54,7 @@ let
pyyaml pyyaml
] ]
# tls # tls
++ twisted.extras-require.tls; ++ twisted.optional-dependencies.tls;
checkInputs = [ checkInputs = [
treq treq

@ -40,7 +40,7 @@ buildPythonPackage rec {
six six
]; ];
passthru.extras-require = { passthru.optional-dependencies = {
datetime = [ datetime = [
python-dateutil python-dateutil
]; ];

@ -98,7 +98,7 @@ buildPythonPackage rec {
"dask.diagnostics" "dask.diagnostics"
]; ];
passthru.extras-require = { passthru.optional-dependencies = {
complete = [ distributed ]; complete = [ distributed ];
}; };

@ -46,7 +46,7 @@ buildPythonPackage rec {
param param
pyct pyct
scipy scipy
] ++ dask.extras-require.complete; ] ++ dask.optional-dependencies.complete;
checkInputs = [ checkInputs = [
pytestCheckHook pytestCheckHook

@ -27,11 +27,11 @@ buildPythonPackage rec {
pytz pytz
]; ];
passthru.extras-require.taggit = [ passthru.optional-dependencies.taggit = [
django-taggit django-taggit
]; ];
checkInputs = passthru.extras-require.taggit; checkInputs = passthru.optional-dependencies.taggit;
checkPhase = '' checkPhase = ''
runHook preCheck runHook preCheck

@ -49,7 +49,7 @@ buildPythonPackage rec {
pytest-asyncio pytest-asyncio
sqlalchemy sqlalchemy
trio trio
] ++ passlib.extras-require.bcrypt; ] ++ passlib.optional-dependencies.bcrypt;
patches = [ patches = [
# Bump starlette, https://github.com/tiangolo/fastapi/pull/4483 # Bump starlette, https://github.com/tiangolo/fastapi/pull/4483

@ -63,7 +63,7 @@ buildPythonPackage rec {
passlib passlib
]; ];
passthru.extras-require = { passthru.optional-dependencies = {
babel = [ babel = [
babel babel
flask-babel flask-babel
@ -95,10 +95,10 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
zxcvbn zxcvbn
] ]
++ passthru.extras-require.babel ++ passthru.optional-dependencies.babel
++ passthru.extras-require.common ++ passthru.optional-dependencies.common
++ passthru.extras-require.fsqla ++ passthru.optional-dependencies.fsqla
++ passthru.extras-require.mfa; ++ passthru.optional-dependencies.mfa;
pythonImportsCheck = [ "flask_security" ]; pythonImportsCheck = [ "flask_security" ];

@ -42,7 +42,7 @@ buildPythonPackage rec {
sniffio sniffio
]; ];
passthru.extras-require = { passthru.optional-dependencies = {
http2 = [ h2 ]; http2 = [ h2 ];
socks = [ socksio ]; socks = [ socksio ];
}; };
@ -56,8 +56,8 @@ buildPythonPackage rec {
trio trio
trustme trustme
uvicorn uvicorn
] ++ passthru.extras-require.http2 ] ++ passthru.optional-dependencies.http2
++ passthru.extras-require.socks; ++ passthru.optional-dependencies.socks;
pythonImportsCheck = [ "httpcore" ]; pythonImportsCheck = [ "httpcore" ];

@ -38,7 +38,7 @@ buildPythonPackage rec {
python-socks python-socks
]; ];
passthru.extras-require = { passthru.optional-dependencies = {
asyncio = [ async-timeout ]; asyncio = [ async-timeout ];
trio = [ trio ]; trio = [ trio ];
}; };

@ -49,7 +49,7 @@ buildPythonPackage rec {
async_generator async_generator
]; ];
passthru.extras-require = { passthru.optional-dependencies = {
http2 = [ h2 ]; http2 = [ h2 ];
socks = [ socksio ]; socks = [ socksio ];
brotli = if isPyPy then [ brotlicffi ] else [ brotli ]; brotli = if isPyPy then [ brotlicffi ] else [ brotli ];
@ -63,9 +63,9 @@ buildPythonPackage rec {
trustme trustme
typing-extensions typing-extensions
uvicorn uvicorn
] ++ passthru.extras-require.http2 ] ++ passthru.optional-dependencies.http2
++ passthru.extras-require.brotli ++ passthru.optional-dependencies.brotli
++ passthru.extras-require.socks; ++ passthru.optional-dependencies.socks;
postPatch = '' postPatch = ''
substituteInPlace setup.py \ substituteInPlace setup.py \

@ -99,7 +99,7 @@ buildPythonPackage rec {
pytest-mock pytest-mock
pytest-randomly pytest-randomly
pytest-xdist pytest-xdist
] ++ lib.concatMap (name: passthru.extras-require.${name}) testBackends; ] ++ lib.concatMap (name: passthru.optional-dependencies.${name}) testBackends;
preBuild = '' preBuild = ''
# setup.py exists only for developer convenience and is automatically generated # setup.py exists only for developer convenience and is automatically generated
@ -139,7 +139,7 @@ buildPythonPackage rec {
] ++ map (backend: "ibis.backends.${backend}") testBackends; ] ++ map (backend: "ibis.backends.${backend}") testBackends;
passthru = { passthru = {
extras-require = { optional-dependencies = {
clickhouse = [ clickhouse-cityhash clickhouse-driver lz4 ]; clickhouse = [ clickhouse-cityhash clickhouse-driver lz4 ];
dask = [ dask pyarrow ]; dask = [ dask pyarrow ];
datafusion = [ datafusion ]; datafusion = [ datafusion ];

@ -27,7 +27,7 @@ buildPythonPackage rec {
six six
twisted twisted
zope_interface zope_interface
] ++ twisted.extras-require.tls; ] ++ twisted.optional-dependencies.tls;
checkInputs = [ checkInputs = [
twisted twisted

@ -25,8 +25,8 @@ buildPythonPackage rec {
six six
twisted twisted
autobahn autobahn
] ++ autobahn.extras-require.twisted ] ++ autobahn.optional-dependencies.twisted
++ twisted.extras-require.tls; ++ twisted.optional-dependencies.tls;
checkInputs = [ checkInputs = [
treq treq

@ -42,8 +42,8 @@ buildPythonPackage rec {
click click
humanize humanize
txtorcon txtorcon
] ++ autobahn.extras-require.twisted ] ++ autobahn.optional-dependencies.twisted
++ twisted.extras-require.tls; ++ twisted.optional-dependencies.tls;
checkInputs = [ checkInputs = [
mock mock

@ -16,7 +16,7 @@ buildPythonPackage rec {
sha256 = "defd50f72b65c5402ab2c573830a6978e5f202ad0d984793c8dde2c4152ebe04"; sha256 = "defd50f72b65c5402ab2c573830a6978e5f202ad0d984793c8dde2c4152ebe04";
}; };
passthru.extras-require = { passthru.optional-dependencies = {
argon2 = [ argon2-cffi ]; argon2 = [ argon2-cffi ];
bcrypt = [ bcrypt ]; bcrypt = [ bcrypt ];
totp = [ cryptography ]; totp = [ cryptography ];
@ -24,9 +24,9 @@ buildPythonPackage rec {
checkInputs = [ checkInputs = [
pytestCheckHook pytestCheckHook
] ++ passthru.extras-require.argon2 ] ++ passthru.optional-dependencies.argon2
++ passthru.extras-require.bcrypt ++ passthru.optional-dependencies.bcrypt
++ passthru.extras-require.totp; ++ passthru.optional-dependencies.totp;
meta = with lib; { meta = with lib; {
description = "A password hashing library for Python"; description = "A password hashing library for Python";

@ -17,7 +17,7 @@ buildPythonPackage rec {
sha256 = "0kdr7w2fhgjpcf1k3l6an9im583iqkr6v8hb4q1zw30nh3bqkk0f"; sha256 = "0kdr7w2fhgjpcf1k3l6an9im583iqkr6v8hb4q1zw30nh3bqkk0f";
}; };
passthru.extras-require = { passthru.optional-dependencies = {
async = [ async = [
aiofiles aiofiles
]; ];
@ -28,7 +28,7 @@ buildPythonPackage rec {
checkInputs = [ checkInputs = [
pytestCheckHook pytestCheckHook
] ]
++ passthru.extras-require.async; ++ passthru.optional-dependencies.async;
pythonImportsCheck = [ pythonImportsCheck = [
"ppadb.client" "ppadb.client"

@ -25,7 +25,7 @@ buildPythonPackage rec {
pyserial pyserial
]; ];
passthru.extras-require.GATTTOOL = [ passthru.optional-dependencies.GATTTOOL = [
pexpect pexpect
]; ];
@ -34,7 +34,7 @@ buildPythonPackage rec {
nose nose
pytestCheckHook pytestCheckHook
] ]
++ passthru.extras-require.GATTTOOL; ++ passthru.optional-dependencies.GATTTOOL;
postPatch = '' postPatch = ''
# Not support for Python < 3.4 # Not support for Python < 3.4

@ -23,7 +23,7 @@ buildPythonPackage rec {
setuptools-scm setuptools-scm
]; ];
passthru.extras-require = { passthru.optional-dependencies = {
images = [ images = [
pillow pillow
]; ];
@ -38,7 +38,7 @@ buildPythonPackage rec {
checkInputs = [ checkInputs = [
pytestCheckHook pytestCheckHook
] ++ passthru.extras-require.images; ] ++ passthru.optional-dependencies.images;
pythonImportsCheck = [ "barcode" ]; pythonImportsCheck = [ "barcode" ];

@ -21,7 +21,7 @@ buildPythonPackage rec {
hash = "sha256-12ol+2CnoPfkxmDGJJAkoafHGpQuWC4lh0N7lSvx2DE="; hash = "sha256-12ol+2CnoPfkxmDGJJAkoafHGpQuWC4lh0N7lSvx2DE=";
}; };
passthru.extras-require = { passthru.optional-dependencies = {
async = [ async = [
aiocoap aiocoap
dtlssocket dtlssocket
@ -31,7 +31,7 @@ buildPythonPackage rec {
checkInputs = [ checkInputs = [
pytestCheckHook pytestCheckHook
] ]
++ passthru.extras-require.async; ++ passthru.optional-dependencies.async;
pythonImportsCheck = [ pythonImportsCheck = [
"pytradfri" "pytradfri"

@ -43,7 +43,7 @@ buildPythonPackage rec {
importlib-metadata importlib-metadata
]; ];
passthru.extras-require = { passthru.optional-dependencies = {
html = [ html = [
html5lib html5lib
]; ];
@ -55,8 +55,8 @@ buildPythonPackage rec {
checkInputs = [ checkInputs = [
pytestCheckHook pytestCheckHook
] ]
++ passthru.extras-require.networkx ++ passthru.optional-dependencies.networkx
++ passthru.extras-require.html; ++ passthru.optional-dependencies.html;
pytestFlagsArray = [ pytestFlagsArray = [
# requires network access # requires network access

@ -40,7 +40,7 @@ buildPythonPackage rec {
importlib-metadata importlib-metadata
]; ];
passthru.extras-require = { passthru.optional-dependencies = {
hidredis = [ hidredis = [
hiredis hiredis
]; ];

@ -27,14 +27,14 @@ buildPythonPackage rec {
lxml lxml
]; ];
passthru.extras-require = { passthru.optional-dependencies = {
chart = [ /* pycha */ pyyaml ]; chart = [ /* pycha */ pyyaml ];
fodt = [ python-magic ]; fodt = [ python-magic ];
}; };
checkInputs = [ checkInputs = [
pytestCheckHook pytestCheckHook
] ++ passthru.extras-require.fodt; ] ++ passthru.optional-dependencies.fodt;
pythonImportsCheck = [ "relatorio" ]; pythonImportsCheck = [ "relatorio" ];

@ -28,13 +28,13 @@ buildPythonPackage rec {
six six
]; ];
passthru.extras-require = { passthru.optional-dependencies = {
httpx = [ httpx ]; httpx = [ httpx ];
}; };
checkInputs = [ checkInputs = [
pytestCheckHook pytestCheckHook
] ++ passthru.extras-require.httpx; ] ++ passthru.optional-dependencies.httpx;
pythonImportsCheck = [ pythonImportsCheck = [
"requests_aws4auth" "requests_aws4auth"

@ -15,7 +15,7 @@ buildPythonPackage rec {
sha256 = "0ipz3fd65rqkxlb02sql0awc3vnslrwb2pfrsnpfnf8bfgxpbh9g"; sha256 = "0ipz3fd65rqkxlb02sql0awc3vnslrwb2pfrsnpfnf8bfgxpbh9g";
}; };
passthru.extras-require = { passthru.optional-dependencies = {
websocket = [ websocket = [
websocket-client websocket-client
]; ];

@ -39,7 +39,7 @@ buildPythonPackage rec {
websocket-client websocket-client
]; ];
passthru.extras-require = { passthru.optional-dependencies = {
async = [ async = [
aiohttp aiohttp
websockets websockets
@ -55,8 +55,8 @@ buildPythonPackage rec {
pytest-asyncio pytest-asyncio
pytestCheckHook pytestCheckHook
] ]
++ passthru.extras-require.async ++ passthru.optional-dependencies.async
++ passthru.extras-require.encrypted; ++ passthru.optional-dependencies.encrypted;
pythonImportsCheck = [ "samsungtvws" ]; pythonImportsCheck = [ "samsungtvws" ];

@ -20,7 +20,7 @@ buildPythonPackage rec {
requests requests
incremental incremental
twisted twisted
] ++ twisted.extras-require.tls; ] ++ twisted.optional-dependencies.tls;
checkInputs = [ checkInputs = [
httpbin httpbin

@ -53,9 +53,9 @@ buildPythonPackage rec {
weasyprint weasyprint
gevent gevent
pillow pillow
] ++ relatorio.extras-require.fodt ] ++ relatorio.optional-dependencies.fodt
++ passlib.extras-require.bcrypt ++ passlib.optional-dependencies.bcrypt
++ passlib.extras-require.argon2 ++ passlib.optional-dependencies.argon2
++ lib.optional withPostgresql psycopg2; ++ lib.optional withPostgresql psycopg2;
checkPhase = '' checkPhase = ''

@ -41,7 +41,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ zope_interface incremental automat constantly hyperlink pyhamcrest attrs setuptools typing-extensions ]; propagatedBuildInputs = [ zope_interface incremental automat constantly hyperlink pyhamcrest attrs setuptools typing-extensions ];
passthru.extras-require = rec { passthru.optional-dependencies = rec {
tls = [ pyopenssl service-identity idna ]; tls = [ pyopenssl service-identity idna ];
conch = [ pyasn1 cryptography appdirs bcrypt ]; conch = [ pyasn1 cryptography appdirs bcrypt ];
conch_nacl = conch ++ [ pynacl ]; conch_nacl = conch ++ [ pynacl ];

@ -13,7 +13,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ propagatedBuildInputs = [
incremental twisted automat zope_interface incremental twisted automat zope_interface
] ++ twisted.extras-require.tls ] ++ twisted.optional-dependencies.tls
++ lib.optionals (!isPy3k) [ ipaddress ]; ++ lib.optionals (!isPy3k) [ ipaddress ];
checkInputs = [ pytestCheckHook mock lsof GeoIP ]; checkInputs = [ pytestCheckHook mock lsof GeoIP ];

@ -43,9 +43,9 @@ buildPythonPackage rec {
cxxfilt cxxfilt
msgpack msgpack
pycparser pycparser
] ++ lib.optionals (withGui) passthru.extras-require.gui; ] ++ lib.optionals (withGui) passthru.optional-dependencies.gui;
passthru.extras-require.gui = [ passthru.optional-dependencies.gui = [
pyqt5 pyqt5
pyqtwebengine pyqtwebengine
]; ];

@ -33,7 +33,7 @@ buildPythonPackage rec {
aiohttp aiohttp
]; ];
passthru.extras-require = { passthru.optional-dependencies = {
console = [ console = [
certifi certifi
docopt docopt
@ -49,7 +49,7 @@ buildPythonPackage rec {
asynctest asynctest
pytest-asyncio pytest-asyncio
pytestCheckHook pytestCheckHook
] ++ passthru.extras-require.mqtt; ] ++ passthru.optional-dependencies.mqtt;
pythonImportsCheck = [ "volvooncall" ]; pythonImportsCheck = [ "volvooncall" ];

@ -46,7 +46,7 @@ buildPythonApplication rec {
pyramid pyramid
strictyaml strictyaml
waitress waitress
] ++ passlib.extras-require.argon2; ] ++ passlib.optional-dependencies.argon2;
checkInputs = [ checkInputs = [
beautifulsoup4 beautifulsoup4

@ -118,9 +118,9 @@
androidtv androidtv
pure-python-adb pure-python-adb
] ]
++ adb-shell.extras-require.async ++ adb-shell.optional-dependencies.async
++ androidtv.extras-require.async ++ androidtv.optional-dependencies.async
++ pure-python-adb.extras-require.async; ++ pure-python-adb.optional-dependencies.async;
"anel_pwrctrl" = ps: with ps; [ "anel_pwrctrl" = ps: with ps; [
]; # missing inputs: anel_pwrctrl-homeassistant ]; # missing inputs: anel_pwrctrl-homeassistant
"anthemav" = ps: with ps; [ "anthemav" = ps: with ps; [
@ -279,7 +279,7 @@
"bluetooth_le_tracker" = ps: with ps; [ "bluetooth_le_tracker" = ps: with ps; [
pygatt pygatt
] ]
++ pygatt.extras-require.GATTTOOL; ++ pygatt.optional-dependencies.GATTTOOL;
"bluetooth_tracker" = ps: with ps; [ "bluetooth_tracker" = ps: with ps; [
bt-proximity bt-proximity
pybluez pybluez
@ -2273,9 +2273,9 @@
wakeonlan wakeonlan
zeroconf zeroconf
] ]
++ samsungctl.extras-require.websocket ++ samsungctl.optional-dependencies.websocket
++ samsungtvws.extras-require.async ++ samsungtvws.optional-dependencies.async
++ samsungtvws.extras-require.encrypted; ++ samsungtvws.optional-dependencies.encrypted;
"satel_integra" = ps: with ps; [ "satel_integra" = ps: with ps; [
]; # missing inputs: satel_integra ]; # missing inputs: satel_integra
"scene" = ps: with ps; [ "scene" = ps: with ps; [
@ -2388,7 +2388,7 @@
"skybeacon" = ps: with ps; [ "skybeacon" = ps: with ps; [
pygatt pygatt
] ]
++ pygatt.extras-require.GATTTOOL; ++ pygatt.optional-dependencies.GATTTOOL;
"skybell" = ps: with ps; [ "skybell" = ps: with ps; [
skybellpy skybellpy
]; ];
@ -2769,7 +2769,7 @@
"tradfri" = ps: with ps; [ "tradfri" = ps: with ps; [
pytradfri pytradfri
] ]
++ pytradfri.extras-require.async; ++ pytradfri.optional-dependencies.async;
"trafikverket_ferry" = ps: with ps; [ "trafikverket_ferry" = ps: with ps; [
pytrafikverket pytrafikverket
]; ];

@ -103,13 +103,13 @@ def repository_root() -> str:
return os.path.abspath(sys.argv[0] + "/../../../..") return os.path.abspath(sys.argv[0] + "/../../../..")
# For a package attribute and and an extra, check if the package exposes it via passthru.extras-require # For a package attribute and and an extra, check if the package exposes it via passthru.optional-dependencies
def has_extra(package: str, extra: str): def has_extra(package: str, extra: str):
cmd = [ cmd = [
"nix-instantiate", "nix-instantiate",
repository_root(), repository_root(),
"-A", "-A",
f"{package}.extras-require.{extra}", f"{package}.optional-dependencies.{extra}",
] ]
try: try:
subprocess.run( subprocess.run(
@ -209,7 +209,7 @@ def main() -> None:
attr_paths.append(pname) attr_paths.append(pname)
for extra in extras: for extra in extras:
# Check if package advertises extra requirements # Check if package advertises extra requirements
extra_attr = f"{pname}.extras-require.{extra}" extra_attr = f"{pname}.optional-dependencies.{extra}"
if has_extra(attr_path, extra): if has_extra(attr_path, extra):
extra_attrs.append(extra_attr) extra_attrs.append(extra_attr)
else: else:

@ -21,7 +21,7 @@ python3.pkgs.buildPythonApplication rec {
vobject vobject
python-dateutil python-dateutil
pytz # https://github.com/Kozea/Radicale/issues/816 pytz # https://github.com/Kozea/Radicale/issues/816
] ++ passlib.extras-require.bcrypt; ] ++ passlib.optional-dependencies.bcrypt;
checkInputs = with python3.pkgs; [ checkInputs = with python3.pkgs; [
pytestCheckHook pytestCheckHook

@ -60,8 +60,8 @@ python3Packages.buildPythonApplication rec {
html5lib magic-wormhole netifaces pyasn1 pycrypto pyutil pyyaml recommonmark html5lib magic-wormhole netifaces pyasn1 pycrypto pyutil pyyaml recommonmark
service-identity simplejson sphinx_rtd_theme testtools treq twisted zfec service-identity simplejson sphinx_rtd_theme testtools treq twisted zfec
zope_interface zope_interface
] ++ twisted.extras-require.tls ] ++ twisted.optional-dependencies.tls
++ twisted.extras-require.conch; ++ twisted.optional-dependencies.conch;
checkInputs = with python3Packages; [ mock hypothesis twisted ]; checkInputs = with python3Packages; [ mock hypothesis twisted ];

@ -39,8 +39,8 @@ python3.pkgs.buildPythonApplication rec {
yaswfp yaswfp
] ++ lib.optionals (python3.pythonOlder "3.8") [ ] ++ lib.optionals (python3.pythonOlder "3.8") [
importlib-metadata importlib-metadata
] ++ httpx.extras-require.brotli ] ++ httpx.optional-dependencies.brotli
++ httpx.extras-require.socks; ++ httpx.optional-dependencies.socks;
checkInputs = with python3.pkgs; [ checkInputs = with python3.pkgs; [
respx respx

Loading…
Cancel
Save