diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules')
142 files changed, 2461 insertions, 517 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/adafruit-platformdetect/default.nix b/nixpkgs/pkgs/development/python-modules/adafruit-platformdetect/default.nix index 97966e6bb33e..080717e1a2cc 100644 --- a/nixpkgs/pkgs/development/python-modules/adafruit-platformdetect/default.nix +++ b/nixpkgs/pkgs/development/python-modules/adafruit-platformdetect/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "adafruit-platformdetect"; - version = "3.54.0"; + version = "3.56.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "Adafruit-PlatformDetect"; inherit version; - hash = "sha256-P+f7eBqD0/KIEry/807dQQCvtokB2cYu4i0H6CTYIWg="; + hash = "sha256-PApfNjW7sfVmYT0NcEKs5MZJG65P7WQ5WVpQuOj8EV4="; }; SETUPTOOLS_SCM_PRETEND_VERSION = version; diff --git a/nixpkgs/pkgs/development/python-modules/aiosomecomfort/default.nix b/nixpkgs/pkgs/development/python-modules/aiosomecomfort/default.nix index 5775aece8060..4e5c512a9e24 100644 --- a/nixpkgs/pkgs/development/python-modules/aiosomecomfort/default.nix +++ b/nixpkgs/pkgs/development/python-modules/aiosomecomfort/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "aiosomecomfort"; - version = "0.0.22"; + version = "0.0.24"; pyproject = true; disabled = pythonOlder "3.7"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "mkmer"; repo = "AIOSomecomfort"; rev = "refs/tags/${version}"; - hash = "sha256-d4pyt9+sBPNo/PL05HQ4sjyjubMtTZI9WUGRU1B/dH0="; + hash = "sha256-+kAObq8tbTO6Qlb+/93mF6K+gEHd33TofHug5f+zl+4="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/amazon-ion/default.nix b/nixpkgs/pkgs/development/python-modules/amazon-ion/default.nix index 0a2479dd38f4..e69de9cfea33 100644 --- a/nixpkgs/pkgs/development/python-modules/amazon-ion/default.nix +++ b/nixpkgs/pkgs/development/python-modules/amazon-ion/default.nix @@ -1,26 +1,29 @@ { lib , buildPythonPackage +, docopt , fetchFromGitHub , jsonconversion -, six , pytestCheckHook , pythonOlder +, setuptools +, six +, tabulate }: buildPythonPackage rec { pname = "amazon-ion"; - version = "0.10.0"; - format = "setuptools"; + version = "0.11.2"; + pyproject = true; disabled = pythonOlder "3.7"; - # test vectors require git submodule src = fetchFromGitHub { - owner = "amzn"; + owner = "amazon-ion"; repo = "ion-python"; rev = "refs/tags/v${version}"; + # Test vectors require git submodule fetchSubmodules = true; - hash = "sha256-pCm3jd/dVqO/uIvT5N/w5yoUWU6ni62Pl2A862e+qSk="; + hash = "sha256-0/+bX02qTbOydWDxex4OWL7woP7dW1yJZBmDZAivE7U="; }; postPatch = '' @@ -28,13 +31,19 @@ buildPythonPackage rec { --replace "'pytest-runner'," "" ''; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ jsonconversion six ]; nativeCheckInputs = [ + docopt pytestCheckHook + tabulate ]; disabledTests = [ @@ -42,13 +51,19 @@ buildPythonPackage rec { "test_roundtrips" ]; + disabledTestPaths = [ + # Exclude benchmarks + "tests/test_benchmark_cli.py" + ]; + pythonImportsCheck = [ "amazon.ion" ]; meta = with lib; { description = "Python implementation of Amazon Ion"; - homepage = "https://github.com/amzn/ion-python"; + homepage = "https://github.com/amazon-ion/ion-python"; + changelog = "https://github.com/amazon-ion/ion-python/releases/tag/v${version}"; sourceProvenance = with sourceTypes; [ fromSource binaryNativeCode diff --git a/nixpkgs/pkgs/development/python-modules/anchor-kr/default.nix b/nixpkgs/pkgs/development/python-modules/anchor-kr/default.nix new file mode 100644 index 000000000000..32ce534e6b6b --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/anchor-kr/default.nix @@ -0,0 +1,26 @@ +{ lib, + buildPythonPackage, + fetchFromGitHub +}: +buildPythonPackage { + pname = "anchor"; + version = "3"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "justfoolingaround"; + repo = "anchor"; + # Using the commit hash because upstream does not have releases. https://github.com/justfoolingaround/anchor/issues/1 + rev = "4cedb6a51877ed3a292cad61eb19013382915e86"; + hash = "sha256-t75IFBSz6ncHRqXRxbrM9EQdr8xPXjSd9di+/y2LegE="; + }; + + pythonImportsCheck = [ "anchor" ]; + + meta = with lib; { + description = "Python library for scraping"; + homepage = "https://github.com/justfoolingaround/anchor"; + license = licenses.unfree; + maintainers = with maintainers; [ passivelemon ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/anitopy/default.nix b/nixpkgs/pkgs/development/python-modules/anitopy/default.nix new file mode 100644 index 000000000000..313f9631154e --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/anitopy/default.nix @@ -0,0 +1,26 @@ +{ lib, + buildPythonPackage, + fetchFromGitHub +}: +buildPythonPackage rec { + pname = "anitopy"; + version = "2.1.1"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "igorcmoura"; + repo = "anitopy"; + rev = "v${version}"; + hash = "sha256-xXEf7AJKg7grDmkKfFuC4Fk6QYFJtezClyfA3vq8TfQ="; + }; + + pythonImportsCheck = [ "anitopy" ]; + doCheck = true; + + meta = with lib; { + description = "Python library for parsing anime video filenames"; + homepage = "https://github.com/igorcmoura/anitopy"; + license = licenses.mpl20; + maintainers = with maintainers; [ passivelemon ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/approval-utilities/default.nix b/nixpkgs/pkgs/development/python-modules/approval-utilities/default.nix index 3b21c3ffab83..38d22ad57aae 100644 --- a/nixpkgs/pkgs/development/python-modules/approval-utilities/default.nix +++ b/nixpkgs/pkgs/development/python-modules/approval-utilities/default.nix @@ -2,18 +2,29 @@ , buildPythonPackage , approvaltests , pythonOlder +, setuptools +, typing-extensions }: buildPythonPackage rec { pname = "approval-utilities"; inherit (approvaltests) version src; disabled = pythonOlder "3.7"; - format = "setuptools"; + pyproject = true; postPatch = '' mv setup.approval_utilities.py setup.py ''; + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + # used in approval_utilities/utilities/time_utilities.py + typing-extensions + ]; + pythonImportsCheck = [ "approval_utilities" ]; # upstream has no tests diff --git a/nixpkgs/pkgs/development/python-modules/approvaltests/default.nix b/nixpkgs/pkgs/development/python-modules/approvaltests/default.nix index b8ec645c42d1..289755c5ddc6 100644 --- a/nixpkgs/pkgs/development/python-modules/approvaltests/default.nix +++ b/nixpkgs/pkgs/development/python-modules/approvaltests/default.nix @@ -5,21 +5,21 @@ , buildPythonPackage , empty-files , fetchFromGitHub -, mock , mrjob , numpy , pyperclip , pytest +, pytest-asyncio , pytestCheckHook , pythonOlder +, setuptools , testfixtures -, typing-extensions }: buildPythonPackage rec { pname = "approvaltests"; - version = "10.0.0"; - format = "setuptools"; + version = "10.1.0"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -27,9 +27,13 @@ buildPythonPackage rec { owner = "approvals"; repo = "ApprovalTests.Python"; rev = "refs/tags/v${version}"; - hash = "sha256-3KorHpJUeWSJKVN/4IN0AqKOIL0sT5MaxkvQqpeilhw="; + hash = "sha256-t+Vxo6Pn3b2H3yAg5LGsGTjrZr4MXeGOY2BF9eFFAdE="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ allpairspy approval-utilities @@ -39,16 +43,16 @@ buildPythonPackage rec { pyperclip pytest testfixtures - typing-extensions ]; nativeCheckInputs = [ - mock numpy + pytest-asyncio pytestCheckHook ]; disabledTests = [ + "test_docstrings" # Tests expects paths below ApprovalTests.Python directory "test_received_filename" "test_pytest_namer" diff --git a/nixpkgs/pkgs/development/python-modules/ariadne/default.nix b/nixpkgs/pkgs/development/python-modules/ariadne/default.nix index 3810934eefeb..0e0bf1140a64 100644 --- a/nixpkgs/pkgs/development/python-modules/ariadne/default.nix +++ b/nixpkgs/pkgs/development/python-modules/ariadne/default.nix @@ -4,7 +4,6 @@ , hatchling , freezegun , graphql-core -, opentracing , pytest-asyncio , pytest-mock , pytestCheckHook @@ -28,6 +27,9 @@ buildPythonPackage rec { rev = "refs/tags/${version}"; hash = "sha256-v3CaLMTo/zbNEoE3K+aWnFTCgLetcnN7vOU/sFqLq2k="; }; + patches = [ + ./remove-opentracing.patch + ]; nativeBuildInputs = [ hatchling @@ -41,7 +43,6 @@ buildPythonPackage rec { nativeCheckInputs = [ freezegun - opentracing pytest-asyncio pytest-mock pytestCheckHook @@ -58,12 +59,18 @@ buildPythonPackage rec { "test_attempt_parse_request_missing_content_type_raises_bad_request_error" "test_attempt_parse_non_json_request_raises_bad_request_error" "test_attempt_parse_non_json_request_body_raises_bad_request_error" + # opentracing + "test_query_is_executed_for_multipart_form_request_with_file" + "test_query_is_executed_for_multipart_request_with_large_file_with_tracing" ]; disabledTestPaths = [ # missing graphql-sync-dataloader test dep "tests/test_dataloaders.py" "tests/wsgi/test_configuration.py" + # both include opentracing module, which has been removed from nixpkgs + "tests/tracing/test_opentracing.py" + "tests/tracing/test_opentelemetry.py" ]; meta = with lib; { diff --git a/nixpkgs/pkgs/development/python-modules/ariadne/remove-opentracing.patch b/nixpkgs/pkgs/development/python-modules/ariadne/remove-opentracing.patch new file mode 100644 index 000000000000..eecbfafea9b9 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/ariadne/remove-opentracing.patch @@ -0,0 +1,12 @@ +diff --git a/tests/asgi/conftest.py b/tests/asgi/conftest.py +index a703466..223586e 100644 +--- a/tests/asgi/conftest.py ++++ b/tests/asgi/conftest.py +@@ -8,7 +8,6 @@ from ariadne.asgi.handlers import ( + GraphQLTransportWSHandler, + GraphQLWSHandler, + ) +-from ariadne.contrib.tracing.opentracing import opentracing_extension + + + @pytest.fixture diff --git a/nixpkgs/pkgs/development/python-modules/auth0-python/default.nix b/nixpkgs/pkgs/development/python-modules/auth0-python/default.nix index 3b0cc0eb8030..5d7498c794a9 100644 --- a/nixpkgs/pkgs/development/python-modules/auth0-python/default.nix +++ b/nixpkgs/pkgs/development/python-modules/auth0-python/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "auth0-python"; - version = "4.6.0"; + version = "4.6.1"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "auth0"; repo = "auth0-python"; rev = "refs/tags/${version}"; - hash = "sha256-KNhuonqFt+KrRYctQ426FcnzxISp5sBRs28hFL/Du0Q="; + hash = "sha256-weXEwrOP+TKVwhqCeFVqUw4x+q2Wplr0QWVUzpbNPSc="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/av/default.nix b/nixpkgs/pkgs/development/python-modules/av/default.nix index e80f521efb2b..605fb0c66df3 100644 --- a/nixpkgs/pkgs/development/python-modules/av/default.nix +++ b/nixpkgs/pkgs/development/python-modules/av/default.nix @@ -1,35 +1,29 @@ { lib -, buildPythonPackage -, fetchFromGitHub -, pythonOlder , stdenv - -# build +, buildPythonPackage , cython -, pkg-config -, setuptools - -# runtime +, fetchFromGitHub , ffmpeg_5-headless - -# tests , numpy , pillow +, pkg-config , pytestCheckHook +, pythonOlder +, setuptools }: buildPythonPackage rec { pname = "av"; - version = "10.0.0"; - format = "pyproject"; + version = "11.0.0"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "mikeboers"; repo = "PyAV"; - rev = "v${version}"; - hash = "sha256-XcHP8RwC2iwD64Jc7SS+t9OxjFTsz3FbrnjMgJnN7Ak="; + rev = "refs/tags/v${version}"; + hash = "sha256-pCKP+4ZmZCJcG7/Qy9H6aS4svQdgaRA9S1QVNWFYhSQ="; }; nativeBuildInputs = [ @@ -53,64 +47,54 @@ buildPythonPackage rec { pytestCheckHook ]; - pytestFlagsArray = [ - # Tests that want to download FATE data - # https://github.com/PyAV-Org/PyAV/issues/955 - "--deselect=tests/test_audiofifo.py::TestAudioFifo::test_data" - "--deselect=tests/test_codec_context.py::TestCodecContext::test_codec_tag" - "--deselect=tests/test_codec_context.py::TestCodecContext::test_parse" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_aac" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_dnxhd" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_dvvideo" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_h264" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_mjpeg" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_mp2" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_mpeg1video" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_mpeg4" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_pcm_s24le" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_png" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_tiff" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_xvid" - "--deselect=tests/test_decode.py::TestDecode::test_decode_audio_sample_count" - "--deselect=tests/test_decode.py::TestDecode::test_decoded_motion_vectors" - "--deselect=tests/test_decode.py::TestDecode::test_decoded_motion_vectors_no_flag" - "--deselect=tests/test_decode.py::TestDecode::test_decoded_time_base" - "--deselect=tests/test_decode.py::TestDecode::test_decoded_video_frame_count" - "--deselect=tests/test_encode.py::TestBasicAudioEncoding::test_transcode" - "--deselect=tests/test_file_probing.py::TestAudioProbe::test_container_probing" - "--deselect=tests/test_file_probing.py::TestAudioProbe::test_stream_probing" - "--deselect=tests/test_file_probing.py::TestDataProbe::test_container_probing" - "--deselect=tests/test_file_probing.py::TestDataProbe::test_stream_probing" - "--deselect=tests/test_file_probing.py::TestSubtitleProbe::test_container_probing" - "--deselect=tests/test_file_probing.py::TestSubtitleProbe::test_stream_probing" - "--deselect=tests/test_file_probing.py::TestVideoProbe::test_container_probing" - "--deselect=tests/test_file_probing.py::TestVideoProbe::test_stream_probing" - "--deselect=tests/test_python_io.py::TestPythonIO::test_reading_from_buffer" - "--deselect=tests/test_python_io.py::TestPythonIO::test_reading_from_buffer_no_see" - "--deselect=tests/test_python_io.py::TestPythonIO::test_reading_from_file" - "--deselect=tests/test_python_io.py::TestPythonIO::test_reading_from_pipe_readonly" - "--deselect=tests/test_python_io.py::TestPythonIO::test_reading_from_write_readonl" - "--deselect=tests/test_seek.py::TestSeek::test_decode_half" - "--deselect=tests/test_seek.py::TestSeek::test_seek_end" - "--deselect=tests/test_seek.py::TestSeek::test_seek_float" - "--deselect=tests/test_seek.py::TestSeek::test_seek_int64" - "--deselect=tests/test_seek.py::TestSeek::test_seek_middle" - "--deselect=tests/test_seek.py::TestSeek::test_seek_start" - "--deselect=tests/test_seek.py::TestSeek::test_stream_seek" - "--deselect=tests/test_streams.py::TestStreams::test_selection" - "--deselect=tests/test_streams.py::TestStreams::test_stream_tuples" - "--deselect=tests/test_subtitles.py::TestSubtitle::test_movtext" - "--deselect=tests/test_subtitles.py::TestSubtitle::test_vobsub" - "--deselect=tests/test_videoframe.py::TestVideoFrameImage::test_roundtrip" - ] ++ lib.optionals (stdenv.isDarwin) [ - # Segmentation Faults - "--deselect=tests/test_encode.py::TestBasicVideoEncoding::test_encoding_with_pts" - "--deselect=tests/test_pyav.py::test_bayer_write" - ]; - disabledTests = [ # urlopen fails during DNS resolution "test_writing_to_custom_io" + "test_decode_close_then_use" + # Tests that want to download FATE data, https://github.com/PyAV-Org/PyAV/issues/955 + "test_vobsub" + "test_transcode" + "test_stream_tuples" + "test_stream_seek" + "test_stream_probing" + "test_seek_start" + "test_seek_middle" + "test_seek_int64" + "test_seek_float" + "test_seek_end" + "test_roundtrip" + "test_reading_from_write_readonl" + "test_reading_from_pipe_readonly" + "test_reading_from_file" + "test_reading_from_buffer" + "test_reading_from_buffer_no_see" + "test_parse" + "test_movtext" + "test_encoding_xvid" + "test_encoding_tiff" + "test_encoding_png" + "test_encoding_pcm_s24le" + "test_encoding_mpeg4" + "test_encoding_mpeg1video" + "test_encoding_mp2" + "test_encoding_mjpeg" + "test_encoding_h264" + "test_encoding_dvvideo" + "test_encoding_dnxhd" + "test_encoding_aac" + "test_decoded_video_frame_count" + "test_decoded_time_base" + "test_decoded_motion_vectors" + "test_decode_half" + "test_decode_audio_sample_count" + "test_data" + "test_container_probing" + "test_codec_tag" + "test_selection" + ] ++ lib.optionals (stdenv.isDarwin) [ + # Segmentation Faults + "test_encoding_with_pts" + "test_bayer_write" ]; disabledTestPaths = [ @@ -148,6 +132,7 @@ buildPythonPackage rec { meta = with lib; { description = "Pythonic bindings for FFmpeg/Libav"; homepage = "https://github.com/mikeboers/PyAV/"; + changelog = "https://github.com/PyAV-Org/PyAV/blob/v${version}/CHANGELOG.rst"; license = licenses.bsd2; maintainers = with maintainers; [ ]; }; diff --git a/nixpkgs/pkgs/development/python-modules/axisregistry/default.nix b/nixpkgs/pkgs/development/python-modules/axisregistry/default.nix new file mode 100644 index 000000000000..5fba9f0f02dc --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/axisregistry/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, fetchPypi +, fonttools +, protobuf +, pythonRelaxDepsHook +, pytestCheckHook +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "axisregistry"; + version = "0.4.5"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-elQUcl6Zh/3xXLduFKbiXZ6uQsDE8C6M3QnTEwaJlaA="; + }; + + propagatedBuildInputs = [ + fonttools + protobuf + ]; + nativeBuildInputs = [ + pythonRelaxDepsHook + setuptools-scm + ]; + + doCheck = true; + nativeCheckInputs = [ + pytestCheckHook + ]; + + # Relax the dependency on protobuf 3. Other packages in the Google Fonts + # ecosystem have begun upgrading from protobuf 3 to protobuf 4, + # so we need to use protobuf 4 here as well to avoid a conflict + # in the closure of fontbakery. It seems to be compatible enough. + pythonRelaxDeps = [ "protobuf" ]; + + meta = with lib; { + description = "Google Fonts registry of OpenType variation axis tags"; + homepage = "https://github.com/googlefonts/axisregistry"; + license = licenses.asl20; + maintainers = with maintainers; [ danc86 ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/azure-identity/default.nix b/nixpkgs/pkgs/development/python-modules/azure-identity/default.nix index 624ce81e5bca..add836eee03f 100644 --- a/nixpkgs/pkgs/development/python-modules/azure-identity/default.nix +++ b/nixpkgs/pkgs/development/python-modules/azure-identity/default.nix @@ -1,11 +1,11 @@ { lib -, azure-common -, azure-mgmt-core , buildPythonPackage , fetchPypi -, isodate -, msal , pythonOlder +, azure-core +, cryptography +, msal +, msal-extensions }: buildPythonPackage rec { @@ -21,10 +21,10 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - azure-common - azure-mgmt-core - isodate + azure-core + cryptography msal + msal-extensions ]; pythonImportsCheck = [ @@ -38,7 +38,7 @@ buildPythonPackage rec { meta = with lib; { description = "Microsoft Azure Identity Library for Python"; homepage = "https://github.com/Azure/azure-sdk-for-python"; - changelog = "https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_${version}/sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md"; + changelog = "https://github.com/Azure/azure-sdk-for-python/blob/azure-identity_${version}/sdk/identity/azure-identity/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ kamadorueda ]; }; diff --git a/nixpkgs/pkgs/development/python-modules/babelfont/default.nix b/nixpkgs/pkgs/development/python-modules/babelfont/default.nix new file mode 100644 index 000000000000..4cd3e809a890 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/babelfont/default.nix @@ -0,0 +1,55 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, cu2qu +, defcon +, fontfeatures +, fonttools +, glyphslib +, openstep-plist +, orjson +, poetry-core +, pytestCheckHook +, ufoLib2 +}: + +buildPythonPackage rec { + pname = "babelfont"; + version = "3.0.1"; + + # PyPI source tarballs omit tests, fetch from Github instead + src = fetchFromGitHub { + owner = "simoncozens"; + repo = pname; + rev = "v${version}"; + hash = "sha256-1DHcJDVaCgIAODyf5UUrXej8x3ySD4+6/KtxuF2yFV4="; + }; + + pyproject = true; + + propagatedBuildInputs = [ + cu2qu + fontfeatures + fonttools + glyphslib + openstep-plist + orjson + ufoLib2 + ]; + nativeBuildInputs = [ + poetry-core + ]; + + doCheck = true; + nativeCheckInputs = [ + defcon + pytestCheckHook + ]; + + meta = with lib; { + description = "Python library to load, examine, and save fonts in a variety of formats"; + homepage = "https://github.com/simoncozens/babelfont"; + license = licenses.bsd3; + maintainers = with maintainers; [ danc86 ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/backports-entry-points-selectable/default.nix b/nixpkgs/pkgs/development/python-modules/backports-entry-points-selectable/default.nix index 669f997f6e86..ea57e4887bff 100644 --- a/nixpkgs/pkgs/development/python-modules/backports-entry-points-selectable/default.nix +++ b/nixpkgs/pkgs/development/python-modules/backports-entry-points-selectable/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "backports-entry-points-selectable"; - version = "1.2.0"; + version = "1.3.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -16,7 +16,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "backports.entry_points_selectable"; inherit version; - hash = "sha256-Rwb1kXllfKfB0yWlQ+4TcPj0YzH0MrysYvqyQv3wr6U="; + hash = "sha256-F6i0SucA+6VIaG3SdN3JHAYDcVZc1jgGwgodM5EXRuY="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/betterproto/default.nix b/nixpkgs/pkgs/development/python-modules/betterproto/default.nix index 6de1933fca8d..f17fabec994f 100644 --- a/nixpkgs/pkgs/development/python-modules/betterproto/default.nix +++ b/nixpkgs/pkgs/development/python-modules/betterproto/default.nix @@ -9,6 +9,7 @@ , jinja2 , isort , python +, pydantic , pytestCheckHook , pytest-asyncio , pytest-mock @@ -18,15 +19,15 @@ buildPythonPackage rec { pname = "betterproto"; - version = "2.0.0b5"; + version = "2.0.0b6"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "danielgtaylor"; repo = "python-betterproto"; - rev = "v${version}"; - hash = "sha256-XyXdpo3Yo4aO1favMWC7i9utz4fNDbKbsnYXJW0b7Gc="; + rev = "v.${version}"; + hash = "sha256-ZuVq4WERXsRFUPNNTNp/eisWX1MyI7UtwqEI8X93wYI="; }; nativeBuildInputs = [ poetry-core ]; @@ -45,6 +46,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "betterproto" ]; nativeCheckInputs = [ + pydantic pytestCheckHook pytest-asyncio pytest-mock @@ -56,6 +58,7 @@ buildPythonPackage rec { # the protoc-gen-python_betterproto script from the package to be on PATH. preCheck = '' export PATH=$PATH:$out/bin + patchShebangs src/betterproto/plugin/main.py ${python.interpreter} -m tests.generate ''; diff --git a/nixpkgs/pkgs/development/python-modules/beziers/default.nix b/nixpkgs/pkgs/development/python-modules/beziers/default.nix new file mode 100644 index 000000000000..0bfb5eeb29ee --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/beziers/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, dotmap +, matplotlib +, pyclipper +, unittestCheckHook +}: + +buildPythonPackage rec { + pname = "beziers"; + version = "0.5.0"; + + # PyPI doesn't have a proper source tarball, fetch from Github instead + src = fetchFromGitHub { + owner = "simoncozens"; + repo = "beziers.py"; + rev = "v${version}"; + hash = "sha256-4014u7s47Tfdpa2Q9hKAoHg7Ebcs1/DVW5TpEmoh2bc="; + }; + + propagatedBuildInputs = [ + pyclipper + ]; + + doCheck = true; + nativeCheckInputs = [ + dotmap + matplotlib + unittestCheckHook + ]; + unittestFlagsArray = [ "-s" "test" "-v" ]; + + meta = with lib; { + description = "Python library for manipulating Bezier curves and paths in fonts"; + homepage = "https://github.com/simoncozens/beziers.py"; + license = licenses.mit; + maintainers = with maintainers; [ danc86 ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/black/default.nix b/nixpkgs/pkgs/development/python-modules/black/default.nix index 76890aeda286..52cc36e989cc 100644 --- a/nixpkgs/pkgs/development/python-modules/black/default.nix +++ b/nixpkgs/pkgs/development/python-modules/black/default.nix @@ -26,14 +26,14 @@ buildPythonPackage rec { pname = "black"; - version = "23.9.1"; + version = "23.11.0"; format = "pyproject"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-JLaz/1xtnqCKiIj2l36uhY4fNA1yYM9W1wpJgjI2ti0="; + hash = "sha256-TGiFWCX/Qy0ZcimEb5cbxNZmbOkEkuWwIBO8rKTZqwU="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/blockfrost-python/default.nix b/nixpkgs/pkgs/development/python-modules/blockfrost-python/default.nix index 043384e80bf0..a8da8d6e45cb 100644 --- a/nixpkgs/pkgs/development/python-modules/blockfrost-python/default.nix +++ b/nixpkgs/pkgs/development/python-modules/blockfrost-python/default.nix @@ -8,15 +8,15 @@ buildPythonPackage rec { pname = "blockfrost-python"; - version = "0.5.3"; + version = "0.6.0"; format = "pyproject"; src = fetchFromGitHub { owner = "blockfrost"; repo = "blockfrost-python"; - rev = "${version}"; - hash = "sha256-mQ8avjyLARJONYn18neCyuHEuv3ySyCNMe+P4+Dlxck="; + rev = "refs/tags/${version}"; + hash = "sha256-mN26QXxizDR+o2V5C2MlqVEbRns1BTmwZdUnnHNcFzw="; }; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/botocore-stubs/default.nix b/nixpkgs/pkgs/development/python-modules/botocore-stubs/default.nix index 0d65528f6dfa..29adc4aa473f 100644 --- a/nixpkgs/pkgs/development/python-modules/botocore-stubs/default.nix +++ b/nixpkgs/pkgs/development/python-modules/botocore-stubs/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "botocore-stubs"; - version = "1.31.79"; + version = "1.33.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -17,7 +17,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "botocore_stubs"; inherit version; - hash = "sha256-ZEiLnziQX4pgBBmY+dyUV1QiLZAKM0W0SQWWZ4kMLBc="; + hash = "sha256-9f8WY8hvxlPbFk6zYTH+80sOxa51hPWVZNpuqBA9IPQ="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/click-help-colors/default.nix b/nixpkgs/pkgs/development/python-modules/click-help-colors/default.nix index 9a2983aabe8f..439a6241091c 100644 --- a/nixpkgs/pkgs/development/python-modules/click-help-colors/default.nix +++ b/nixpkgs/pkgs/development/python-modules/click-help-colors/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "click-help-colors"; - version = "0.9.2"; + version = "0.9.4"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-dWJF5ULSkia7O8BWv6WIhvISuiuC9OjPX8iEF2rJbXI="; + hash = "sha256-9Mq+Us9VApm4iI9PLuTF81msJ+M7z+TWHbR3haXMk2w="; }; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/collidoscope/default.nix b/nixpkgs/pkgs/development/python-modules/collidoscope/default.nix new file mode 100644 index 000000000000..1398043f6b1c --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/collidoscope/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, fetchPypi +, babelfont +, kurbopy +, fonttools +, skia-pathops +, tqdm +, uharfbuzz +, unittestCheckHook +}: + +buildPythonPackage rec { + pname = "collidoscope"; + version = "0.6.5"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-D7MzJ8FZjA/NSXCqCJQ9a02FPPi3t4W0q65wRIDcfSA="; + }; + + propagatedBuildInputs = [ + babelfont + kurbopy + fonttools + skia-pathops + tqdm + uharfbuzz + ]; + + doCheck = true; + nativeCheckInputs = [ + unittestCheckHook + ]; + unittestFlagsArray = [ "-s" "test" "-v" ]; + + meta = with lib; { + description = "Python library to detect glyph collisions in fonts"; + homepage = "https://github.com/googlefonts/collidoscope"; + license = licenses.mit; + maintainers = with maintainers; [ danc86 ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/commandlines/default.nix b/nixpkgs/pkgs/development/python-modules/commandlines/default.nix new file mode 100644 index 000000000000..70e37055c4dd --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/commandlines/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "commandlines"; + version = "0.4.1"; + + # PyPI source tarballs omit tests, fetch from Github instead + src = fetchFromGitHub { + owner = "chrissimpkins"; + repo = "commandlines"; + rev = "v${version}"; + hash = "sha256-x3iUeOTAaTKNW5Y5foMPMJcWVxu52uYZoY3Hhe3UvQ4="; + }; + + doCheck = true; + nativeCheckInputs = [ + pytestCheckHook + ]; + + meta = with lib; { + description = "Python library for command line argument parsing"; + homepage = "https://github.com/chrissimpkins/commandlines"; + license = licenses.mit; + maintainers = with maintainers; [ danc86 ]; + }; +} + diff --git a/nixpkgs/pkgs/development/python-modules/configupdater/default.nix b/nixpkgs/pkgs/development/python-modules/configupdater/default.nix index 2a502963c260..6016a63fbe3d 100644 --- a/nixpkgs/pkgs/development/python-modules/configupdater/default.nix +++ b/nixpkgs/pkgs/development/python-modules/configupdater/default.nix @@ -7,12 +7,12 @@ buildPythonPackage rec { pname = "configupdater"; - version = "3.1.1"; + version = "3.2"; src = fetchPypi { inherit version; pname = "ConfigUpdater"; - hash = "sha256-RvDHTXPvpyN3Z2S0PJc59oBSSV3T1zQxnB0OtYUR8Vs="; + hash = "sha256-n9rFODHBsGKSm/OYtkm4fKMOfxpzXz+/SCBygEEGMGs="; }; postPatch = '' diff --git a/nixpkgs/pkgs/development/python-modules/cx-freeze/default.nix b/nixpkgs/pkgs/development/python-modules/cx-freeze/default.nix index e8b27794ae46..ef2dd6073da0 100644 --- a/nixpkgs/pkgs/development/python-modules/cx-freeze/default.nix +++ b/nixpkgs/pkgs/development/python-modules/cx-freeze/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "cx-freeze"; - version = "6.15.10"; + version = "6.15.11"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -19,7 +19,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "cx_Freeze"; inherit version; - hash = "sha256-Bc0md1lpL1EYYdIoYNNeKgW/v3OPliwVdhi7jHcdIyA="; + hash = "sha256-xf5Ez5eC+qXAaMoc1d6RPv4PmY1ry82oQ9aGod+W7lY="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/dask-glm/default.nix b/nixpkgs/pkgs/development/python-modules/dask-glm/default.nix index 4e0357ddd823..dd5cfe0d2981 100644 --- a/nixpkgs/pkgs/development/python-modules/dask-glm/default.nix +++ b/nixpkgs/pkgs/development/python-modules/dask-glm/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "dask-glm"; - version = "0.3.0"; + version = "0.3.2"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-ddaYNBUlvsMzrku7fKrlozRmjshVbQ9yrYIlaRBQCp4="; + hash = "sha256-yUelZoZmmKAdeZeK5zIzy16DitXq1ghRQ1gsXpMLmko="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/dataprep-ml/default.nix b/nixpkgs/pkgs/development/python-modules/dataprep-ml/default.nix index 3eeac2e85b9b..3253ff91c096 100644 --- a/nixpkgs/pkgs/development/python-modules/dataprep-ml/default.nix +++ b/nixpkgs/pkgs/development/python-modules/dataprep-ml/default.nix @@ -23,7 +23,7 @@ let in buildPythonPackage rec { pname = "dataprep-ml"; - version = "0.0.18"; + version = "0.0.20"; pyproject = true; disabled = pythonOlder "3.8"; @@ -32,7 +32,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "dataprep_ml"; inherit version; - hash = "sha256-nIqyRwv62j8x5Fy7ILMLWxw6yJmkkNRE1zyUlfvRYTI="; + hash = "sha256-X6mTTj4hfnqiCPMFrc8ESFp2E7bRNELLR1uL/dGzsPg="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/dehinter/default.nix b/nixpkgs/pkgs/development/python-modules/dehinter/default.nix new file mode 100644 index 000000000000..30eae7942765 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/dehinter/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, fonttools +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "dehinter"; + version = "4.0.0"; + + # PyPI source tarballs omit tests, fetch from Github instead + src = fetchFromGitHub { + owner = "source-foundry"; + repo = "dehinter"; + rev = "v${version}"; + hash = "sha256-l988SW6OWKXzJK0WGAJZR/QDFvgnSir+5TwMMvFcOxg="; + }; + + propagatedBuildInputs = [ + fonttools + ]; + + doCheck = true; + nativeCheckInputs = [ + pytestCheckHook + ]; + + meta = with lib; { + description = "Utility for removing hinting data from TrueType and OpenType fonts"; + homepage = "https://github.com/source-foundry/dehinter"; + license = licenses.asl20; + maintainers = with maintainers; [ danc86 ]; + }; +} + diff --git a/nixpkgs/pkgs/development/python-modules/django-hijack/default.nix b/nixpkgs/pkgs/development/python-modules/django-hijack/default.nix index 5832d9a06933..60e04b184e9f 100644 --- a/nixpkgs/pkgs/development/python-modules/django-hijack/default.nix +++ b/nixpkgs/pkgs/development/python-modules/django-hijack/default.nix @@ -20,14 +20,14 @@ buildPythonPackage rec { pname = "django-hijack"; - version = "3.4.2"; + version = "3.4.3"; format = "setuptools"; src = fetchFromGitHub { owner = "django-hijack"; repo = "django-hijack"; rev = "refs/tags/${version}"; - hash = "sha256-E5gM/5MIB65gdyv/I+Kuw8rbjPvtUnbCPXpasaIDzyo="; + hash = "sha256-D9IyuM+ZsvFZL0nhMt1VQ1DYcKg4CS8FPAgSWLtsXeE="; }; postPatch = '' @@ -40,7 +40,7 @@ buildPythonPackage rec { npmDeps = fetchNpmDeps { inherit src; - hash = "sha256-4ZVb+V/oYfflIZdme6hbpoSBFVV7lk5wLfEzzBqZv/Y="; + hash = "sha256-X3bJ6STFq6zGIzXHSd2C67d4kSOVJJR5aBSM3o5T850="; }; SETUPTOOLS_SCM_PRETEND_VERSION = version; diff --git a/nixpkgs/pkgs/development/python-modules/django/5.nix b/nixpkgs/pkgs/development/python-modules/django/5.nix index 0ea8de9a4c7c..ed4f7a9162a7 100644 --- a/nixpkgs/pkgs/development/python-modules/django/5.nix +++ b/nixpkgs/pkgs/development/python-modules/django/5.nix @@ -42,14 +42,14 @@ buildPythonPackage rec { pname = "Django"; - version = "5.0b1"; + version = "5.0rc1"; pyproject = true; disabled = pythonOlder "3.10"; src = fetchPypi { inherit pname version; - hash = "sha256-yIY15zPwoO9GwhljXiHI9ZeOsqFMORgiRlRUG8XVcDA="; + hash = "sha256-pLt3plnaAyt0GpXcuVeGTzaVJ10dWB73Y3IUMA+qrzA="; }; patches = [ diff --git a/nixpkgs/pkgs/development/python-modules/downloader-cli/default.nix b/nixpkgs/pkgs/development/python-modules/downloader-cli/default.nix index 40cfd888a5d4..e6334daff641 100644 --- a/nixpkgs/pkgs/development/python-modules/downloader-cli/default.nix +++ b/nixpkgs/pkgs/development/python-modules/downloader-cli/default.nix @@ -7,16 +7,16 @@ buildPythonPackage rec { pname = "downloader-cli"; - version = "0.3.3"; + version = "0.3.4"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "deepjyoti30"; - repo = pname; - rev = version; - hash = "sha256-Dl5XIvdZInz+edL9uQv7V6Kc6FB+7hFAGe/nybnqvQU="; + repo = "downloader-cli"; + rev = "refs/tags/${version}"; + hash = "sha256-E2K3n9qCQofm4gXu1l7/0iMoJsniuzhsBUplr4aZ39s="; }; propagatedBuildInputs = [ @@ -33,6 +33,7 @@ buildPythonPackage rec { meta = with lib; { description = "Downloader with an awesome customizable progressbar"; homepage = "https://github.com/deepjyoti30/downloader-cli"; + changelog = "https://github.com/deepjyoti30/downloader-cli/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ j0hax ]; }; diff --git a/nixpkgs/pkgs/development/python-modules/duecredit/default.nix b/nixpkgs/pkgs/development/python-modules/duecredit/default.nix index 053fd6504e41..1e24f9112920 100644 --- a/nixpkgs/pkgs/development/python-modules/duecredit/default.nix +++ b/nixpkgs/pkgs/development/python-modules/duecredit/default.nix @@ -7,23 +7,22 @@ , vcrpy , citeproc-py , requests -, six }: buildPythonPackage rec { pname = "duecredit"; - version = "0.9.2"; + version = "0.9.3"; pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-Dg/Yfp5GzmyUMI6feAwgP+g22JYoQE+L9a+Wp0V77Rw="; + hash = "sha256-+DeOqQ0R+XUlkuSHySFj2oDZqf85mT64PAi/LtTso3I="; }; nativeBuildInputs = [ setuptools ]; - propagatedBuildInputs = [ citeproc-py requests six ]; + propagatedBuildInputs = [ citeproc-py requests ]; nativeCheckInputs = [ pytestCheckHook vcrpy ]; disabledTests = [ "test_import_doi" ]; # tries to access network diff --git a/nixpkgs/pkgs/development/python-modules/dvc-objects/default.nix b/nixpkgs/pkgs/development/python-modules/dvc-objects/default.nix index 217782a34e6c..041d2b1a3db1 100644 --- a/nixpkgs/pkgs/development/python-modules/dvc-objects/default.nix +++ b/nixpkgs/pkgs/development/python-modules/dvc-objects/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "dvc-objects"; - version = "1.2.0"; + version = "1.3.2"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "iterative"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-kTp0CowXtnLXetcnoCeqlXoadgaQhL5mTYTfq9QLIl8="; + hash = "sha256-30UnTbEHpGSgSGnhml7pXtPDivH9+NO7nvK4jEmRRUA="; }; SETUPTOOLS_SCM_PRETEND_VERSION = version; diff --git a/nixpkgs/pkgs/development/python-modules/eggdeps/default.nix b/nixpkgs/pkgs/development/python-modules/eggdeps/default.nix index 9f17306b7bdc..57c73ec20ba0 100644 --- a/nixpkgs/pkgs/development/python-modules/eggdeps/default.nix +++ b/nixpkgs/pkgs/development/python-modules/eggdeps/default.nix @@ -2,7 +2,7 @@ , buildPythonPackage , fetchPypi , zope_interface -, zope_testing +, zope-testing }: buildPythonPackage rec { @@ -15,7 +15,7 @@ buildPythonPackage rec { sha256 = "a094ed7961a3dd38fcaaa69cf7a58670038acdff186360166d9e3d964b7a7323"; }; - propagatedBuildInputs = [ zope_interface zope_testing ]; + propagatedBuildInputs = [ zope_interface zope-testing ]; # tests fail, see https://hydra.nixos.org/build/4316603/log/raw doCheck = false; diff --git a/nixpkgs/pkgs/development/python-modules/elasticsearch-dsl/default.nix b/nixpkgs/pkgs/development/python-modules/elasticsearch-dsl/default.nix index e5bdc6571cc9..6163c7ecc9c7 100644 --- a/nixpkgs/pkgs/development/python-modules/elasticsearch-dsl/default.nix +++ b/nixpkgs/pkgs/development/python-modules/elasticsearch-dsl/default.nix @@ -8,11 +8,11 @@ buildPythonPackage rec { pname = "elasticsearch-dsl"; - version = "8.9.0"; + version = "8.11.0"; src = fetchPypi { inherit pname version; - sha256 = "sha256-ZkEK34gfArigMuilsqPuCT/e7eS4FPvwTA9s4EmbdHI="; + sha256 = "sha256-RK9P1/YgCbsZGTtV4cIUO2kyUX5MDsMBB+f/TZaKEn4="; }; propagatedBuildInputs = [ elasticsearch python-dateutil six ]; diff --git a/nixpkgs/pkgs/development/python-modules/empy/default.nix b/nixpkgs/pkgs/development/python-modules/empy/default.nix index 544506efb0d4..22f2830a447e 100644 --- a/nixpkgs/pkgs/development/python-modules/empy/default.nix +++ b/nixpkgs/pkgs/development/python-modules/empy/default.nix @@ -2,10 +2,10 @@ buildPythonPackage rec { pname = "empy"; - version = "3.3.4"; + version = "4.0"; src = fetchPypi { inherit pname version; - sha256 = "c6xJeFtgFHnfTqGKfHm8EwSop8NMArlHLPEgauiPAbM="; + sha256 = "sha256-JNmmKyN+G1+c7Lqw6Ta/9zVAJS0R6sb95/62OxSHuOM="; }; pythonImportsCheck = [ "em" ]; meta = with lib; { diff --git a/nixpkgs/pkgs/development/python-modules/es-client/default.nix b/nixpkgs/pkgs/development/python-modules/es-client/default.nix index e0a88d607c5b..7c72732f7499 100644 --- a/nixpkgs/pkgs/development/python-modules/es-client/default.nix +++ b/nixpkgs/pkgs/development/python-modules/es-client/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { pname = "es-client"; - version = "8.10.3"; + version = "8.11.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -28,7 +28,7 @@ buildPythonPackage rec { owner = "untergeek"; repo = "es_client"; rev = "refs/tags/v${version}"; - hash = "sha256-EvE40HLNKYl38PZ2bShAhFCsX3DMYsMmusUTcAql9b4="; + hash = "sha256-VsHpWe37/CZvGm3PqVq4mJCBA9juvOD9FLmDeW8OjiM="; }; pythonRelaxDeps = true; diff --git a/nixpkgs/pkgs/development/python-modules/fake-useragent/default.nix b/nixpkgs/pkgs/development/python-modules/fake-useragent/default.nix index 50c4f5e96837..0cdcd90cbe87 100644 --- a/nixpkgs/pkgs/development/python-modules/fake-useragent/default.nix +++ b/nixpkgs/pkgs/development/python-modules/fake-useragent/default.nix @@ -10,8 +10,8 @@ buildPythonPackage rec { pname = "fake-useragent"; - version = "1.3.0"; - format = "pyproject"; + version = "1.4.0"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "fake-useragent"; repo = "fake-useragent"; rev = "refs/tags/${version}"; - hash = "sha256-erGX52ipM0scn3snICf6ipjgVbV8/H5xT4GP3AtvOwo="; + hash = "sha256-Jmzq0yIM373bg2T6t0YFymBiH9vSpiCw+UAMfxsMJvY="; }; postPatch = '' @@ -41,6 +41,10 @@ buildPythonPackage rec { pytestCheckHook ]; + pythonImportsCheck = [ + "fake_useragent" + ]; + meta = with lib; { description = "Up to date simple useragent faker with real world database"; homepage = "https://github.com/hellysmile/fake-useragent"; diff --git a/nixpkgs/pkgs/development/python-modules/faster-whisper/default.nix b/nixpkgs/pkgs/development/python-modules/faster-whisper/default.nix index 30f2174ff7da..84761c3bfa06 100644 --- a/nixpkgs/pkgs/development/python-modules/faster-whisper/default.nix +++ b/nixpkgs/pkgs/development/python-modules/faster-whisper/default.nix @@ -15,21 +15,16 @@ buildPythonPackage rec { pname = "faster-whisper"; - version = "0.9.0"; + version = "0.10.0"; format = "setuptools"; src = fetchFromGitHub { owner = "guillaumekln"; repo = "faster-whisper"; - rev = "refs/tags/v${version}"; - hash = "sha256-kHXX5Z4r7+lFRBtTCsPy9DILwsk3T1mcBzmJnCrKTdk="; + rev = "refs/tags/${version}"; + hash = "sha256-qcpPQv5WoUkT92/TZ+MMq452FgPNcm3ZZ+ZNc0btOGE="; }; - postPatch = '' - substituteInPlace requirements.txt \ - --replace "onnxruntime>=1.14,<2" "onnxruntime" - ''; - propagatedBuildInputs = [ av ctranslate2 @@ -54,7 +49,7 @@ buildPythonPackage rec { ''; meta = with lib; { - changelog = "https://github.com/guillaumekln/faster-whisper/releases/tag/v${version}"; + changelog = "https://github.com/guillaumekln/faster-whisper/releases/tag/${version}"; description = "Faster Whisper transcription with CTranslate2"; homepage = "https://github.com/guillaumekln/faster-whisper"; license = licenses.mit; diff --git a/nixpkgs/pkgs/development/python-modules/flake8-bugbear/default.nix b/nixpkgs/pkgs/development/python-modules/flake8-bugbear/default.nix index f2455cf2161f..6cf0cd7097ab 100644 --- a/nixpkgs/pkgs/development/python-modules/flake8-bugbear/default.nix +++ b/nixpkgs/pkgs/development/python-modules/flake8-bugbear/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "flake8-bugbear"; - version = "23.9.16"; + version = "23.11.28"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "PyCQA"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-fGrefEoyEgJE3danv9hG+Os79ixPzurEzLc3Dnj2M3k="; + hash = "sha256-9mVCJZmjYECi62wYRmyipAl3B1wqyDU/nTSNcA7oc04="; }; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/flask-seasurf/0001-Fix-with-new-dependency-versions.patch b/nixpkgs/pkgs/development/python-modules/flask-seasurf/0001-Fix-with-new-dependency-versions.patch new file mode 100644 index 000000000000..c12c85e0de25 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/flask-seasurf/0001-Fix-with-new-dependency-versions.patch @@ -0,0 +1,257 @@ +From 001549503eed364d4baaa5804242f67c6236f6c2 Mon Sep 17 00:00:00 2001 +From: Flakebi <flakebi@t-online.de> +Date: Sat, 2 Dec 2023 16:55:05 +0100 +Subject: [PATCH] Fix with new dependency versions + +- cookie_jar is private in werkzeug 2.3, so recreate the client instead +- set_cookie does not take a hostname argument anymore, use domain instead +- Headers need to specify a content type +--- + test_seasurf.py | 63 ++++++++++++++++++++++++------------------------- + 1 file changed, 31 insertions(+), 32 deletions(-) + +diff --git a/test_seasurf.py b/test_seasurf.py +index 517b2d7..501f82d 100644 +--- a/test_seasurf.py ++++ b/test_seasurf.py +@@ -71,18 +71,18 @@ class SeaSurfTestCase(BaseTestCase): + self.assertEqual(type(token), str) + + def test_exempt_view(self): +- rv = self.app.test_client().post('/foo') ++ rv = self.app.test_client().post('/foo', content_type='application/json') + self.assertIn(b('bar'), rv.data) + +- rv = self.app.test_client().post(u'/foo/\xf8') ++ rv = self.app.test_client().post(u'/foo/\xf8', content_type='application/json') + self.assertIn(b('bar'), rv.data) + + def test_token_validation(self): + # should produce a logger warning +- rv = self.app.test_client().post('/bar') ++ rv = self.app.test_client().post('/bar', content_type='application/json') + self.assertIn(b('403 Forbidden'), rv.data) + +- rv = self.app.test_client().post(u'/bar/\xf8') ++ rv = self.app.test_client().post(u'/bar/\xf8', content_type='application/json') + self.assertIn(b('403 Forbidden'), rv.data) + + def test_json_token_validation_bad(self): +@@ -107,7 +107,7 @@ class SeaSurfTestCase(BaseTestCase): + data = {'_csrf_token': token} + with self.app.test_client() as client: + with client.session_transaction() as sess: +- client.set_cookie('www.example.com', self.csrf._csrf_name, token) ++ client.set_cookie(self.csrf._csrf_name, token, domain='www.example.com') + sess[self.csrf._csrf_name] = token + + rv = client.post('/bar', data=data) +@@ -121,7 +121,7 @@ class SeaSurfTestCase(BaseTestCase): + with client.session_transaction() as sess: + token = self.csrf._generate_token() + +- client.set_cookie('www.example.com', self.csrf._csrf_name, token) ++ client.set_cookie(self.csrf._csrf_name, token, domain='www.example.com') + sess[self.csrf._csrf_name] = token + + # once this is reached the session was stored +@@ -144,7 +144,7 @@ class SeaSurfTestCase(BaseTestCase): + with client.session_transaction() as sess: + token = self.csrf._generate_token() + +- client.set_cookie('www.example.com', self.csrf._csrf_name, token) ++ client.set_cookie(self.csrf._csrf_name, token, domain='www.example.com') + sess[self.csrf._csrf_name] = token + + # once this is reached the session was stored +@@ -167,7 +167,7 @@ class SeaSurfTestCase(BaseTestCase): + with client.session_transaction() as sess: + token = self.csrf._generate_token() + +- client.set_cookie('www.example.com', self.csrf._csrf_name, token) ++ client.set_cookie(self.csrf._csrf_name, token, domain='www.example.com') + sess[self.csrf._csrf_name] = token + + rv = client.post('/bar', +@@ -187,10 +187,10 @@ class SeaSurfTestCase(BaseTestCase): + self.csrf._csrf_header_name: token, + } + +- rv = client.post('/bar', headers=headers) ++ rv = client.post('/bar', headers=headers, content_type='application/json') + self.assertEqual(rv.status_code, 200, rv) + +- rv = client.post(u'/bar/\xf8', headers=headers) ++ rv = client.post(u'/bar/\xf8', headers=headers, content_type='application/json') + self.assertEqual(rv.status_code, 200, rv) + + def test_token_in_form_data(self): +@@ -280,14 +280,14 @@ class SeaSurfTestCaseExemptViews(BaseTestCase): + + def test_exempt_view(self): + with self.app.test_client() as c: +- rv = c.post('/foo') ++ rv = c.post('/foo', content_type='application/json') + self.assertIn(b('bar'), rv.data) + cookie = get_cookie(rv, self.csrf._csrf_name) + self.assertEqual(cookie, None) + + def test_token_validation(self): + # should produce a logger warning +- rv = self.app.test_client().post('/bar') ++ rv = self.app.test_client().post('/bar', content_type='application/json') + self.assertIn(b('403 Forbidden'), rv.data) + + +@@ -319,18 +319,18 @@ class SeaSurfTestCaseIncludeViews(BaseTestCase): + return 'foo' + + def test_include_view(self): +- rv = self.app.test_client().post('/foo') ++ rv = self.app.test_client().post('/foo', content_type='application/json') + self.assertIn(b('403 Forbidden'), rv.data) + +- rv = self.app.test_client().post(u'/foo/\xf8') ++ rv = self.app.test_client().post(u'/foo/\xf8', content_type='application/json') + self.assertIn(b('403 Forbidden'), rv.data) + + def test_token_validation(self): + # should produce a logger warning +- rv = self.app.test_client().post('/bar') ++ rv = self.app.test_client().post('/bar', content_type='application/json') + self.assertIn(b('foo'), rv.data) + +- rv = self.app.test_client().post(u'/bar/\xf8') ++ rv = self.app.test_client().post(u'/bar/\xf8', content_type='application/json') + self.assertIn(b('foo'), rv.data) + + +@@ -363,10 +363,10 @@ class SeaSurfTestCaseExemptUrls(BaseTestCase): + return 'foo' + + def test_exempt_view(self): +- rv = self.app.test_client().post('/foo/baz') ++ rv = self.app.test_client().post('/foo/baz', content_type='application/json') + self.assertIn(b('bar'), rv.data) + with self.app.test_client() as c: +- rv = c.post('/foo/quz') ++ rv = c.post('/foo/quz', content_type='application/json') + self.assertIn(b('bar'), rv.data) + cookie = get_cookie(rv, self.csrf._csrf_name) + self.assertEqual(cookie, None) +@@ -374,7 +374,7 @@ class SeaSurfTestCaseExemptUrls(BaseTestCase): + def test_token_validation(self): + with self.app.test_client() as c: + # should produce a logger warning +- rv = c.post('/bar') ++ rv = c.post('/bar', content_type='application/json') + self.assertIn(b('403 Forbidden'), rv.data) + cookie = get_cookie(rv, self.csrf._csrf_name) + token = self.csrf._get_token() +@@ -434,7 +434,7 @@ class SeaSurfTestCaseDisableCookie(unittest.TestCase): + + def test_no_csrf_cookie_even_after_manually_validated(self): + with self.app.test_client() as c: +- rv = c.post('/manual') ++ rv = c.post('/manual', content_type='application/json') + self.assertIn(b('403 Forbidden'), rv.data) + cookie = get_cookie(rv, self.csrf._csrf_name) + self.assertEqual(cookie, None) +@@ -474,14 +474,14 @@ class SeaSurfTestCaseEnableCookie(unittest.TestCase): + + def test_has_csrf_cookie(self): + with self.app.test_client() as c: +- rv = c.post('/exempt_with_cookie') ++ rv = c.post('/exempt_with_cookie', content_type='application/json') + cookie = get_cookie(rv, self.csrf._csrf_name) + token = self.csrf._get_token() + self.assertEqual(cookie, token) + + def test_has_csrf_cookie_but_doesnt_validate(self): + with self.app.test_client() as c: +- rv = c.post('/exempt_with_cookie') ++ rv = c.post('/exempt_with_cookie', content_type='application/json') + self.assertIn(b('exempt_with_cookie'), rv.data) + cookie = get_cookie(rv, self.csrf._csrf_name) + token = self.csrf._get_token() +@@ -530,7 +530,7 @@ class SeaSurfTestCaseSkipValidation(unittest.TestCase): + + def test_skips_validation(self): + with self.app.test_client() as c: +- rv = c.post('/foo/quz') ++ rv = c.post('/foo/quz', content_type='application/json') + self.assertIn(b('bar'), rv.data) + cookie = get_cookie(rv, self.csrf._csrf_name) + token = self.csrf._get_token() +@@ -538,20 +538,20 @@ class SeaSurfTestCaseSkipValidation(unittest.TestCase): + + def test_enforces_validation_reject(self): + with self.app.test_client() as c: +- rv = c.delete('/foo/baz') ++ rv = c.delete('/foo/baz', content_type='application/json') + self.assertIn(b('403 Forbidden'), rv.data) + + def test_enforces_validation_accept(self): + with self.app.test_client() as c: + # GET generates CSRF token + c.get('/foo/baz') +- rv = c.delete('/foo/baz', ++ rv = c.delete('/foo/baz', content_type='application/json', + headers={'X-CSRFToken': self.csrf._get_token()}) + self.assertIn(b('bar'), rv.data) + + def test_manual_validation(self): + with self.app.test_client() as c: +- rv = c.post('/manual') ++ rv = c.post('/manual', content_type='application/json') + self.assertIn(b('403 Forbidden'), rv.data) + + +@@ -578,7 +578,7 @@ class SeaSurfTestManualValidation(unittest.TestCase): + + def test_can_manually_validate_exempt_views(self): + with self.app.test_client() as c: +- rv = c.post('/manual') ++ rv = c.post('/manual', content_type='application/json') + self.assertIn(b('403 Forbidden'), rv.data) + cookie = get_cookie(rv, self.csrf._csrf_name) + token = self.csrf._get_token() +@@ -651,7 +651,7 @@ class SeaSurfTestCaseReferer(BaseTestCase): + with client.session_transaction() as sess: + token = self.csrf._generate_token() + +- client.set_cookie('www.example.com', self.csrf._csrf_name, token) ++ client.set_cookie(self.csrf._csrf_name, token, domain='www.example.com') + sess[self.csrf._csrf_name] = token + + # once this is reached the session was stored +@@ -728,8 +728,7 @@ class SeaSurfTestCaseSetCookie(BaseTestCase): + res3.headers.get('Set-Cookie', ''), + 'CSRF cookie always be re-set if a token is requested by the template') + +- client.cookie_jar.clear() +- ++ with self.app.test_client() as client: + res4 = client.get('/foo') + + self.assertIn(self.csrf._csrf_name, +@@ -739,14 +738,14 @@ class SeaSurfTestCaseSetCookie(BaseTestCase): + def test_header_set_on_post(self): + with self.app.test_client() as client: + headers = {} +- res1 = client.post('/bar', headers=headers) ++ res1 = client.post('/bar', headers=headers, content_type='application/json') + self.assertEqual(res1.status_code, 403) + + for cookie in client.cookie_jar: + if cookie.name == self.csrf._csrf_name: + headers[self.csrf._csrf_header_name] = cookie.value + +- res2 = client.post('/bar', headers=headers) ++ res2 = client.post('/bar', headers=headers, content_type='application/json') + self.assertEqual(res2.status_code, 200) + + def test_header_set_cookie_samesite(self): +-- +2.42.0 + diff --git a/nixpkgs/pkgs/development/python-modules/flask-seasurf/default.nix b/nixpkgs/pkgs/development/python-modules/flask-seasurf/default.nix index 79d024f5b34f..26dd2d7f5e08 100644 --- a/nixpkgs/pkgs/development/python-modules/flask-seasurf/default.nix +++ b/nixpkgs/pkgs/development/python-modules/flask-seasurf/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, buildPythonPackage, isPy3k, flask, mock, unittestCheckHook }: +{ lib, fetchFromGitHub, fetchpatch, buildPythonPackage, isPy3k, flask, mock, unittestCheckHook }: buildPythonPackage rec { pname = "Flask-SeaSurf"; @@ -12,6 +12,20 @@ buildPythonPackage rec { hash = "sha256-L/ZUEqqHmsyXG5eShcITII36ttwQlZN5GBngo+GcCdw="; }; + patches = [ + # Remove usage of deprecated flask._app_ctx_stack + (fetchpatch { + url = "https://github.com/maxcountryman/flask-seasurf/commit/9039764a4e44aeb1acb6ae7747deb438bee0826b.patch"; + hash = "sha256-bVYzJN6MXzH3fNMknd2bh+04JlPJRkU0cLcWv+Rigqc="; + }) + ./0001-Fix-with-new-dependency-versions.patch + ]; + + postPatch = '' + # Disable some tests, pytest is not supported + sed -i "s#\(\(test_header_set_on_post\|test_https_good_referer\|test_https_referer_check_disabled\)(self):\)#\1\n return#g" test_seasurf.py + ''; + propagatedBuildInputs = [ flask ]; nativeCheckInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/flask-themes2/default.nix b/nixpkgs/pkgs/development/python-modules/flask-themes2/default.nix index 56c03ca39e0c..b4cd08bdcf09 100644 --- a/nixpkgs/pkgs/development/python-modules/flask-themes2/default.nix +++ b/nixpkgs/pkgs/development/python-modules/flask-themes2/default.nix @@ -1,20 +1,36 @@ -{ lib, fetchPypi, buildPythonPackage, flask, pythonOlder, pytestCheckHook }: +{ lib +, buildPythonPackage +, pythonOlder +, fetchPypi +, setuptools +, flask +, pytestCheckHook +}: buildPythonPackage rec { pname = "flask-themes2"; - version = "1.0.0"; - format = "setuptools"; + version = "1.0.1"; + pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { pname = "Flask-Themes2"; inherit version; - hash = "sha256-0U0cSdBddb9+IG3CU6zUPlxaJhQlxOV6OLgxnNDChy8="; + hash = "sha256-gsMgQQXjhDfQRhm7H0kBy8jKxd75WY+PhHR6Rk/PUPs="; }; - nativeCheckInputs = [ pytestCheckHook ]; - propagatedBuildInputs = [ flask ]; + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + flask + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; meta = with lib; { description = "Easily theme your Flask app"; diff --git a/nixpkgs/pkgs/development/python-modules/font-v/default.nix b/nixpkgs/pkgs/development/python-modules/font-v/default.nix new file mode 100644 index 000000000000..8a43dd52adea --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/font-v/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, fonttools +, git +, gitpython +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "font-v"; + version = "2.1.0"; + + # PyPI source tarballs omit tests, fetch from Github instead + src = fetchFromGitHub { + owner = "source-foundry"; + repo = "font-v"; + rev = "v${version}"; + hash = "sha256-ceASyYcNul5aWPAPGajCQrqsQ3bN1sE+nMbCbj7f35w="; + }; + + propagatedBuildInputs = [ + fonttools + gitpython + ]; + + doCheck = true; + nativeCheckInputs = [ + git + pytestCheckHook + ]; + preCheck = '' + # Many tests assume they are running from a git checkout, although they + # don't care which one. Create a dummy git repo to satisfy the tests: + git init -b main + git config user.email test@example.invalid + git config user.name Test + git commit --allow-empty --message 'Dummy commit for tests' + ''; + disabledTests = [ + # These tests assume they are actually running from a font-v git checkout, + # so just skip them: + "test_utilities_get_gitrootpath_function" + ]; + + meta = with lib; { + description = "Python utility for manipulating font version headers"; + homepage = "https://github.com/source-foundry/font-v"; + license = licenses.mit; + maintainers = with maintainers; [ danc86 ]; + }; +} + diff --git a/nixpkgs/pkgs/development/python-modules/fontawesomefree/default.nix b/nixpkgs/pkgs/development/python-modules/fontawesomefree/default.nix index 437259ff6d3e..dea884ab0b30 100644 --- a/nixpkgs/pkgs/development/python-modules/fontawesomefree/default.nix +++ b/nixpkgs/pkgs/development/python-modules/fontawesomefree/default.nix @@ -5,7 +5,7 @@ buildPythonPackage rec { pname = "fontawesomefree"; - version = "6.4.2"; + version = "6.5.1"; format = "wheel"; # they only provide a wheel @@ -13,7 +13,7 @@ buildPythonPackage rec { inherit pname version format; dist = "py3"; python = "py3"; - hash = "sha256-zq/378T8Odrf88P/cpinoQlUAxENNz8iRWuxw0q22wI="; + hash = "sha256-jexKLuN7+OUzeeu/DTjO/sTgbHySJ/Wa8527exYygXs="; }; pythonImportsCheck = [ diff --git a/nixpkgs/pkgs/development/python-modules/fontbakery/default.nix b/nixpkgs/pkgs/development/python-modules/fontbakery/default.nix new file mode 100644 index 000000000000..b824ca990b8a --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/fontbakery/default.nix @@ -0,0 +1,146 @@ +{ lib +, buildPythonPackage +, callPackage +, fetchpatch +, fetchPypi +, axisregistry +, babelfont +, beautifulsoup4 +, beziers +, cmarkgfm +, collidoscope +, defcon +, dehinter +, fonttools +, font-v +, freetype-py +, gflanguages +, git +, glyphsets +, lxml +, installShellFiles +, munkres +, opentypespec +, ots-python +, packaging +, pip-api +, protobuf +, pytestCheckHook +, pytest-xdist +, pythonRelaxDepsHook +, pyyaml +, requests +, requests-mock +, rich +, setuptools-scm +, shaperglot +, stringbrewer +, toml +, unicodedata2 +, ufo2ft +, ufolint +, vharfbuzz +}: + +buildPythonPackage rec { + pname = "fontbakery"; + version = "0.10.4"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-Ye/TMGvURxSU2yoohwYbSo5RvrmbHKdMnFNj2lUvtMk="; + }; + + patches = [ + # Mock HTTP requests in tests (note we still have to skip some below) + # https://github.com/googlefonts/fontbakery/pull/4124 + (fetchpatch { + url = "https://github.com/fonttools/fontbakery/pull/4124.patch"; + hash = "sha256-NXuC2+TtxpHYMdd0t+cF0FJ3lrh4exP5yxspEasKKd0="; + }) + ]; + + propagatedBuildInputs = [ + axisregistry + babelfont + beautifulsoup4 + beziers + cmarkgfm + collidoscope + defcon + dehinter + fonttools + font-v + freetype-py + gflanguages + glyphsets + lxml + munkres + ots-python + opentypespec + packaging + pip-api + protobuf + pyyaml + requests + rich + shaperglot + stringbrewer + toml + ufolint + unicodedata2 + vharfbuzz + ufo2ft + ]; + nativeBuildInputs = [ + installShellFiles + pythonRelaxDepsHook + setuptools-scm + ]; + + pythonRelaxDeps = [ + "collidoscope" + "protobuf" + "vharfbuzz" + ]; + + doCheck = true; + nativeCheckInputs = [ + git + pytestCheckHook + pytest-xdist + requests-mock + ufolint + ]; + preCheck = '' + # Let the tests invoke 'fontbakery' command. + export PATH="$out/bin:$PATH" + # font-v tests assume they are running from a git checkout, although they + # don't care which one. Create a dummy git repo to satisfy the tests: + git init -b main + git config user.email test@example.invalid + git config user.name Test + git commit --allow-empty --message 'Dummy commit for tests' + ''; + disabledTests = [ + # These require network access: + "test_check_vertical_metrics_regressions" + "test_check_cjk_vertical_metrics_regressions" + "test_check_fontbakery_version_live_apis" + ]; + + postInstall = '' + installShellCompletion --bash --name fontbakery \ + snippets/fontbakery.bash-completion + ''; + + passthru.tests.simple = callPackage ./tests.nix { }; + + meta = with lib; { + description = "Tool for checking the quality of font projects"; + homepage = "https://github.com/googlefonts/fontbakery"; + license = licenses.asl20; + maintainers = with maintainers; [ danc86 ]; + }; +} + diff --git a/nixpkgs/pkgs/development/python-modules/fontbakery/tests.nix b/nixpkgs/pkgs/development/python-modules/fontbakery/tests.nix new file mode 100644 index 000000000000..4725b1fee3e3 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/fontbakery/tests.nix @@ -0,0 +1,22 @@ +{ runCommand +, fontbakery +}: + +let + inherit (fontbakery) pname version src; +in + +runCommand "${pname}-tests" { meta.timeout = 5; } '' + # Check the version matches what we packaged. + ${fontbakery}/bin/fontbakery --version | grep -q "${version}" + + # Can it list its own subcommands? + ${fontbakery}/bin/fontbakery --list-subcommands >>$out + + # Unpack src to get some test fonts. + tar -xzf ${src} --strip-components=1 ${pname}-${version}/data/test + + # Run some font checks. + ${fontbakery}/bin/fontbakery check-ufo-sources --no-progress --no-colors data/test/test.ufo >>$out + # TODO add more +'' diff --git a/nixpkgs/pkgs/development/python-modules/fontfeatures/default.nix b/nixpkgs/pkgs/development/python-modules/fontfeatures/default.nix new file mode 100644 index 000000000000..2ea5247d38c8 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/fontfeatures/default.nix @@ -0,0 +1,50 @@ +{ lib +, buildPythonPackage +, fetchPypi +, fetchpatch +, beziers +, fonttools +, fs +, glyphtools +, lxml +, pytestCheckHook +, youseedee +}: + +buildPythonPackage rec { + pname = "fontfeatures"; + version = "1.8.0"; + + src = fetchPypi { + pname = "fontFeatures"; + inherit version; + hash = "sha256-XLJD91IyUUjeSqdhWFfIqv9yISPcbU4bgRvXETSHOiY="; + }; + + propagatedBuildInputs = [ + beziers + fonttools + fs + glyphtools + lxml + youseedee + ]; + + doCheck = true; + nativeCheckInputs = [ + pytestCheckHook + ]; + disabledTestPaths = [ + # These tests require babelfont but we have to leave it out and skip them + # to break the cyclic dependency with babelfont. + "tests/test_shaping_generic.py" + "tests/test_shaping_harfbuzz.py" + ]; + + meta = with lib; { + description = "Python library for compiling OpenType font features"; + homepage = "https://github.com/simoncozens/fontFeatures"; + license = licenses.bsd3; + maintainers = with maintainers; [ danc86 ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/frozendict/default.nix b/nixpkgs/pkgs/development/python-modules/frozendict/default.nix index 6bd1622fa44d..7b746f364c98 100644 --- a/nixpkgs/pkgs/development/python-modules/frozendict/default.nix +++ b/nixpkgs/pkgs/development/python-modules/frozendict/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "frozendict"; - version = "2.3.9"; + version = "2.3.10"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "Marco-Sulla"; repo = "python-frozendict"; rev = "refs/tags/v${version}"; - hash = "sha256-wVsTsUK6TES6YLGZGcHcGufrdVQrODyXrqczae8iTJ0="; + hash = "sha256-GUpCN5CsCJGuIfdsmgZHQvByA145RLI1l7aVEueqjDM="; }; # build C version if it exists diff --git a/nixpkgs/pkgs/development/python-modules/fschat/default.nix b/nixpkgs/pkgs/development/python-modules/fschat/default.nix index 573009b2a5ea..44420ae6c61f 100644 --- a/nixpkgs/pkgs/development/python-modules/fschat/default.nix +++ b/nixpkgs/pkgs/development/python-modules/fschat/default.nix @@ -29,7 +29,7 @@ , protobuf }: let - version = "0.2.32"; + version = "0.2.33"; in buildPythonPackage { pname = "fschat"; @@ -40,7 +40,7 @@ buildPythonPackage { owner = "lm-sys"; repo = "FastChat"; rev = "refs/tags/v${version}"; - hash = "sha256-3IJcqVULOK0Nf72sgv80q9U8QZ3pNHLYaNwCQohdBB8="; + hash = "sha256-tfFgiYJBuVt71qHOmkDoSrZ2tvXStjubmkw7sexkGZg="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/garminconnect/default.nix b/nixpkgs/pkgs/development/python-modules/garminconnect/default.nix index 423cfd34a70f..90b70e8906c8 100644 --- a/nixpkgs/pkgs/development/python-modules/garminconnect/default.nix +++ b/nixpkgs/pkgs/development/python-modules/garminconnect/default.nix @@ -10,8 +10,8 @@ buildPythonPackage rec { pname = "garminconnect"; - version = "0.2.9"; - format = "pyproject"; + version = "0.2.11"; + pyproject = true; disabled = pythonOlder "3.10"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "cyberjunky"; repo = "python-garminconnect"; rev = "refs/tags/${version}"; - hash = "sha256-wQWOksI0nfzIMdxgZehMmNytuXWD22GLUNoI7Ki0C3s="; + hash = "sha256-T8flktIBRhtXpxd17bqrocncgpIfinMDvVwvaoltZAs="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/gehomesdk/default.nix b/nixpkgs/pkgs/development/python-modules/gehomesdk/default.nix index 7e1d88cde508..93ef73227310 100644 --- a/nixpkgs/pkgs/development/python-modules/gehomesdk/default.nix +++ b/nixpkgs/pkgs/development/python-modules/gehomesdk/default.nix @@ -13,14 +13,14 @@ buildPythonPackage rec { pname = "gehomesdk"; - version = "0.5.23"; + version = "0.5.25"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-6Xk7wAF0bZrHriSyDMnPfaPRBiVinHawj3nEqpwbUmo="; + hash = "sha256-VQSefwzw4zA9ycO8723kBlMbtrOJxmKgZ8tfXZmtyQc="; }; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/geopy/default.nix b/nixpkgs/pkgs/development/python-modules/geopy/default.nix index 3a25b434c301..52adbbe07eed 100644 --- a/nixpkgs/pkgs/development/python-modules/geopy/default.nix +++ b/nixpkgs/pkgs/development/python-modules/geopy/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "geopy"; - version = "2.4.0"; + version = "2.4.1"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = pname; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-3Sq76DcnoG0Uv/KPF/B3oep0MO96vemKiANjgR7/k/I="; + hash = "sha256-mlOXDEtYry1IUAZWrP2FuY/CGliUnCPYLULnLNN0n4Y="; }; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/gflanguages/default.nix b/nixpkgs/pkgs/development/python-modules/gflanguages/default.nix new file mode 100644 index 000000000000..baaeeb6c9339 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/gflanguages/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchPypi +, protobuf +, setuptools-scm +, pythonRelaxDepsHook +, pytestCheckHook +, uharfbuzz +, youseedee +}: + +buildPythonPackage rec { + pname = "gflanguages"; + version = "0.5.10"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-JVeI7TlJjbKCa+gGmjylbNiEhX3qmpbLXiH3VpFqgXc="; + }; + + propagatedBuildInputs = [ + protobuf + ]; + nativeBuildInputs = [ + setuptools-scm + ]; + + doCheck = true; + nativeCheckInputs = [ + pythonRelaxDepsHook + pytestCheckHook + uharfbuzz + youseedee + ]; + + # Relax the dependency on protobuf 3. Other packages in the Google Fonts + # ecosystem have begun upgrading from protobuf 3 to protobuf 4, + # so we need to use protobuf 4 here as well to avoid a conflict + # in the closure of fontbakery. It seems to be compatible enough. + pythonRelaxDeps = [ "protobuf" ]; + + meta = with lib; { + description = "Python library for Google Fonts language metadata"; + homepage = "https://github.com/googlefonts/lang"; + license = licenses.asl20; + maintainers = with maintainers; [ danc86 ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/glfw/default.nix b/nixpkgs/pkgs/development/python-modules/glfw/default.nix index db9f369a3497..d39daf9e9dc2 100644 --- a/nixpkgs/pkgs/development/python-modules/glfw/default.nix +++ b/nixpkgs/pkgs/development/python-modules/glfw/default.nix @@ -20,10 +20,8 @@ buildPythonPackage rec { }; # Patch path to GLFW shared object - patches = [ ./search-path.patch ]; - postPatch = '' - substituteInPlace glfw/library.py --replace "@GLFW@" '${glfw3}/lib' + substituteInPlace glfw/library.py --replace "_get_library_search_paths()," "[ '${glfw3}/lib' ]," ''; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/glfw/search-path.patch b/nixpkgs/pkgs/development/python-modules/glfw/search-path.patch deleted file mode 100644 index 0c4a42ceb362..000000000000 --- a/nixpkgs/pkgs/development/python-modules/glfw/search-path.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/glfw/library.py b/glfw/library.py -index 20387e1..9bdd62a 100644 ---- a/glfw/library.py -+++ b/glfw/library.py -@@ -189,5 +189,4 @@ elif sys.platform == 'win32': - except OSError: - pass - else: -- glfw = _load_library(['glfw', 'glfw3'], ['.so', '.dylib'], -- _get_library_search_paths(), _glfw_get_version) -+ glfw = _load_library(['glfw', 'glfw3'], ['.so', '.dylib'], ['@GLFW@'], _glfw_get_version) diff --git a/nixpkgs/pkgs/development/python-modules/glyphsets/0001-relax-setuptools-scm-dep.patch b/nixpkgs/pkgs/development/python-modules/glyphsets/0001-relax-setuptools-scm-dep.patch new file mode 100644 index 000000000000..96a4047c5ced --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/glyphsets/0001-relax-setuptools-scm-dep.patch @@ -0,0 +1,22 @@ +From de2e02a41b11a708d58dfd1e24d335b8882dd7bd Mon Sep 17 00:00:00 2001 +From: Dan Callaghan <djc@djc.id.au> +Date: Sun, 23 Apr 2023 12:15:47 +1000 +Subject: [PATCH] relax setuptools-scm dep + + +diff --git a/setup.py b/setup.py +index 2c122a7..42f9b61 100644 +--- a/setup.py ++++ b/setup.py +@@ -55,7 +55,7 @@ + 'Programming Language :: Python :: 3' + ], + python_requires=">=3.7", +- setup_requires=['setuptools_scm>=4,<6.1'], ++ setup_requires=['setuptools_scm'], + install_requires=[ + 'setuptools', + 'FontTools[ufo]', +-- +2.38.4 + diff --git a/nixpkgs/pkgs/development/python-modules/glyphsets/default.nix b/nixpkgs/pkgs/development/python-modules/glyphsets/default.nix new file mode 100644 index 000000000000..5088deb580b0 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/glyphsets/default.nix @@ -0,0 +1,55 @@ +{ lib +, buildPythonPackage +, fetchPypi +, defcon +, fonttools +, glyphslib +, pytestCheckHook +, setuptools +, setuptools-scm +, unicodedata2 +}: + +buildPythonPackage rec { + pname = "glyphsets"; + version = "0.6.5"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-Zp4VLJ9h6lkz7KOM7LWKAj7UX1KziLobzeT9Dosv5UU="; + }; + + patches = [ + # Upstream has a needlessly strict version range for setuptools_scm, our + # setuptools-scm is newer. We can't use pythonRelaxDepsHook for this + # because it's in setup_requires which means we'll fail the requirement + # before pythonRelaxDepsHook can run. + ./0001-relax-setuptools-scm-dep.patch + ]; + + propagatedBuildInputs = [ + defcon + fonttools + glyphslib + setuptools + unicodedata2 + ]; + nativeBuildInputs = [ + setuptools-scm + ]; + + doCheck = true; + nativeCheckInputs = [ + pytestCheckHook + ]; + preCheck = '' + export PATH="$out/bin:$PATH" + ''; + + meta = with lib; { + description = "Google Fonts glyph set metadata"; + homepage = "https://github.com/googlefonts/glyphsets"; + license = licenses.asl20; + maintainers = with maintainers; [ danc86 ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/glyphslib/default.nix b/nixpkgs/pkgs/development/python-modules/glyphslib/default.nix index 2a0276a3c7e3..65cbc5b3b205 100644 --- a/nixpkgs/pkgs/development/python-modules/glyphslib/default.nix +++ b/nixpkgs/pkgs/development/python-modules/glyphslib/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "glyphslib"; - version = "6.4.1"; + version = "6.6.0"; format = "pyproject"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "googlefonts"; repo = "glyphsLib"; rev = "refs/tags/v${version}"; - hash = "sha256-pDFPn1KDiZ5yw1UzPgi0+Syv3h606bsOOzLbdOiag8s="; + hash = "sha256-2Y7JhaZJXKERQXEI9cDCx7m95El6AicU0t+X3Gntbxk="; }; SETUPTOOLS_SCM_PRETEND_VERSION = version; diff --git a/nixpkgs/pkgs/development/python-modules/glyphtools/default.nix b/nixpkgs/pkgs/development/python-modules/glyphtools/default.nix new file mode 100644 index 000000000000..f186863459a7 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/glyphtools/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchPypi +, beziers +, glyphslib +, numpy +, setuptoolsCheckHook +}: + +buildPythonPackage rec { + pname = "glyphtools"; + version = "0.8.0"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-PXwXHWMJbsi6ZtN+daaXAnlw3gV5DFAhyRxdBa7UP+M="; + }; + + propagatedBuildInputs = [ + beziers + glyphslib + numpy + ]; + + # A unit test suite does exist, but it only contains a dummy test that + # doesn't test anything. It does import the module though so we still run it. + doCheck = true; + nativeCheckInputs = [ + # Upstream apparently prefers the deprecated setuptools 'test' command. + setuptoolsCheckHook + ]; + + meta = with lib; { + description = "Python library for extracting information from font glyphs"; + homepage = "https://github.com/simoncozens/glyphtools"; + license = licenses.asl20; + maintainers = with maintainers; [ danc86 ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/google-cloud-runtimeconfig/default.nix b/nixpkgs/pkgs/development/python-modules/google-cloud-runtimeconfig/default.nix index 67d050c2e722..781218fa7a20 100644 --- a/nixpkgs/pkgs/development/python-modules/google-cloud-runtimeconfig/default.nix +++ b/nixpkgs/pkgs/development/python-modules/google-cloud-runtimeconfig/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "google-cloud-runtimeconfig"; - version = "0.33.2"; + version = "0.33.3"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-MPmyvm2FSrUzb1y5i4xl5Cqea6sxixLoZ7V1hxNi7hw="; + hash = "sha256-4sv5wua03gLd9YqwdD8P/VaKv4LcacB42fK5hUAt2vQ="; }; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/gptcache/default.nix b/nixpkgs/pkgs/development/python-modules/gptcache/default.nix index ea2c09eed4a3..ce04d7df2273 100644 --- a/nixpkgs/pkgs/development/python-modules/gptcache/default.nix +++ b/nixpkgs/pkgs/development/python-modules/gptcache/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "gptcache"; - version = "0.1.42"; + version = "0.1.43"; format = "setuptools"; disabled = pythonOlder "3.8.1"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "zilliztech"; repo = "GPTCache"; rev = "refs/tags/${version}"; - hash = "sha256-rrPs5ZwBooltVcvrs4AHObx69xmZ8F+IP/lJGPVTNXY="; + hash = "sha256-EDsHzl55j4sehbKk0/be+WOl83f1/7zPLvPyzKnTBP4="; }; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/grpcio-channelz/default.nix b/nixpkgs/pkgs/development/python-modules/grpcio-channelz/default.nix index f827c8508122..1063dfdb5d9d 100644 --- a/nixpkgs/pkgs/development/python-modules/grpcio-channelz/default.nix +++ b/nixpkgs/pkgs/development/python-modules/grpcio-channelz/default.nix @@ -8,12 +8,12 @@ buildPythonPackage rec { pname = "grpcio-channelz"; - version = "1.59.2"; + version = "1.59.3"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-apOnMd8EDU+ocj6fL/dkl3tqh6en/Q8H9K/lgvkqFN8="; + hash = "sha256-R2rk/4yQ0ldy6yZeauVtEpmmF0Jnx61NMw98y3D5kq4="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/grpcio-health-checking/default.nix b/nixpkgs/pkgs/development/python-modules/grpcio-health-checking/default.nix index 4c028e4ec71c..f758a8bf2504 100644 --- a/nixpkgs/pkgs/development/python-modules/grpcio-health-checking/default.nix +++ b/nixpkgs/pkgs/development/python-modules/grpcio-health-checking/default.nix @@ -8,12 +8,12 @@ buildPythonPackage rec { pname = "grpcio-health-checking"; - version = "1.59.0"; + version = "1.59.3"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-4CIcpupsITlhQXmAi4+LMjA30LG977D8TN2agUmZVx4="; + hash = "sha256-AVAXzkFk/H3Ogdo6FxiksxUyMOSBss3r85JGi2E/B2Y="; }; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/grpcio-reflection/default.nix b/nixpkgs/pkgs/development/python-modules/grpcio-reflection/default.nix index cd0506870a27..7ed24e849ccd 100644 --- a/nixpkgs/pkgs/development/python-modules/grpcio-reflection/default.nix +++ b/nixpkgs/pkgs/development/python-modules/grpcio-reflection/default.nix @@ -8,12 +8,12 @@ buildPythonPackage rec { pname = "grpcio-reflection"; - version = "1.59.2"; + version = "1.59.3"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-l5bcvFnc+59tVGXVnn+mKld3o+TVqolPRIVciWpG+os="; + hash = "sha256-VAPFpzjG7sS7QIDad+RQMS2s5BqG4pKsN8/QB7JlfU4="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/gspread/default.nix b/nixpkgs/pkgs/development/python-modules/gspread/default.nix index f71690c877e2..0e56dd26cb8d 100644 --- a/nixpkgs/pkgs/development/python-modules/gspread/default.nix +++ b/nixpkgs/pkgs/development/python-modules/gspread/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "gspread"; - version = "5.12.0"; + version = "5.12.1"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "burnash"; repo = "gspread"; rev = "refs/tags/v${version}"; - hash = "sha256-v6kpje5rw3/OfcoMWdSCZdkmETyIJ08cly8lLUt9j64="; + hash = "sha256-cuSR5QWURHSL1o2R4rc/m3KETz3X+78TC8LuuzZghbs="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/html2image/default.nix b/nixpkgs/pkgs/development/python-modules/html2image/default.nix new file mode 100644 index 000000000000..2b99f6bffeee --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/html2image/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, requests +, websocket-client +}: + +buildPythonPackage rec { + pname = "html2image"; + version = "2.0.4.3"; + pyproject = true; + + src = fetchFromGitHub { + owner = "vgalin"; + repo = "html2image"; + rev = version; + hash = "sha256-BDl2Kibp1WOAOYNlXa2aaEgQTitk+OZu72OgytciZYI="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace poetry.masonry.api poetry.core.masonry.api \ + --replace "poetry>=" "poetry-core>=" + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + requests + websocket-client + ]; + + pythonImportsCheck = [ "html2image" ]; + + meta = with lib; { + description = "A package acting as a wrapper around the headless mode of existing web browsers to generate images from URLs and from HTML+CSS strings or files"; + homepage = "https://github.com/vgalin/html2image"; + changelog = "https://github.com/vgalin/html2image/releases/tag/${version}"; + license = licenses.mit; + maintainers = with maintainers; [ happysalada ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/icontract/default.nix b/nixpkgs/pkgs/development/python-modules/icontract/default.nix index 76e1814ddddd..e525cf89cca2 100644 --- a/nixpkgs/pkgs/development/python-modules/icontract/default.nix +++ b/nixpkgs/pkgs/development/python-modules/icontract/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "icontract"; - version = "2.6.4"; + version = "2.6.6"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -22,7 +22,7 @@ buildPythonPackage rec { owner = "Parquery"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-zuaS9mmq47hUIBObYRuzEYQQdTArFXR3TpK9nfZt/yk="; + hash = "sha256-R5/FBfuTvXItfTlNZMSnO18Q+etnHbQyXFWpaOpOLes="; }; preCheck = '' diff --git a/nixpkgs/pkgs/development/python-modules/imapclient/default.nix b/nixpkgs/pkgs/development/python-modules/imapclient/default.nix index 58c45f992236..6301970392ac 100644 --- a/nixpkgs/pkgs/development/python-modules/imapclient/default.nix +++ b/nixpkgs/pkgs/development/python-modules/imapclient/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "imapclient"; - version = "3.0.0"; + version = "3.0.1"; format = "setuptools"; @@ -15,7 +15,7 @@ buildPythonPackage rec { owner = "mjs"; repo = "imapclient"; rev = "refs/tags/${version}"; - hash = "sha256-ylYGh+78I+6pdvHuQPw8Gks9TLkXQL5HQiaZDnJK3DA="; + hash = "sha256-WY3OLPUwixrL2NSLfNBSSNMXJEoYBL+O6KoglU3Cz9g="; }; propagatedBuildInputs = [ six ]; diff --git a/nixpkgs/pkgs/development/python-modules/inquirer/default.nix b/nixpkgs/pkgs/development/python-modules/inquirer/default.nix index 1d13d50804af..8ca4ed136fe9 100644 --- a/nixpkgs/pkgs/development/python-modules/inquirer/default.nix +++ b/nixpkgs/pkgs/development/python-modules/inquirer/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { pname = "inquirer"; - version = "3.1.3"; + version = "3.1.4"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -28,7 +28,7 @@ buildPythonPackage rec { owner = "magmax"; repo = "python-inquirer"; rev = "refs/tags/v${version}"; - hash = "sha256-7GfHsCQgnDUdiM1z9YNdDuwMNy6rLjR1UTnZMgpQ5k4="; + hash = "sha256-1xaxLIk4GFRpcodhBX+Co9TgpYkWhB/D4OE4Nny4ijM="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/intellifire4py/default.nix b/nixpkgs/pkgs/development/python-modules/intellifire4py/default.nix index ff7dad6f0be0..8c7a9f69d50e 100644 --- a/nixpkgs/pkgs/development/python-modules/intellifire4py/default.nix +++ b/nixpkgs/pkgs/development/python-modules/intellifire4py/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "intellifire4py"; - version = "3.1.30"; + version = "3.5.0"; pyproject = true; disabled = pythonOlder "3.7"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "jeeftor"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-CIcudKyRPVJX6QvWk6dBbYnO5EULREDhaflJTAfJEvc="; + hash = "sha256-lbBQbcVhozca7gYkeUFClS+5WaPaTajQMdfqDL07xdk="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/ipykernel/default.nix b/nixpkgs/pkgs/development/python-modules/ipykernel/default.nix index 74cb52629af5..d1b970c34a2e 100644 --- a/nixpkgs/pkgs/development/python-modules/ipykernel/default.nix +++ b/nixpkgs/pkgs/development/python-modules/ipykernel/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "ipykernel"; - version = "6.25.2"; - format = "pyproject"; + version = "6.27.1"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-9Gjd0fF6y0jIzmf8+km6bUbU+awEOMH0Qb58PRNyIws="; + hash = "sha256-fV1ZS2aQZUtNKZ7bpehy3Be7c5ao0GCcl8t7ihxgXeY="; }; # debugpy is optional, see https://github.com/ipython/ipykernel/pull/767 @@ -55,6 +55,6 @@ buildPythonPackage rec { description = "IPython Kernel for Jupyter"; homepage = "https://ipython.org/"; license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ fridh ]; + maintainers = with lib.maintainers; [ fridh ] ++ lib.teams.jupyter.members; }; } diff --git a/nixpkgs/pkgs/development/python-modules/ipykernel/tests.nix b/nixpkgs/pkgs/development/python-modules/ipykernel/tests.nix index edbb13912ad9..0de6d2feb4ae 100644 --- a/nixpkgs/pkgs/development/python-modules/ipykernel/tests.nix +++ b/nixpkgs/pkgs/development/python-modules/ipykernel/tests.nix @@ -5,9 +5,10 @@ , flaky , ipykernel , ipyparallel -, nose +, pre-commit , pytestCheckHook - +, pytest-asyncio +, pytest-timeout }: buildPythonPackage { @@ -22,15 +23,26 @@ buildPythonPackage { flaky ipykernel ipyparallel - nose + pre-commit pytestCheckHook + pytest-asyncio + pytest-timeout ]; preCheck = '' export HOME=$(mktemp -d) ''; - disabledTests = lib.optionals stdenv.isDarwin ([ + disabledTests = [ # The follwing three tests fail for unclear reasons. + # pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-8 + "test_asyncio_interrupt" + + # DeprecationWarning: Passing unrecognized arguments to super(IPythonKernel) + "test_embed_kernel_func" + + # traitlets.config.configurable.MultipleInstanceError: An incompatible siblin... + "test_install_kernelspec" + ] ++ lib.optionals stdenv.isDarwin ([ # see https://github.com/NixOS/nixpkgs/issues/76197 "test_subprocess_print" "test_subprocess_error" diff --git a/nixpkgs/pkgs/development/python-modules/jaxlib/bin.nix b/nixpkgs/pkgs/development/python-modules/jaxlib/bin.nix index 4030bd5e4041..d80cbc2a6018 100644 --- a/nixpkgs/pkgs/development/python-modules/jaxlib/bin.nix +++ b/nixpkgs/pkgs/development/python-modules/jaxlib/bin.nix @@ -34,11 +34,7 @@ let inherit (cudaPackages) cudatoolkit cudnn; -in - -assert cudaSupport -> lib.versionAtLeast cudatoolkit.version "11.1" && lib.versionAtLeast cudnn.version "8.2" && stdenv.isLinux; -let version = "0.4.20"; inherit (python) pythonVersion; @@ -213,5 +209,9 @@ buildPythonPackage { license = licenses.asl20; maintainers = with maintainers; [ samuela ]; platforms = [ "aarch64-darwin" "x86_64-linux" "x86_64-darwin" ]; + broken = + !(cudaSupport -> (cudaPackages ? cudatoolkit) && lib.versionAtLeast cudatoolkit.version "11.1") + || !(cudaSupport -> (cudaPackages ? cudnn) && lib.versionAtLeast cudnn.version "8.2") + || !(cudaSupport -> stdenv.isLinux); }; } diff --git a/nixpkgs/pkgs/development/python-modules/jplephem/default.nix b/nixpkgs/pkgs/development/python-modules/jplephem/default.nix index d945d9c11c56..017d8bda6652 100644 --- a/nixpkgs/pkgs/development/python-modules/jplephem/default.nix +++ b/nixpkgs/pkgs/development/python-modules/jplephem/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "jplephem"; - version = "2.20"; + version = "2.21"; src = fetchPypi { inherit pname version; - hash = "sha256-u5htUI6kbGiTaomWiaZE21+grznJpQRCIImgA+yg4fo="; + hash = "sha256-NBlLYQaV8huJIXuYUrjautvOgISMs2nZVn7xLcSCjVU="; }; propagatedBuildInputs = [ numpy ]; diff --git a/nixpkgs/pkgs/development/python-modules/kurbopy/default.nix b/nixpkgs/pkgs/development/python-modules/kurbopy/default.nix new file mode 100644 index 000000000000..aa5e33f23757 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/kurbopy/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, fetchPypi +, fonttools +, pytestCheckHook +, python +, rustPlatform +, unzip +}: + +buildPythonPackage rec { + pname = "kurbopy"; + version = "0.10.40"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-dhpcDi20Na6SDbRxrC8N3SWdN1J/CWJgCUI3scJX/6s="; + }; + + propagatedBuildInputs = [ + fonttools + ]; + nativeBuildInputs = [ + rustPlatform.cargoSetupHook + rustPlatform.maturinBuildHook + ]; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-V3LeT0dqkfft1ftc+azwvuSzzdUJ7/wAp31fN7te9RQ="; + }; + + doCheck = true; + nativeCheckInputs = [ + pytestCheckHook + ]; + preCheck = '' + # pytestCheckHook puts . at the front of Python's sys.path, due to: + # https://github.com/NixOS/nixpkgs/issues/255262 + # So we need to prevent pytest from trying to import kurbopy from + # ./kurbopy, which contains the sources but not the newly built module. + # We want it to import kurbopy from the nix store via $PYTHONPATH instead. + rm -r kurbopy + ''; + + meta = with lib; { + description = "Python wrapper around the Rust kurbo library for 2D curve manipulation"; + homepage = "https://github.com/simoncozens/kurbopy"; + license = licenses.asl20; + maintainers = with maintainers; [ danc86 ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/langsmith/default.nix b/nixpkgs/pkgs/development/python-modules/langsmith/default.nix index 3b81c6128887..78337124ca8f 100644 --- a/nixpkgs/pkgs/development/python-modules/langsmith/default.nix +++ b/nixpkgs/pkgs/development/python-modules/langsmith/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "langsmith"; - version = "0.0.63"; + version = "0.0.69"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "langchain-ai"; repo = "langsmith-sdk"; rev = "refs/tags/v${version}"; - hash = "sha256-KE+WMnuWAq1stZuuwZkOPOKQ2lZNKtxzNbZMRoOdmz0="; + hash = "sha256-LP97bGCmLw2uFcFdFcDWM7hSuki7r7T6WFHI6i3rF34="; }; sourceRoot = "${src.name}/python"; diff --git a/nixpkgs/pkgs/development/python-modules/latexify-py/default.nix b/nixpkgs/pkgs/development/python-modules/latexify-py/default.nix index f56055e55fd7..ccda72eb03d7 100644 --- a/nixpkgs/pkgs/development/python-modules/latexify-py/default.nix +++ b/nixpkgs/pkgs/development/python-modules/latexify-py/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "latexify-py"; - version = "0.4.1"; + version = "0.4.2"; pyproject = true; disabled = pythonOlder "3.7"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "google"; repo = "latexify_py"; rev = "refs/tags/v${version}"; - hash = "sha256-sxXfm4zJJT+94jcSsYH7Ky3XwFOniSNxvcVUAsgz8u0="; + hash = "sha256-bBtAtBJfpStNYWhOJoypDI9hhE4g1ZFHBU8p6S1yCgU="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/license-expression/default.nix b/nixpkgs/pkgs/development/python-modules/license-expression/default.nix index bd95899398f8..71443bb0144a 100644 --- a/nixpkgs/pkgs/development/python-modules/license-expression/default.nix +++ b/nixpkgs/pkgs/development/python-modules/license-expression/default.nix @@ -9,16 +9,16 @@ buildPythonPackage rec { pname = "license-expression"; - version = "30.1.1"; - format = "setuptools"; + version = "30.2.0"; + pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "nexB"; repo = "license-expression"; rev = "refs/tags/v${version}"; - hash = "sha256-5pRfFRQLxWmhEKoJZiC7gZbmW8BbqBNBWbdwFL0MtpM="; + hash = "sha256-vsQsHi2jdB0OiV6stm1APjQvr+238UoKgaaeXVx/isI="; }; SETUPTOOLS_SCM_PRETEND_VERSION = version; diff --git a/nixpkgs/pkgs/development/python-modules/litellm/default.nix b/nixpkgs/pkgs/development/python-modules/litellm/default.nix index ef70a50f70d1..d25adcdf65c0 100644 --- a/nixpkgs/pkgs/development/python-modules/litellm/default.nix +++ b/nixpkgs/pkgs/development/python-modules/litellm/default.nix @@ -6,9 +6,16 @@ , openai , python-dotenv , tiktoken +, tokenizers +, click +, jinja2 +, certifi +, appdirs +, aiohttp +, httpx }: let - version = "0.11.1"; + version = "1.7.11"; in buildPythonPackage rec { pname = "litellm"; @@ -19,7 +26,7 @@ buildPythonPackage rec { owner = "BerriAI"; repo = "litellm"; rev = "refs/tags/v${version}"; - hash = "sha256-5Zk1lc7G0dU/AoLE5V+p30wE/gRfYRPsVS3sNgwWzCU="; + hash = "sha256-B2LGaA6A+pU2aDzPS2d5stY+Z8Wxq3BkXB1CLY6vBiY="; }; postPatch = '' @@ -31,10 +38,16 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ - importlib-metadata openai python-dotenv tiktoken + importlib-metadata + tokenizers + click + jinja2 + certifi + appdirs + aiohttp ]; # the import check phase fails trying to do a network request to openai diff --git a/nixpkgs/pkgs/development/python-modules/luddite/default.nix b/nixpkgs/pkgs/development/python-modules/luddite/default.nix index 26570a1540b6..e70493e750c0 100644 --- a/nixpkgs/pkgs/development/python-modules/luddite/default.nix +++ b/nixpkgs/pkgs/development/python-modules/luddite/default.nix @@ -1,31 +1,31 @@ { lib , buildPythonPackage , fetchFromGitHub -, setuptools +, packaging , pytestCheckHook -, pytest-socket , pytest-mock }: buildPythonPackage rec { pname = "luddite"; - version = "1.0.2"; + version = "1.0.3"; src = fetchFromGitHub { owner = "jumptrading"; repo = pname; rev = "v${version}"; - sha256 = "8/7uwO5HLhyXYt+T6VUO/O7TN9+FfRlT8y0r5+CJ/l4="; + hash = "sha256-JXIM7/5LO95oabM16GwAt3v3a8uldGpGXDWmVic8Ins="; }; postPatch = '' substituteInPlace pytest.ini \ - --replace "--cov=luddite --cov-report=html --cov-report=term --no-cov-on-fail" "" + --replace "--cov=luddite --cov-report=html --cov-report=term --no-cov-on-fail" "" \ + --replace "--disable-socket" "" ''; - propagatedBuildInputs = [ setuptools ]; + propagatedBuildInputs = [ packaging ]; - nativeCheckInputs = [ pytestCheckHook pytest-socket pytest-mock ]; + nativeCheckInputs = [ pytestCheckHook pytest-mock ]; pythonImportsCheck = [ "luddite" ]; meta = with lib; { diff --git a/nixpkgs/pkgs/development/python-modules/luqum/default.nix b/nixpkgs/pkgs/development/python-modules/luqum/default.nix index 2c9f78fc583c..afad9262c7b3 100644 --- a/nixpkgs/pkgs/development/python-modules/luqum/default.nix +++ b/nixpkgs/pkgs/development/python-modules/luqum/default.nix @@ -1,40 +1,61 @@ { lib , buildPythonPackage +, elastic-transport +, elasticsearch-dsl , fetchFromGitHub -, pythonOlder -# dependencies , ply -# test dependencies -, elasticsearch-dsl +, pytestCheckHook +, pythonOlder +, setuptools }: -let + +buildPythonPackage rec { pname = "luqum"; version = "0.13.0"; -in -buildPythonPackage { - inherit pname version; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "jurismarches"; - repo = pname; - rev = version; + repo = "luqum"; + rev = "refs/tags/${version}"; hash = "sha256-lcJCLl0crCl3Y5UlWBMZJR2UtVP96gaJNRxwY9Xn7TM="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace '--doctest-modules --doctest-glob="test_*.rst" --cov=luqum --cov-branch --cov-report html --no-cov-on-fail' "" + ''; + + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ ply ]; nativeCheckInputs = [ + elastic-transport elasticsearch-dsl + pytestCheckHook + ]; + + pythonImportsCheck = [ + "luqum" + ]; + + disabledTestPaths = [ + # Tests require an Elasticsearch instance + "tests/test_elasticsearch/test_es_integration.py" + "tests/test_elasticsearch/test_es_naming.py" ]; meta = with lib; { - description = "A lucene query parser generating ElasticSearch queries and more !"; + description = "A lucene query parser generating ElasticSearch queries"; homepage = "https://github.com/jurismarches/luqum"; + changelog = "https://github.com/jurismarches/luqum/releases/tag/${version}"; license = licenses.asl20; maintainers = with maintainers; [ happysalada ]; }; diff --git a/nixpkgs/pkgs/development/python-modules/mailchecker/default.nix b/nixpkgs/pkgs/development/python-modules/mailchecker/default.nix index 4701b456e09a..62b97f53b1e8 100644 --- a/nixpkgs/pkgs/development/python-modules/mailchecker/default.nix +++ b/nixpkgs/pkgs/development/python-modules/mailchecker/default.nix @@ -2,20 +2,25 @@ , buildPythonPackage , fetchPypi , pythonOlder +, setuptools }: buildPythonPackage rec { pname = "mailchecker"; - version = "5.0.9"; - format = "setuptools"; + version = "6.0.1"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-iwg5B9pC2qRI2T6xnwyXjd4uhWVhel52Jxs1pfcoXM0="; + hash = "sha256-PXo6dfiAqC1WD/z5NBI6UZVUl/cwlvoqKDyfZI4fn2s="; }; + nativeBuildInputs = [ + setuptools + ]; + # Module has no tests doCheck = false; diff --git a/nixpkgs/pkgs/development/python-modules/maison/default.nix b/nixpkgs/pkgs/development/python-modules/maison/default.nix index 03d4c5c05d87..fc868ffefd2c 100644 --- a/nixpkgs/pkgs/development/python-modules/maison/default.nix +++ b/nixpkgs/pkgs/development/python-modules/maison/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "maison"; - version = "1.4.1"; + version = "1.4.2"; pyproject = true; disabled = pythonOlder "3.7"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "dbatten5"; repo = "maison"; rev = "refs/tags/v${version}"; - hash = "sha256-uJW+7+cIt+jnbiC+HvT7KzyNk1enEtELTxtfc4eXAPU="; + hash = "sha256-XNo7QS8BCYzkDozLW0T+KMQPI667lDTCFtOqKq9q3hw="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/manuel/default.nix b/nixpkgs/pkgs/development/python-modules/manuel/default.nix index c0040947488f..abec37fc5ed1 100644 --- a/nixpkgs/pkgs/development/python-modules/manuel/default.nix +++ b/nixpkgs/pkgs/development/python-modules/manuel/default.nix @@ -5,7 +5,7 @@ , python , isPy27 , six -, zope_testing +, zope-testing }: buildPythonPackage rec { @@ -29,7 +29,7 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ six ]; - nativeCheckInputs = [ zope_testing ]; + nativeCheckInputs = [ zope-testing ]; meta = with lib; { description = "A documentation builder"; diff --git a/nixpkgs/pkgs/development/python-modules/meep/default.nix b/nixpkgs/pkgs/development/python-modules/meep/default.nix index 1e0dbb166839..d99b5c3e2e0c 100644 --- a/nixpkgs/pkgs/development/python-modules/meep/default.nix +++ b/nixpkgs/pkgs/development/python-modules/meep/default.nix @@ -33,13 +33,13 @@ assert !lapack.isILP64; buildPythonPackage rec { pname = "meep"; - version = "1.27.0"; + version = "1.28.0"; src = fetchFromGitHub { owner = "NanoComp"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-9ha6YPlvq2HUTuEqngFOAJUqCahBi7L7O8qsIMMfbrY="; + hash = "sha256-o/Xrd/Gn1RsbB+ZfggGH6/ugdsGtfTe2RgaHdpY5AyE="; }; format = "other"; diff --git a/nixpkgs/pkgs/development/python-modules/millheater/default.nix b/nixpkgs/pkgs/development/python-modules/millheater/default.nix index 7f2fe358c2fe..33f52d0cea67 100644 --- a/nixpkgs/pkgs/development/python-modules/millheater/default.nix +++ b/nixpkgs/pkgs/development/python-modules/millheater/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "millheater"; - version = "0.11.6"; + version = "0.11.7"; format = "setuptools"; disabled = pythonOlder "3.10"; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "Danielhiversen"; repo = "pymill"; rev = "refs/tags/${version}"; - hash = "sha256-qd9JuZv1utwL523eiQ79P3hXuVQ8+teTatOJCtI6v00="; + hash = "sha256-jqtyJHoG/8tgv4OJleb7DV6C7pCpgplieLykfvO3cNM="; }; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/mkdocs-swagger-ui-tag/default.nix b/nixpkgs/pkgs/development/python-modules/mkdocs-swagger-ui-tag/default.nix index 0bd3f97175ce..85687b1882ba 100644 --- a/nixpkgs/pkgs/development/python-modules/mkdocs-swagger-ui-tag/default.nix +++ b/nixpkgs/pkgs/development/python-modules/mkdocs-swagger-ui-tag/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "mkdocs-swagger-ui-tag"; - version = "0.6.6"; + version = "0.6.7"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "Blueswen"; repo = "mkdocs-swagger-ui-tag"; rev = "refs/tags/v${version}"; - hash = "sha256-NEFogrLJjOh98rChlJuxAeTj31yyL4OoE/jBUcHbBZM="; + hash = "sha256-lvE/mN56X2fx835GFNDYQc7ptxBYqwjrJ9Z6Flcvufg="; }; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/mkdocstrings/default.nix b/nixpkgs/pkgs/development/python-modules/mkdocstrings/default.nix index d8fb50f586b2..219f0e63c7b1 100644 --- a/nixpkgs/pkgs/development/python-modules/mkdocstrings/default.nix +++ b/nixpkgs/pkgs/development/python-modules/mkdocstrings/default.nix @@ -1,35 +1,36 @@ { lib , buildPythonPackage , fetchFromGitHub +, importlib-metadata , jinja2 , markdown , markupsafe , mkdocs , mkdocs-autorefs +, pdm-backend , pymdown-extensions , pytestCheckHook -, pdm-backend , pythonOlder +, typing-extensions }: buildPythonPackage rec { pname = "mkdocstrings"; - version = "0.23.0"; - format = "pyproject"; + version = "0.24.0"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "mkdocstrings"; - repo = pname; + repo = "mkdocstrings"; rev = "refs/tags/${version}"; - hash = "sha256-t7wxm600XgYl1jsqjOpZdWcmqR9qafdKTaz/xDPdDPY="; + hash = "sha256-UqX2jNNYwDNhb71qGdjHNoo2MmSxjf/bZiUoSxlE2XQ="; }; postPatch = '' substituteInPlace pyproject.toml \ - --replace 'dynamic = ["version"]' 'version = "${version}"' \ - --replace 'license = "ISC"' 'license = {text = "ISC"}' + --replace 'dynamic = ["version"]' 'version = "${version}"' ''; nativeBuildInputs = [ @@ -43,6 +44,9 @@ buildPythonPackage rec { mkdocs mkdocs-autorefs pymdown-extensions + ] ++ lib.optionals (pythonOlder "3.10") [ + importlib-metadata + typing-extensions ]; nativeCheckInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/mujoco/default.nix b/nixpkgs/pkgs/development/python-modules/mujoco/default.nix new file mode 100644 index 000000000000..2392de3847bd --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/mujoco/default.nix @@ -0,0 +1,70 @@ +{ buildPythonPackage +, cmake +, fetchPypi +, glfw +, lib +, mujoco +, numpy +, perl +, pkgs +, pybind11 +, python +, setuptools +}: + +buildPythonPackage rec { + pname = "mujoco"; + version = "3.0.1"; + + pyproject = true; + + # We do not fetch from the repository because the PyPi tarball is + # impurely build via + # <https://github.com/google-deepmind/mujoco/blob/main/python/make_sdist.sh> + # in the project's CI. + src = fetchPypi { + inherit pname version; + hash = "sha256-pftecOk4q19qKBHs9hBBVenI+SgJg9VT7vc6NKuiY0s="; + }; + + nativeBuildInputs = [ cmake setuptools ]; + dontUseCmakeConfigure = true; + buildInputs = [ mujoco pybind11 ]; + propagatedBuildInputs = [ glfw numpy ]; + + pythonImportsCheck = [ "${pname}" ]; + + env.MUJOCO_PATH = "${mujoco}"; + env.MUJOCO_PLUGIN_PATH = "${mujoco}/lib"; + env.MUJOCO_CMAKE_ARGS = "-DMUJOCO_SIMULATE_USE_SYSTEM_GLFW=ON"; + + preConfigure = + # Use system packages for pybind + '' + ${perl}/bin/perl -0777 -i -pe "s/(findorfetch\(.{3}USE_SYSTEM_PACKAGE.{3})(OFF)(.{3}PACKAGE_NAME.{3}pybind11.*\))/\1ON\3/gms" mujoco/CMakeLists.txt + '' + + # Use non-system eigen3, lodepng, abseil: Remove mirror info and prefill + # dependency directory. $build from setuptools. + (let + # E.g. 3.11.2 -> "311" + pythonVersionMajorMinor = with lib.versions; + "${major python.pythonVersion}${minor python.pythonVersion}"; + in '' + ${perl}/bin/perl -0777 -i -pe "s/GIT_REPO\n.*\n.*GIT_TAG\n.*\n//gm" mujoco/CMakeLists.txt + ${perl}/bin/perl -0777 -i -pe "s/(FetchContent_Declare\(\n.*lodepng\n.*)(GIT_REPO.*\n.*GIT_TAG.*\n)(.*\))/\1\3/gm" mujoco/simulate/CMakeLists.txt + + build="/build/${pname}-${version}/build/temp.linux-x86_64-cpython-${pythonVersionMajorMinor}/" + mkdir -p $build/_deps + ln -s ${mujoco.pin.lodepng} $build/_deps/lodepng-src + ln -s ${mujoco.pin.eigen3} $build/_deps/eigen-src + ln -s ${mujoco.pin.abseil-cpp} $build/_deps/abseil-cpp-src + ''); + + meta = with lib; { + description = + "Python bindings for MuJoCo: a general purpose physics simulator."; + homepage = "https://mujoco.org/"; + license = licenses.asl20; + maintainers = with maintainers; [ tmplt ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/nethsm/default.nix b/nixpkgs/pkgs/development/python-modules/nethsm/default.nix new file mode 100644 index 000000000000..902fa62e3387 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/nethsm/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonRelaxDepsHook +, flit-core +, certifi +, cryptography +, python-dateutil +, typing-extensions +, urllib3 +}: + +let + pname = "nethsm"; + version = "1.0.0"; +in + +buildPythonPackage { + inherit pname version; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-sENuSdA4pYt8v2w2RvDkcQLYCP9V0vZOdWOlkNBi3/o="; + }; + + propagatedBuildInputs = [ + certifi + cryptography + python-dateutil + typing-extensions + urllib3 + ]; + + nativeBuildInputs = [ + flit-core + pythonRelaxDepsHook + ]; + + pythonRelaxDeps = true; + + pythonImportsCheck = [ "nethsm" ]; + + meta = with lib; { + description = "Client-side Python SDK for NetHSM"; + homepage = "https://github.com/Nitrokey/nethsm-sdk-py"; + changelog = "https://github.com/Nitrokey/nethsm-sdk-py/releases/tag/v${version}"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ frogamic ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/numpy-stl/default.nix b/nixpkgs/pkgs/development/python-modules/numpy-stl/default.nix index fd2ad5c5e8c1..155d1c60b175 100644 --- a/nixpkgs/pkgs/development/python-modules/numpy-stl/default.nix +++ b/nixpkgs/pkgs/development/python-modules/numpy-stl/default.nix @@ -11,11 +11,11 @@ buildPythonPackage rec { pname = "numpy-stl"; - version = "3.0.1"; + version = "3.1.1"; src = fetchPypi { inherit pname version; - hash = "sha256-3U2ho3nSYy8WhRi+jc2c3dftxsMjgJT9jSFHazWGoLw="; + hash = "sha256-947qYsgJOL9T6pFPpbbJL0SPDqtWCeDlpzfd4DlAQzQ="; }; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/oauthenticator/default.nix b/nixpkgs/pkgs/development/python-modules/oauthenticator/default.nix index ae8d6737380e..9bc3ced1208b 100644 --- a/nixpkgs/pkgs/development/python-modules/oauthenticator/default.nix +++ b/nixpkgs/pkgs/development/python-modules/oauthenticator/default.nix @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "oauthenticator"; - version = "16.2.0"; + version = "16.2.1"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-z5CFFfVJYeXaDFVPYaBOfUMzgl+Uvn3LYS5Zn1AHRy0="; + hash = "sha256-qJrreq2GhJxrX9keZOYVzjihs0RCymad+MGErW5ecPc="; }; postPatch = '' diff --git a/nixpkgs/pkgs/development/python-modules/oelint-parser/default.nix b/nixpkgs/pkgs/development/python-modules/oelint-parser/default.nix index 37d6dd8b54e8..d36bc9004e33 100644 --- a/nixpkgs/pkgs/development/python-modules/oelint-parser/default.nix +++ b/nixpkgs/pkgs/development/python-modules/oelint-parser/default.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "oelint-parser"; - version = "2.11.6"; + version = "2.12.0"; format = "setuptools"; src = fetchPypi { inherit version; pname = "oelint_parser"; - hash = "sha256-CTZxxKZPrAvuWGhwD7qAPG10rry0H71QSRXbGT0J3J0="; + hash = "sha256-0Ic7WKQbwA7TnFvXRZz+mFehjWP6n+Pyp0IySMy8sdw="; }; buildInputs = [ pip ]; diff --git a/nixpkgs/pkgs/development/python-modules/openai/default.nix b/nixpkgs/pkgs/development/python-modules/openai/default.nix index 89a02ae69f15..3c13e035bf02 100644 --- a/nixpkgs/pkgs/development/python-modules/openai/default.nix +++ b/nixpkgs/pkgs/development/python-modules/openai/default.nix @@ -1,30 +1,32 @@ { lib , buildPythonPackage , fetchFromGitHub -, aiohttp -, matplotlib +, pythonOlder +, hatchling +# propagated +, httpx +, pydantic +, typing-extensions +, anyio +, distro +, sniffio +, tqdm +# optional , numpy -, openpyxl , pandas , pandas-stubs -, plotly +# tests +, pytestCheckHook , pytest-asyncio , pytest-mock -, pytestCheckHook -, pythonOlder -, requests -, scikit-learn -, tenacity -, tqdm -, typing-extensions -, wandb -, withOptionalDependencies ? false +, respx +, dirty-equals }: buildPythonPackage rec { pname = "openai"; - version = "0.28.1"; - format = "setuptools"; + version = "1.3.7"; + pyproject = true; disabled = pythonOlder "3.7.1"; @@ -32,35 +34,30 @@ buildPythonPackage rec { owner = "openai"; repo = "openai-python"; rev = "refs/tags/v${version}"; - hash = "sha256-liJyeGxnYIC/jUQKdeATHpVJb/12KGbeM94Y2YQphfY="; + hash = "sha256-Pa53s3U5vby1Fq14WMCJnSR6KA3xkVHmBexkNoX/0sk="; }; + nativeBuildInputs = [ + hatchling + ]; + propagatedBuildInputs = [ - aiohttp - requests + httpx + pydantic + anyio + distro + sniffio tqdm ] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions - ] ++ lib.optionals withOptionalDependencies (builtins.attrValues { - inherit (passthru.optional-dependencies) embeddings wandb; - }); + ]; passthru.optional-dependencies = { datalib = [ numpy - openpyxl pandas pandas-stubs ]; - embeddings = [ - matplotlib - plotly - scikit-learn - tenacity - ] ++ passthru.optional-dependencies.datalib; - wandb = [ - wandb - ] ++ passthru.optional-dependencies.datalib; }; pythonImportsCheck = [ @@ -71,21 +68,16 @@ buildPythonPackage rec { pytestCheckHook pytest-asyncio pytest-mock - ]; - - pytestFlagsArray = [ - "openai/tests" + respx + dirty-equals ]; OPENAI_API_KEY = "sk-foo"; disabledTestPaths = [ - # Requires a real API key - "openai/tests/test_endpoints.py" - "openai/tests/asyncio/test_endpoints.py" - # openai: command not found - "openai/tests/test_file_cli.py" - "openai/tests/test_long_examples_validator.py" + # makes network requests + "tests/test_client.py" + "tests/api_resources" ]; meta = with lib; { diff --git a/nixpkgs/pkgs/development/python-modules/opentsne/default.nix b/nixpkgs/pkgs/development/python-modules/opentsne/default.nix index 9fc3c7fe8143..ba3e0b8460b1 100644 --- a/nixpkgs/pkgs/development/python-modules/opentsne/default.nix +++ b/nixpkgs/pkgs/development/python-modules/opentsne/default.nix @@ -7,7 +7,7 @@ , scipy , scikit-learn , pytestCheckHook -, nix-update-script +, pythonOlder , setuptools , wheel }: @@ -15,14 +15,16 @@ let self = buildPythonPackage rec { pname = "opentsne"; - version = "1.0.0"; - format = "pyproject"; + version = "1.0.1"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "pavlin-policar"; repo = "openTSNE"; - rev = "v${version}"; - hash = "sha256-L5Qx6dMJlXF3EaWwlFTQ3dkhGXc5PvQBXYJo+QO+Hxc="; + rev = "refs/tags/v${version}"; + hash = "sha256-UTfEjjNz1mm5fhyTw9GRlMNURwWlr6kLMjrMngkFV3Y="; }; nativeBuildInputs = [ @@ -32,13 +34,19 @@ let wheel ]; - propagatedBuildInputs = [ numpy scipy scikit-learn ]; + propagatedBuildInputs = [ + numpy + scipy + scikit-learn + ]; + + pythonImportsCheck = [ + "openTSNE" + ]; - pythonImportsCheck = [ "openTSNE" ]; doCheck = false; passthru = { - updateScript = nix-update-script {}; tests.pytest = self.overridePythonAttrs (old: { pname = "${old.pname}-tests"; format = "other"; @@ -53,12 +61,12 @@ let }); }; - meta = { + meta = with lib; { description = "Modular Python implementation of t-Distributed Stochasitc Neighbor Embedding"; homepage = "https://github.com/pavlin-policar/openTSNE"; - changelog = "https://github.com/pavlin-policar/openTSNE/releases/tag/${version}"; - license = [ lib.licenses.bsd3 ]; - maintainers = [ lib.maintainers.lucasew ]; + changelog = "https://github.com/pavlin-policar/openTSNE/releases/tag/v${version}"; + license = licenses.bsd3; + maintainers = with maintainers; [ lucasew ]; }; }; in self diff --git a/nixpkgs/pkgs/development/python-modules/opentypespec/default.nix b/nixpkgs/pkgs/development/python-modules/opentypespec/default.nix new file mode 100644 index 000000000000..c4bf0cde2c97 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/opentypespec/default.nix @@ -0,0 +1,29 @@ +{ lib +, buildPythonPackage +, fetchPypi +, unittestCheckHook +}: + +buildPythonPackage rec { + pname = "opentypespec"; + version = "1.9.1"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-fOEHmtlCkFhn1jyIA+CsHIfud7x3PPb7UWQsnrVyDqY="; + }; + + doCheck = true; + nativeCheckInputs = [ + unittestCheckHook + ]; + unittestFlagsArray = [ "-s" "test" "-v" ]; + + meta = with lib; { + description = "Python library for OpenType specification metadata"; + homepage = "https://github.com/simoncozens/opentypespec-py"; + license = licenses.asl20; + maintainers = with maintainers; [ danc86 ]; + }; +} + diff --git a/nixpkgs/pkgs/development/python-modules/ots-python/0001-use-packaged-ots.patch b/nixpkgs/pkgs/development/python-modules/ots-python/0001-use-packaged-ots.patch new file mode 100644 index 000000000000..233e97d7b4b8 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/ots-python/0001-use-packaged-ots.patch @@ -0,0 +1,34 @@ +From 6ba3b97253cf540fdf4b36672f290def72386096 Mon Sep 17 00:00:00 2001 +From: Dan Callaghan <djc@djc.id.au> +Date: Sun, 23 Apr 2023 21:26:53 +1000 +Subject: [PATCH] use packaged ots + + +diff --git a/setup.py b/setup.py +index 6c3ccae..ca021da 100755 +--- a/setup.py ++++ b/setup.py +@@ -248,7 +248,6 @@ def run(self): + platforms=["posix", "nt"], + package_dir={"": "src/python"}, + packages=find_packages("src/python"), +- ext_modules=[ots_sanitize], + zip_safe=False, + cmdclass=cmdclass, + setup_requires=["setuptools_scm"], +diff --git a/src/python/ots/__init__.py b/src/python/ots/__init__.py +index 5fc1724..db9d21e 100644 +--- a/src/python/ots/__init__.py ++++ b/src/python/ots/__init__.py +@@ -3,7 +3,7 @@ + import sys + import os + +-OTS_SANITIZE = os.path.join(os.path.dirname(__file__), "ots-sanitize") ++OTS_SANITIZE = "@ots_sanitize@" + + __all__ = ["sanitize", "OTSError", "CalledProcessError"] + +-- +2.38.4 + diff --git a/nixpkgs/pkgs/development/python-modules/ots-python/default.nix b/nixpkgs/pkgs/development/python-modules/ots-python/default.nix new file mode 100644 index 000000000000..32863e2e4bd3 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/ots-python/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchPypi +, substituteAll +, opentype-sanitizer +, setuptools-scm +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "ots-python"; + version = "9.1.0"; + + src = fetchPypi { + pname = "opentype-sanitizer"; + inherit version; + hash = "sha256-1Zdd+eRECimZl8L8CCkm7pCjN0TafSsc5i2Y6/oH88I="; + }; + + patches = [ + # Invoke ots-sanitize from the opentype-sanitizer package instead of + # downloading precompiled binaries from the internet. + # (nixpkgs-specific, not upstreamable) + (substituteAll { + src = ./0001-use-packaged-ots.patch; + ots_sanitize = "${opentype-sanitizer}/bin/ots-sanitize"; + }) + ]; + + propagatedBuildInputs = [ + opentype-sanitizer + ]; + nativeBuildInputs = [ + setuptools-scm + ]; + + doCheck = true; + nativeCheckInputs = [ + pytestCheckHook + ]; + + meta = with lib; { + description = "Python wrapper for ots (OpenType Sanitizer)"; + homepage = "https://github.com/googlefonts/ots-python"; + license = licenses.bsd3; + maintainers = with maintainers; [ danc86 ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/picobox/default.nix b/nixpkgs/pkgs/development/python-modules/picobox/default.nix index 176c86e84f07..a70fc8eecbe1 100644 --- a/nixpkgs/pkgs/development/python-modules/picobox/default.nix +++ b/nixpkgs/pkgs/development/python-modules/picobox/default.nix @@ -1,27 +1,26 @@ { lib , buildPythonPackage , fetchFromGitHub -, fetchpatch , flask , hatchling , hatch-vcs -, isPy27 , pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "picobox"; - version = "3.0.0"; + version = "4.0.0"; - format = "pyproject"; + pyproject = true; - disabled = isPy27; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "ikalnytskyi"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-LQiSurL+eFRJ9iQheoo66o44BlfBtAatk8deuMFROcc="; + hash = "sha256-JtrwUVo3b4G34OUShX4eJS2IVubl4vBmEtB/Jhk4eJI="; }; SETUPTOOLS_SCM_PRETEND_VERSION = version; diff --git a/nixpkgs/pkgs/development/python-modules/playwright/default.nix b/nixpkgs/pkgs/development/python-modules/playwright/default.nix index 575ffeff5a6b..555f7aa30197 100644 --- a/nixpkgs/pkgs/development/python-modules/playwright/default.nix +++ b/nixpkgs/pkgs/development/python-modules/playwright/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , auditwheel , buildPythonPackage , git @@ -53,7 +54,7 @@ buildPythonPackage rec { substituteInPlace pyproject.toml \ --replace 'requires = ["setuptools==68.2.2", "setuptools-scm==8.0.4", "wheel==0.41.2", "auditwheel==5.4.0"]' \ - 'requires = ["setuptools", "setuptools-scm", "wheel", "auditwheel"]' \ + 'requires = ["setuptools", "setuptools-scm", "wheel"]' \ --replace 'version_file = "playwright/_repo_version.py"' "" # FIXME version_file is available in setuptools-scm>=8.0.0 echo "__version__ = version = '${version}'" > playwright/_repo_version.py @@ -69,7 +70,8 @@ buildPythonPackage rec { ''; - nativeBuildInputs = [ git setuptools-scm setuptools auditwheel ]; + nativeBuildInputs = [ git setuptools-scm setuptools ] + ++ lib.optionals stdenv.isLinux [ auditwheel ]; propagatedBuildInputs = [ greenlet diff --git a/nixpkgs/pkgs/development/python-modules/plone-testing/default.nix b/nixpkgs/pkgs/development/python-modules/plone-testing/default.nix index 13114dd78456..fdb75e22115d 100644 --- a/nixpkgs/pkgs/development/python-modules/plone-testing/default.nix +++ b/nixpkgs/pkgs/development/python-modules/plone-testing/default.nix @@ -2,7 +2,7 @@ , buildPythonPackage , fetchPypi , six -, zope_testing +, zope-testing , setuptools }: @@ -15,7 +15,7 @@ buildPythonPackage rec { sha256 = "39bc23bbb59b765702090ad61fe579f8bd9fe1f005f4dd1c2988a5bd1a71faf0"; }; - propagatedBuildInputs = [ six setuptools zope_testing ]; + propagatedBuildInputs = [ six setuptools zope-testing ]; # Huge amount of testing dependencies (including Zope2) doCheck = false; diff --git a/nixpkgs/pkgs/development/python-modules/pulumi/default.nix b/nixpkgs/pkgs/development/python-modules/pulumi/default.nix index b6f1ed005540..94a940f8a9fe 100644 --- a/nixpkgs/pkgs/development/python-modules/pulumi/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pulumi/default.nix @@ -45,7 +45,7 @@ buildPythonPackage rec { cp ../../README.md . substituteInPlace setup.py \ --replace "3.0.0" "${version}" \ - --replace "grpcio~=1.59" "grpcio" \ + --replace "grpcio==1.56.2" "grpcio" \ --replace "semver~=2.13" "semver" ''; diff --git a/nixpkgs/pkgs/development/python-modules/py-serializable/default.nix b/nixpkgs/pkgs/development/python-modules/py-serializable/default.nix index 028d61f745a2..8b736011fa75 100644 --- a/nixpkgs/pkgs/development/python-modules/py-serializable/default.nix +++ b/nixpkgs/pkgs/development/python-modules/py-serializable/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "py-serializable"; - version = "0.15.0"; + version = "0.16.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "madpah"; repo = "serializable"; rev = "refs/tags/v${version}"; - hash = "sha256-U01XRT6XS0Uxpk+2pYOGAkZiZ5kogMBtcuEU1OJpSMo="; + hash = "sha256-javjmdFQBxg/yqa6lsxKK18DgvVu/YmqvaWo2Upgzqs="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/pygls/default.nix b/nixpkgs/pkgs/development/python-modules/pygls/default.nix index 34ed59e96061..74e5b243e60b 100644 --- a/nixpkgs/pkgs/development/python-modules/pygls/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pygls/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "pygls"; - version = "1.2.0"; + version = "1.2.1"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "openlawlibrary"; repo = "pygls"; rev = "refs/tags/v${version}"; - hash = "sha256-hIr06qzOkObEcrIgFUloAPBJdOtcipl4htpbbUVkbdw="; + hash = "sha256-ARez9fs50kScfMp/W/aFIOcJonpFrcfyrzJuVwou7fk="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/pysignalclirestapi/default.nix b/nixpkgs/pkgs/development/python-modules/pysignalclirestapi/default.nix index 0e033ad99ff8..b3dd6f696006 100644 --- a/nixpkgs/pkgs/development/python-modules/pysignalclirestapi/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pysignalclirestapi/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "pysignalclirestapi"; - version = "0.3.21"; + version = "0.3.22"; pyproject = true; @@ -16,7 +16,7 @@ buildPythonPackage rec { owner = "bbernhard"; repo = "pysignalclirestapi"; rev = version; - hash = "sha256-CAZ6UgGz7ZDXlQlngi+hEhczOphvAT/Yl9vLqnrS1Qc="; + hash = "sha256-m8Sihf5vTDntd5Tbaa5o55G/k/rqtmjWreoTab58CHU="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/pysyncthru/default.nix b/nixpkgs/pkgs/development/python-modules/pysyncthru/default.nix index d5761bebee7f..568152605c77 100644 --- a/nixpkgs/pkgs/development/python-modules/pysyncthru/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pysyncthru/default.nix @@ -1,33 +1,40 @@ { lib -, isPy27 , buildPythonPackage +, pythonOlder , fetchFromGitHub +, setuptools , aiohttp , demjson3 -, python +, unittestCheckHook }: buildPythonPackage rec { pname = "pysyncthru"; - version = "0.7.10"; + version = "0.8.0"; - disabled = isPy27; + disabled = pythonOlder "3.7"; + + pyproject = true; src = fetchFromGitHub { owner = "nielstron"; repo = "pysyncthru"; - rev = "release-${version}"; - sha256 = "1c29w2ldrnq0vxr9cfa2pjhwdvrpw393c84khgg2y56jrkbidq53"; + rev = "refs/tags/${version}"; + hash = "sha256-Zije1WzfgIU9pT0H7T/Mx+5gEBCsRgMLkfsa/KB0YtI="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ aiohttp demjson3 ]; - checkPhase = '' - ${python.interpreter} -m unittest - ''; + nativeCheckInputs = [ + unittestCheckHook + ]; pythonImportsCheck = [ "pysyncthru" ]; diff --git a/nixpkgs/pkgs/development/python-modules/pytikz-allefeld/default.nix b/nixpkgs/pkgs/development/python-modules/pytikz-allefeld/default.nix new file mode 100644 index 000000000000..4701431e715d --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pytikz-allefeld/default.nix @@ -0,0 +1,54 @@ +{ lib +, stdenv +, fetchFromGitHub +, buildPythonPackage +, pythonOlder +, pymupdf +, numpy +, ipython +, texlive +}: + +buildPythonPackage rec { + pname = "pytikz-allefeld"; # "pytikz" on pypi is a different module + version = "unstable-2022-11-01"; + + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "allefeld"; + repo = "pytikz"; + rev = "f878ebd6ce5a647b1076228b48181b147a61abc1"; + hash = "sha256-G59UUkpjttJKNBN0MB/A9CftO8tO3nv8qlTxt3/fKHk="; + }; + + propagatedBuildInputs = [ + pymupdf + numpy + ipython + ]; + + pythonImportsCheck = [ "tikz" ]; + + nativeCheckInputs = [ texlive.combined.scheme-small ]; + checkPhase = '' + runHook preCheck + python -c 'if 1: + from tikz import * + pic = Picture() + pic.draw(line([(0, 0), (1, 1)])) + print(pic.code()) + pic.write_image("test.pdf") + ' + test -s test.pdf + runHook postCheck + ''; + + meta = with lib; { + homepage = "https://github.com/allefeld/pytikz"; + description = "A Python interface to TikZ"; + license = licenses.gpl3; + maintainers = with maintainers; [ pbsds ]; + broken = stdenv.isDarwin; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/pyunpack/default.nix b/nixpkgs/pkgs/development/python-modules/pyunpack/default.nix index b6dff5a97d03..ea7ad7d416a3 100644 --- a/nixpkgs/pkgs/development/python-modules/pyunpack/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pyunpack/default.nix @@ -1,16 +1,18 @@ { lib , buildPythonPackage , fetchFromGitHub +, setuptools , pytestCheckHook , easyprocess , entrypoint2 , patool +, cabextract }: buildPythonPackage rec { pname = "pyunpack"; version = "0.3"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "ponty"; @@ -23,15 +25,20 @@ buildPythonPackage rec { substituteInPlace pyunpack/__init__.py \ --replace \ '_exepath("patool")' \ - '"${patool}/bin/.patool-wrapped"' + '"${lib.getBin patool}/bin/.patool-wrapped"' ''; + nativeBuildInputs = [ setuptools ]; + propagatedBuildInputs = [ easyprocess entrypoint2 ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytestCheckHook + cabextract + ]; pytestFlagsArray = [ "-x" ]; diff --git a/nixpkgs/pkgs/development/python-modules/robotframework-pythonlibcore/default.nix b/nixpkgs/pkgs/development/python-modules/robotframework-pythonlibcore/default.nix index 43da9125f1ae..797bda0d3ea4 100644 --- a/nixpkgs/pkgs/development/python-modules/robotframework-pythonlibcore/default.nix +++ b/nixpkgs/pkgs/development/python-modules/robotframework-pythonlibcore/default.nix @@ -2,30 +2,37 @@ , buildPythonPackage , pythonOlder , fetchFromGitHub +, setuptools , pytest-mockito , pytestCheckHook , robotframework +, typing-extensions }: buildPythonPackage rec { pname = "robotframework-pythonlibcore"; - version = "4.2.0"; + version = "4.3.0"; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "robotframework"; repo = "PythonLibCore"; rev = "refs/tags/v${version}"; - hash = "sha256-RJTn1zSVJYgbh93Idr77uHl02u0wpj6p6llSJfQVTQk="; + hash = "sha256-5ayOQyOhCg4nLpAyH/eQ6NYEApix0wsL2nhJzEXKJRo="; }; + nativeBuildInputs = [ + setuptools + ]; + nativeCheckInputs = [ pytest-mockito pytestCheckHook robotframework + typing-extensions ]; preCheck = '' diff --git a/nixpkgs/pkgs/development/python-modules/rstr/default.nix b/nixpkgs/pkgs/development/python-modules/rstr/default.nix new file mode 100644 index 000000000000..3c80a274ceaf --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/rstr/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools +, setuptools-scm +, unittestCheckHook +}: + +buildPythonPackage rec { + pname = "rstr"; + version = "3.2.2"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-xKVk1N+0Ry2THRRcQ9HPGteMJFkhQud1W4hmF57qwBI="; + }; + + pyproject = true; + + nativeBuildInputs = [ + setuptools + setuptools-scm + ]; + + doCheck = true; + nativeCheckInputs = [ + unittestCheckHook + ]; + + meta = with lib; { + description = "Python library to generate random strings"; + homepage = "https://github.com/leapfrogonline/rstr"; + license = licenses.bsd3; + maintainers = with maintainers; [ danc86 ]; + }; +} + diff --git a/nixpkgs/pkgs/development/python-modules/scancode-toolkit/default.nix b/nixpkgs/pkgs/development/python-modules/scancode-toolkit/default.nix index 2affddbb6a4c..13bee07a1859 100644 --- a/nixpkgs/pkgs/development/python-modules/scancode-toolkit/default.nix +++ b/nixpkgs/pkgs/development/python-modules/scancode-toolkit/default.nix @@ -16,7 +16,6 @@ , extractcode-libarchive , fasteners , fetchPypi -, fetchpatch , fingerprints , ftfy , gemfileparser2 @@ -48,12 +47,12 @@ , pythonOlder , requests , saneyaml +, setuptools , spdx-tools , text-unidecode , toml , typecode , typecode-libmagic -, typing , urlpy , xmltodict , zipp @@ -61,17 +60,22 @@ buildPythonPackage rec { pname = "scancode-toolkit"; - version = "32.0.6"; + version = "32.0.8"; + pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-suqk7LOnZgSJGlaHq81LDOSCHZWdsJOUbma6MEpHxSM="; + hash = "sha256-W6Ev1MV8cZU4bauAfmuZsBzMJKz7xpw8siO3Afn5mc8="; }; dontConfigure = true; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ attrs beautifulsoup4 @@ -126,33 +130,12 @@ buildPythonPackage rec { xmltodict ] ++ lib.optionals (pythonOlder "3.9") [ zipp - ] ++ lib.optionals (pythonOlder "3.7") [ - typing ]; nativeCheckInputs = [ pytestCheckHook ]; - patches = [ - (fetchpatch { - name = "${pname}-allow-stable-spdx-tools.patch"; - url = "https://github.com/nexB/scancode-toolkit/commit/d89ab6584d3df6b7eb1d1394559e9d967d6db6ae.patch"; - includes = [ "src/*" ]; - hash = "sha256-AU3vJlOxmCy3yvkupVaAVxAKxJI3ymXEk+A5DWSkfOM="; - }) - ]; - - postPatch = '' - substituteInPlace setup.cfg \ - --replace "pdfminer.six >= 20200101" "pdfminer.six" \ - --replace "pluggy >= 0.12.0, < 1.0" "pluggy" \ - --replace "pygmars >= 0.7.0" "pygmars" \ - --replace "license_expression >= 21.6.14" "license_expression" \ - --replace "intbitset >= 2.3.0, < 3.0" "intbitset" \ - --replace "spdx_tools == 0.7.0a3" "spdx_tools" - ''; - # Importing scancode needs a writeable home, and preCheck happens in between # pythonImportsCheckPhase and pytestCheckPhase. postInstall = '' @@ -163,7 +146,13 @@ buildPythonPackage rec { "scancode" ]; - # takes a long time and doesn't appear to do anything + disabledTestPaths = [ + # Tests are outdated + "src/formattedcode/output_spdx.py" + "src/scancode/cli.py" + ]; + + # Takes a long time and doesn't appear to do anything dontStrip = true; meta = with lib; { diff --git a/nixpkgs/pkgs/development/python-modules/shaperglot/default.nix b/nixpkgs/pkgs/development/python-modules/shaperglot/default.nix new file mode 100644 index 000000000000..f1ea7e5a723a --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/shaperglot/default.nix @@ -0,0 +1,55 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, gflanguages +, num2words +, poetry-core +, protobuf +, pytestCheckHook +, strictyaml +, termcolor +, ufo2ft +, vharfbuzz +, youseedee +}: + +buildPythonPackage rec { + pname = "shaperglot"; + version = "0.3.1"; + + # PyPI source tarballs omit tests, fetch from Github instead + src = fetchFromGitHub { + owner = "googlefonts"; + repo = "shaperglot"; + rev = "v${version}"; + hash = "sha256-29MzD42rgh+7n/0kjqKGDxXPnUEvj/xxEIKWZg03pxw="; + }; + + pyproject = true; + + propagatedBuildInputs = [ + gflanguages + num2words + protobuf + strictyaml + termcolor + ufo2ft + vharfbuzz + youseedee + ]; + nativeBuildInputs = [ + poetry-core + ]; + + doCheck = true; + nativeCheckInputs = [ + pytestCheckHook + ]; + + meta = with lib; { + description = "Tool to test OpenType fonts for language support"; + homepage = "https://github.com/googlefonts/shaperglot"; + license = licenses.asl20; + maintainers = with maintainers; [ danc86 ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/sre-yield/default.nix b/nixpkgs/pkgs/development/python-modules/sre-yield/default.nix new file mode 100644 index 000000000000..91e6904b5772 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/sre-yield/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools +, unittestCheckHook +}: + +buildPythonPackage rec { + pname = "sre-yield"; + version = "1.2"; + + src = fetchPypi { + pname = "sre_yield"; + inherit version; + hash = "sha256-6U8aKjy6//4dzRXB1U5AGhUX4FKqZMfTFk+I3HYde4o="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + doCheck = true; + nativeCheckInputs = [ + unittestCheckHook + ]; + + meta = with lib; { + description = "Python library to efficiently generate all values that can match a given regular expression"; + homepage = "https://github.com/sre-yield/sre-yield"; + license = licenses.asl20; + maintainers = with maintainers; [ danc86 ]; + }; +} + diff --git a/nixpkgs/pkgs/development/python-modules/starline/default.nix b/nixpkgs/pkgs/development/python-modules/starline/default.nix index ce7418a88734..cdaca053ee1d 100644 --- a/nixpkgs/pkgs/development/python-modules/starline/default.nix +++ b/nixpkgs/pkgs/development/python-modules/starline/default.nix @@ -2,20 +2,36 @@ , buildPythonPackage , pythonOlder , fetchPypi +, fetchpatch +, setuptools , requests }: buildPythonPackage rec { pname = "starline"; - version = "0.2.0"; + version = "0.1.5"; disabled = pythonOlder "3.5"; + pyproject = true; + src = fetchPypi { inherit pname version; - sha256 = "550b00ab95cf59d933f7708abab40a4e41e5790e62b653471afe86a3af3320e6"; + hash = "sha256-F1P1/NKml2rtd1r7A/g5IVnwQMZzkXzAxjRRDZXBPLk="; }; + patches = [ + # https://github.com/Anonym-tsk/starline/pull/5 + (fetchpatch { + url = "https://github.com/Anonym-tsk/starline/commit/4e6cdf8e05c5fb8509ee384e77b39a2495587160.patch"; + hash = "sha256-y9b6ePH3IEgmt3ALHQGwH102rlm4KfmH4oIoIC93cWU="; + }) + ]; + + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ requests ]; diff --git a/nixpkgs/pkgs/development/python-modules/streamlit/default.nix b/nixpkgs/pkgs/development/python-modules/streamlit/default.nix index 73c36577413a..a043430f8584 100644 --- a/nixpkgs/pkgs/development/python-modules/streamlit/default.nix +++ b/nixpkgs/pkgs/development/python-modules/streamlit/default.nix @@ -32,14 +32,14 @@ buildPythonPackage rec { pname = "streamlit"; - version = "1.28.2"; + version = "1.29.0"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-wUQWiIG/e9bWAXqb/eWFtS0gCHsQstXIXTdu9tUqqO4="; + hash = "sha256-tt//nF4TLlUYySFQ781FKYDbSSpF+v6sPUaI0jNO+gc="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/stringbrewer/default.nix b/nixpkgs/pkgs/development/python-modules/stringbrewer/default.nix new file mode 100644 index 000000000000..fc39d515a6ec --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/stringbrewer/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, rstr +, sre-yield +, pythonImportsCheckHook +}: + +buildPythonPackage rec { + pname = "stringbrewer"; + version = "0.0.1"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-wtETgi+Tk1ALJzzIM6Ic5zkDbALGL0cELg8X75uepkk="; + }; + + propagatedBuildInputs = [ + rstr + sre-yield + ]; + nativeBuildInputs = [ + pythonImportsCheckHook + ]; + + # Package has no tests + doCheck = false; + pythonImportsCheck = [ "stringbrewer" ]; + + meta = with lib; { + description = "Python library to generate random strings matching a pattern"; + homepage = "https://github.com/simoncozens/stringbrewer"; + license = licenses.mit; + maintainers = with maintainers; [ danc86 ]; + }; +} + diff --git a/nixpkgs/pkgs/development/python-modules/syncedlyrics/default.nix b/nixpkgs/pkgs/development/python-modules/syncedlyrics/default.nix index a8482b18d56a..48e2f79ef2d5 100644 --- a/nixpkgs/pkgs/development/python-modules/syncedlyrics/default.nix +++ b/nixpkgs/pkgs/development/python-modules/syncedlyrics/default.nix @@ -11,16 +11,16 @@ buildPythonPackage rec { pname = "syncedlyrics"; - version = "0.6.1"; - format = "pyproject"; + version = "0.7.0"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "rtcq"; - repo = pname; + repo = "syncedlyrics"; rev = "refs/tags/v${version}"; - hash = "sha256-oMG3TqCJfEyfF5zK8hNhyhQ1z7G+S+De8hI1GLCfctM="; + hash = "sha256-qZVUptmLouFFBCWiRviYFO0sQKlyz65GjWMg/b1idXY="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/torch/default.nix b/nixpkgs/pkgs/development/python-modules/torch/default.nix index 49ed033bd6a1..d18dd97df5b4 100644 --- a/nixpkgs/pkgs/development/python-modules/torch/default.nix +++ b/nixpkgs/pkgs/development/python-modules/torch/default.nix @@ -56,10 +56,7 @@ let inherit (lib) attrsets lists strings trivial; - inherit (cudaPackages) cudaFlags cudnn; - - # Some packages are not available on all platforms - nccl = cudaPackages.nccl or null; + inherit (cudaPackages) cudaFlags cudnn nccl; setBool = v: if v then "1" else "0"; @@ -212,10 +209,11 @@ in buildPythonPackage rec { # For more, see https://github.com/open-mpi/ompi/issues/7733#issuecomment-629806195. preConfigure = lib.optionalString cudaSupport '' export TORCH_CUDA_ARCH_LIST="${gpuTargetString}" - export CUDNN_INCLUDE_DIR=${cudnn.dev}/include - export CUDNN_LIB_DIR=${cudnn.lib}/lib export CUPTI_INCLUDE_DIR=${cudaPackages.cuda_cupti.dev}/include export CUPTI_LIBRARY_DIR=${cudaPackages.cuda_cupti.lib}/lib + '' + lib.optionalString (cudaSupport && cudaPackages ? cudnn) '' + export CUDNN_INCLUDE_DIR=${cudnn.dev}/include + export CUDNN_LIB_DIR=${cudnn.lib}/lib '' + lib.optionalString rocmSupport '' export ROCM_PATH=${rocmtoolkit_joined} export ROCM_SOURCE_DIR=${rocmtoolkit_joined} @@ -273,7 +271,7 @@ in buildPythonPackage rec { PYTORCH_BUILD_VERSION = version; PYTORCH_BUILD_NUMBER = 0; - USE_NCCL = setBool (nccl != null); + USE_NCCL = setBool (cudaPackages ? nccl); USE_SYSTEM_NCCL = setBool useSystemNccl; # don't build pytorch's third_party NCCL USE_STATIC_NCCL = setBool useSystemNccl; @@ -348,8 +346,6 @@ in buildPythonPackage rec { cuda_nvrtc.lib cuda_nvtx.dev cuda_nvtx.lib # -llibNVToolsExt - cudnn.dev - cudnn.lib libcublas.dev libcublas.lib libcufft.dev @@ -360,7 +356,10 @@ in buildPythonPackage rec { libcusolver.lib libcusparse.dev libcusparse.lib - ] ++ lists.optionals (nccl != null) [ + ] ++ lists.optionals (cudaPackages ? cudnn) [ + cudnn.dev + cudnn.lib + ] ++ lists.optionals (useSystemNccl && cudaPackages ? nccl) [ # Some platforms do not support NCCL (i.e., Jetson) nccl.dev # Provides nccl.h AND a static copy of NCCL! ] ++ lists.optionals (strings.versionOlder cudaVersion "11.8") [ diff --git a/nixpkgs/pkgs/development/python-modules/torchaudio/0001-setup.py-propagate-cmakeFlags.patch b/nixpkgs/pkgs/development/python-modules/torchaudio/0001-setup.py-propagate-cmakeFlags.patch new file mode 100644 index 000000000000..a1f6b5ea8aeb --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/torchaudio/0001-setup.py-propagate-cmakeFlags.patch @@ -0,0 +1,32 @@ +From 789ec77d09171f22d82006493cafbcf2496b4f8f Mon Sep 17 00:00:00 2001 +From: Someone Serge <sergei.kozlukov@aalto.fi> +Date: Sat, 2 Dec 2023 12:47:00 +0000 +Subject: [PATCH] setup.py: propagate cmakeFlags + +--- + tools/setup_helpers/extension.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tools/setup_helpers/extension.py b/tools/setup_helpers/extension.py +index 2415bbae..7c2a9351 100644 +--- a/tools/setup_helpers/extension.py ++++ b/tools/setup_helpers/extension.py +@@ -1,6 +1,7 @@ + import distutils.sysconfig + import os + import platform ++import shlex + import subprocess + from pathlib import Path + +@@ -141,6 +142,8 @@ class CMakeBuild(build_ext): + f"-DUSE_OPENMP:BOOL={'ON' if _USE_OPENMP else 'OFF'}", + f"-DUSE_FFMPEG:BOOL={'ON' if _USE_FFMPEG else 'OFF'}", + ] ++ if "cmakeFlags" in os.environ: ++ cmake_args.extend(shlex.split(os.environ["cmakeFlags"])) + build_args = ["--target", "install"] + # Pass CUDA architecture to cmake + if _TORCH_CUDA_ARCH_LIST is not None: +-- +2.42.0 diff --git a/nixpkgs/pkgs/development/python-modules/torchaudio/default.nix b/nixpkgs/pkgs/development/python-modules/torchaudio/default.nix index 4ff44d123a48..1014ab523821 100644 --- a/nixpkgs/pkgs/development/python-modules/torchaudio/default.nix +++ b/nixpkgs/pkgs/development/python-modules/torchaudio/default.nix @@ -24,6 +24,10 @@ buildPythonPackage rec { hash = "sha256-5UlnOGXXFu1p9M5B+Ixc9DW5hLZ1nskv81Y+McbWu6Q="; }; + patches = [ + ./0001-setup.py-propagate-cmakeFlags.patch + ]; + postPatch = '' substituteInPlace setup.py \ --replace 'print(" --- Initializing submodules")' "return" \ diff --git a/nixpkgs/pkgs/development/python-modules/torchmetrics/default.nix b/nixpkgs/pkgs/development/python-modules/torchmetrics/default.nix index ee66ee817d1f..9b980206c32a 100644 --- a/nixpkgs/pkgs/development/python-modules/torchmetrics/default.nix +++ b/nixpkgs/pkgs/development/python-modules/torchmetrics/default.nix @@ -20,7 +20,7 @@ let pname = "torchmetrics"; - version = "1.2.0"; + version = "1.2.1"; in buildPythonPackage { inherit pname version; @@ -30,7 +30,7 @@ buildPythonPackage { owner = "Lightning-AI"; repo = "torchmetrics"; rev = "refs/tags/v${version}"; - hash = "sha256-g5JuTbiRd8yWx2nM3UE8ejOhuZ0XpAQdS5AC9AlrSFY="; + hash = "sha256-uvebKCJL2TSQUGmtVE1MtYwzgs+0lWvHvsN5PwJyl/g="; }; disabled = pythonOlder "3.8"; @@ -90,6 +90,7 @@ buildPythonPackage { meta = with lib; { description = "Machine learning metrics for distributed, scalable PyTorch applications (used in pytorch-lightning)"; homepage = "https://lightning.ai/docs/torchmetrics/"; + changelog = "https://github.com/Lightning-AI/torchmetrics/releases/tag/v${version}"; license = licenses.asl20; maintainers = with maintainers; [ SomeoneSerge diff --git a/nixpkgs/pkgs/development/python-modules/txtorcon/default.nix b/nixpkgs/pkgs/development/python-modules/txtorcon/default.nix index c1acef68d19a..03da40472d5b 100644 --- a/nixpkgs/pkgs/development/python-modules/txtorcon/default.nix +++ b/nixpkgs/pkgs/development/python-modules/txtorcon/default.nix @@ -20,14 +20,14 @@ buildPythonPackage rec { pname = "txtorcon"; - version = "23.5.0"; + version = "23.11.0"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-k/2Aqd1QX2mNCGT+k9uLapwRRLX+uRUwggtw7YmCZRw="; + hash = "sha256-cfha6T121yZRAFnJ7XTmCLxaXJ99EDhTtJ5BQoBAai8="; }; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/type-infer/default.nix b/nixpkgs/pkgs/development/python-modules/type-infer/default.nix index 55fe29e972a8..214f7cf4d1ab 100644 --- a/nixpkgs/pkgs/development/python-modules/type-infer/default.nix +++ b/nixpkgs/pkgs/development/python-modules/type-infer/default.nix @@ -24,7 +24,7 @@ let in buildPythonPackage rec { pname = "type-infer"; - version = "0.0.15"; + version = "0.0.16"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -33,7 +33,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "type_infer"; inherit version; - hash = "sha256-AnThYE6hHc3Pwu8fl0VBiQJfGVjeEKo4RrCsOl2pfCA="; + hash = "sha256-EWH8odCHAzrEcBtFEYBm5gt4zlrwrK33c6uEfFBgPfA="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/types-s3transfer/default.nix b/nixpkgs/pkgs/development/python-modules/types-s3transfer/default.nix index 44f025c23c1a..5e87bd726bf7 100644 --- a/nixpkgs/pkgs/development/python-modules/types-s3transfer/default.nix +++ b/nixpkgs/pkgs/development/python-modules/types-s3transfer/default.nix @@ -6,13 +6,13 @@ buildPythonPackage rec { pname = "types-s3transfer"; - version = "0.8.1"; + version = "0.8.2"; pyproject = true; src = fetchPypi { pname = "types_s3transfer"; inherit version; - hash = "sha256-tng+wpElwAtWCzVNL+KhhdxcznahfCOsLWMGdK+nAEA="; + hash = "sha256-LkF1b8+Ud1qZSa+oVkiaxFcDCGCbBJPfvXtNMz60I+Y="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/tzlocal/default.nix b/nixpkgs/pkgs/development/python-modules/tzlocal/default.nix index e9ab0bc6abe3..4f74b552b0c4 100644 --- a/nixpkgs/pkgs/development/python-modules/tzlocal/default.nix +++ b/nixpkgs/pkgs/development/python-modules/tzlocal/default.nix @@ -4,32 +4,25 @@ , pythonOlder , fetchPypi , setuptools -, wheel -, pytz-deprecation-shim , pytest-mock , pytestCheckHook }: buildPythonPackage rec { pname = "tzlocal"; - version = "5.0.1"; # version needs to be compatible with APScheduler + version = "5.2"; # version needs to be compatible with APScheduler - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; - format = "pyproject"; + pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-RuuZrUvbcfP3K30k9CZ3U+JAlE7PwW8l0nGbqJgnqAM="; + hash = "sha256-jTmSBVePGpNCgWQJzB5GqT69V1XjnqLYUzS+qRG/Dm4="; }; nativeBuildInputs = [ setuptools - wheel - ]; - - propagatedBuildInputs = [ - pytz-deprecation-shim ]; nativeCheckInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/ufolint/default.nix b/nixpkgs/pkgs/development/python-modules/ufolint/default.nix new file mode 100644 index 000000000000..c7b666c37fab --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/ufolint/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, commandlines +, fonttools +, fs +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "ufolint"; + version = "1.2.0"; + + # PyPI source tarballs omit tests, fetch from Github instead + src = fetchFromGitHub { + owner = "source-foundry"; + repo = "ufolint"; + rev = "v${version}"; + hash = "sha256-sv8WbnDd2LFHkwNsB9FO04OlLhemdzwjq0tC9+Fd6/M="; + }; + + propagatedBuildInputs = [ + commandlines + fs + fonttools + ]; + + doCheck = true; + nativeBuildInputs = [ + pytestCheckHook + ]; + + meta = with lib; { + description = "Linter for Unified Font Object (UFO) source code"; + homepage = "https://github.com/source-foundry/ufolint"; + license = licenses.mit; + maintainers = with maintainers; [ danc86 ]; + }; +} + diff --git a/nixpkgs/pkgs/development/python-modules/vharfbuzz/default.nix b/nixpkgs/pkgs/development/python-modules/vharfbuzz/default.nix new file mode 100644 index 000000000000..fb953a0e7be7 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/vharfbuzz/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, fonttools +, pythonImportsCheckHook +, uharfbuzz +}: + +buildPythonPackage rec { + pname = "vharfbuzz"; + version = "0.2.0"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-uDX2fYqxV4wmAAIMfA3dBohWmq1N0VurSTEFOjSRpmY="; + }; + + propagatedBuildInputs = [ + fonttools + uharfbuzz + ]; + nativeBuildInputs = [ + pythonImportsCheckHook + ]; + + # Package has no tests. + doCheck = false; + pythonImportsCheck = [ "vharfbuzz" ]; + + meta = with lib; { + description = "Utility for removing hinting data from TrueType and OpenType fonts"; + homepage = "https://github.com/source-foundry/dehinter"; + license = licenses.asl20; + maintainers = with maintainers; [ danc86 ]; + }; +} + diff --git a/nixpkgs/pkgs/development/python-modules/vprof/default.nix b/nixpkgs/pkgs/development/python-modules/vprof/default.nix new file mode 100644 index 000000000000..1f41f7b9a203 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/vprof/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools +, wheel +, psutil +}: + +buildPythonPackage rec { + pname = "vprof"; + version = "0.38"; + pyproject = true; + + # We use the Pypi source rather than the GitHub ones because the former include the javascript + # dependency for the UI. + src = fetchPypi { + inherit pname version; + hash = "sha256-fxAAkS7rekUMfJTTzJZzmvRa0P8B1avMCwmhddQP+ts="; + }; + + nativeBuildInputs = [ + setuptools + wheel + ]; + + propagatedBuildInputs = [ + psutil + ]; + + pythonImportsCheck = [ "vprof" ]; + + # The tests are not included in the Pypi sources + doCheck = false; + + meta = with lib; { + description = "Visual profiler for Python"; + homepage = "https://github.com/nvdv/vprof"; + license = licenses.bsd2; + maintainers = with maintainers; [ GaetanLepage ]; + mainProgram = "vprof"; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/xkcdpass/default.nix b/nixpkgs/pkgs/development/python-modules/xkcdpass/default.nix index d4a04317ad80..7ae231f03f89 100644 --- a/nixpkgs/pkgs/development/python-modules/xkcdpass/default.nix +++ b/nixpkgs/pkgs/development/python-modules/xkcdpass/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "xkcdpass"; - version = "1.19.6"; + version = "1.19.8"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-zrdR4KuORCGIoRTZDednT9JDV/seWQRa3aPal8gxdTE="; + hash = "sha256-MK//Q5m4PeNioRsmxHaMbN2x7a4SkgVy0xkxuvnUufo="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/development/python-modules/youseedee/0001-use-packaged-unicode-data.patch b/nixpkgs/pkgs/development/python-modules/youseedee/0001-use-packaged-unicode-data.patch new file mode 100644 index 000000000000..26af7ad24c92 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/youseedee/0001-use-packaged-unicode-data.patch @@ -0,0 +1,25 @@ +From 9013d36cfe7b2958eb18ce373f49193b66a0bbf6 Mon Sep 17 00:00:00 2001 +From: Dan Callaghan <djc@djc.id.au> +Date: Sun, 23 Apr 2023 16:14:55 +1000 +Subject: [PATCH] use packaged unicode data + + +diff --git a/lib/youseedee/__init__.py b/lib/youseedee/__init__.py +index 4424ef1..9a72f52 100644 +--- a/lib/youseedee/__init__.py ++++ b/lib/youseedee/__init__.py +@@ -11,10 +11,7 @@ + UCD_URL = "https://unicode.org/Public/UCD/latest/ucd/UCD.zip" + + def ucd_dir(): +- ucddir = os.path.expanduser("~/.youseedee") +- if not os.path.isdir(ucddir): +- os.mkdir(ucddir) +- return ucddir ++ return "@ucd_dir@" + + def ensure_files(): + if os.path.isfile(os.path.join(ucd_dir(), "UnicodeData.txt")): +-- +2.38.4 + diff --git a/nixpkgs/pkgs/development/python-modules/youseedee/default.nix b/nixpkgs/pkgs/development/python-modules/youseedee/default.nix new file mode 100644 index 000000000000..65a98c350b28 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/youseedee/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, fetchPypi +, substituteAll +, requests +, unicode-character-database +}: + +buildPythonPackage rec { + pname = "youseedee"; + version = "0.4.1"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-fdI4CBUSMbdKW0qg4y22wjWI6bhotgDkQdFMc9X00as="; + }; + + patches = [ + # Load data files from the unicode-character-database package instead of + # downloading them from the internet. (nixpkgs-specific, not upstreamable) + (substituteAll { + src = ./0001-use-packaged-unicode-data.patch; + ucd_dir = "${unicode-character-database}/share/unicode"; + }) + ]; + + propagatedBuildInputs = [ + requests + ]; + + doCheck = true; + # Package has no unit tests, but we can check an example as per README.rst: + checkPhase = '' + runHook preCheck + python -m youseedee 0x078A | grep -q "'Block': 'Thaana'" + runHook postCheck + ''; + + meta = with lib; { + description = "Python library for querying the Unicode Character Database"; + homepage = "https://github.com/simoncozens/youseedee"; + license = licenses.mit; + maintainers = with maintainers; [ danc86 ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/zc_lockfile/default.nix b/nixpkgs/pkgs/development/python-modules/zc_lockfile/default.nix index 70e2406ffa41..d8be54666a0d 100644 --- a/nixpkgs/pkgs/development/python-modules/zc_lockfile/default.nix +++ b/nixpkgs/pkgs/development/python-modules/zc_lockfile/default.nix @@ -1,7 +1,7 @@ { buildPythonPackage , fetchPypi , mock -, zope_testing +, zope-testing , lib }: @@ -15,7 +15,7 @@ buildPythonPackage rec { }; buildInputs = [ mock ]; - propagatedBuildInputs = [ zope_testing ]; + propagatedBuildInputs = [ zope-testing ]; meta = with lib; { description = "Inter-process locks"; diff --git a/nixpkgs/pkgs/development/python-modules/zope-component/default.nix b/nixpkgs/pkgs/development/python-modules/zope-component/default.nix index 522b2817a845..44f01efa8d2e 100644 --- a/nixpkgs/pkgs/development/python-modules/zope-component/default.nix +++ b/nixpkgs/pkgs/development/python-modules/zope-component/default.nix @@ -1,7 +1,7 @@ { lib , buildPythonPackage , fetchPypi -, zope_configuration +, zope-configuration , zope-deferredimport , zope-deprecation , zope_event @@ -22,7 +22,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - zope_configuration + zope-configuration zope-deferredimport zope-deprecation zope_event diff --git a/nixpkgs/pkgs/development/python-modules/zope-configuration/default.nix b/nixpkgs/pkgs/development/python-modules/zope-configuration/default.nix new file mode 100644 index 000000000000..e5a30f1e7d68 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/zope-configuration/default.nix @@ -0,0 +1,63 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, setuptools +, zope-i18nmessageid +, zope_interface +, zope_schema +, pytestCheckHook +, zope-testing +, zope_testrunner +, manuel +}: + +buildPythonPackage rec { + pname = "zope-configuration"; + version = "5.0"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + pname = "zope.configuration"; + inherit version; + hash = "sha256-I0tKGMcfazub9rzyJSZLrgFJrGjeoHsHLw9pmkzsJuc="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + nativeCheckInputs = [ + manuel + pytestCheckHook + zope-testing + zope_testrunner + ]; + + propagatedBuildInputs = [ + zope-i18nmessageid + zope_interface + zope_schema + ]; + + # Need to investigate how to run the tests with zope-testrunner + doCheck = false; + + pythonImportsCheck = [ + "zope.configuration" + ]; + + pythonNamespaces = [ + "zope" + ]; + + meta = with lib; { + description = "Zope Configuration Markup Language (ZCML)"; + homepage = "https://github.com/zopefoundation/zope.configuration"; + changelog = "https://github.com/zopefoundation/zope.configuration/blob/${version}/CHANGES.rst"; + license = licenses.zpl21; + maintainers = with maintainers; [ goibhniu ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/zope-hookable/default.nix b/nixpkgs/pkgs/development/python-modules/zope-hookable/default.nix index 64db918321d1..a1cd30fd5478 100644 --- a/nixpkgs/pkgs/development/python-modules/zope-hookable/default.nix +++ b/nixpkgs/pkgs/development/python-modules/zope-hookable/default.nix @@ -1,7 +1,7 @@ { lib , buildPythonPackage , fetchPypi -, zope_testing +, zope-testing }: buildPythonPackage rec { @@ -14,7 +14,7 @@ buildPythonPackage rec { hash = "sha256-+2AfAKyH5apYKoExXtlnaM41EygHKdP1H3kxLiuLlKw="; }; - nativeCheckInputs = [ zope_testing ]; + nativeCheckInputs = [ zope-testing ]; meta = with lib; { description = "Supports the efficient creation of “hookable” objects"; diff --git a/nixpkgs/pkgs/development/python-modules/zope-testbrowser/default.nix b/nixpkgs/pkgs/development/python-modules/zope-testbrowser/default.nix index 15b3f74a4394..290066f3e157 100644 --- a/nixpkgs/pkgs/development/python-modules/zope-testbrowser/default.nix +++ b/nixpkgs/pkgs/development/python-modules/zope-testbrowser/default.nix @@ -12,7 +12,7 @@ , wsgiproxy2 , six , mock -, zope_testing +, zope-testing , zope_testrunner , python }: @@ -50,7 +50,7 @@ buildPythonPackage rec { nativeCheckInputs = [ mock - zope_testing + zope-testing zope_testrunner ]; diff --git a/nixpkgs/pkgs/development/python-modules/zope-testing/default.nix b/nixpkgs/pkgs/development/python-modules/zope-testing/default.nix new file mode 100644 index 000000000000..65672118e4ef --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/zope-testing/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchPypi +, isPyPy +, setuptools +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "zope-testing"; + version = "5.0.1"; + pyproject = true; + + src = fetchPypi { + pname = "zope.testing"; + inherit version; + hash = "sha256-6HzQ2NZmVzza8TOBare5vuyAGmSoZZXBnLX+mS7z1kk="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + doCheck = !isPyPy; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pytestFlagsArray = [ + "src/zope/testing/tests.py" + ]; + + pythonImportsCheck = [ + "zope.testing" + ]; + + pythonNamespaces = [ + "zope" + ]; + + meta = with lib; { + description = "Zope testing helpers"; + homepage = "https://github.com/zopefoundation/zope.testing"; + changelog = "https://github.com/zopefoundation/zope.testing/blob/${version}/CHANGES.rst"; + license = licenses.zpl21; + maintainers = with maintainers; [ goibhniu ]; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/zope_configuration/default.nix b/nixpkgs/pkgs/development/python-modules/zope_configuration/default.nix deleted file mode 100644 index b6cc1c0f9998..000000000000 --- a/nixpkgs/pkgs/development/python-modules/zope_configuration/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -, zope-i18nmessageid -, zope_schema -, zope_testrunner -, manuel -}: - -buildPythonPackage rec { - pname = "zope.configuration"; - version = "4.4.1"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-giPqSvU5hmznqccwrH6xjlHRfrUVk6p3c7NZPI1tdgg="; - }; - - nativeCheckInputs = [ zope_testrunner manuel ]; - - propagatedBuildInputs = [ zope-i18nmessageid zope_schema ]; - - # Need to investigate how to run the tests with zope-testrunner - doCheck = false; - - meta = with lib; { - description = "Zope Configuration Markup Language (ZCML)"; - homepage = "https://github.com/zopefoundation/zope.configuration"; - license = licenses.zpl20; - maintainers = with maintainers; [ goibhniu ]; - }; - -} diff --git a/nixpkgs/pkgs/development/python-modules/zope_schema/default.nix b/nixpkgs/pkgs/development/python-modules/zope_schema/default.nix index b3694fe09dc9..329ab7455c5c 100644 --- a/nixpkgs/pkgs/development/python-modules/zope_schema/default.nix +++ b/nixpkgs/pkgs/development/python-modules/zope_schema/default.nix @@ -4,7 +4,7 @@ , zope_location , zope_event , zope_interface -, zope_testing +, zope-testing }: buildPythonPackage rec { @@ -16,7 +16,7 @@ buildPythonPackage rec { hash = "sha256-6tTbywM1TU5BDJo7kERR60TZAlR1Gxy97fSmGu3p+7k="; }; - propagatedBuildInputs = [ zope_location zope_event zope_interface zope_testing ]; + propagatedBuildInputs = [ zope_location zope_event zope_interface zope-testing ]; # ImportError: No module named 'zope.event' # even though zope_event has been included. diff --git a/nixpkgs/pkgs/development/python-modules/zope_testing/default.nix b/nixpkgs/pkgs/development/python-modules/zope_testing/default.nix deleted file mode 100644 index bc5d9ed94b2e..000000000000 --- a/nixpkgs/pkgs/development/python-modules/zope_testing/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -, isPyPy -, zope_interface -, zope_exceptions -, zope_location -}: - -buildPythonPackage rec { - pname = "zope.testing"; - version = "5.0.1"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-6HzQ2NZmVzza8TOBare5vuyAGmSoZZXBnLX+mS7z1kk="; - }; - - doCheck = !isPyPy; - - propagatedBuildInputs = [ zope_interface zope_exceptions zope_location ]; - - meta = with lib; { - description = "Zope testing helpers"; - homepage = "http://pypi.python.org/pypi/zope.testing"; - license = licenses.zpl20; - maintainers = with maintainers; [ goibhniu ]; - }; - -} diff --git a/nixpkgs/pkgs/development/python-modules/zope_testrunner/default.nix b/nixpkgs/pkgs/development/python-modules/zope_testrunner/default.nix index d687e24082f4..2307494fcbde 100644 --- a/nixpkgs/pkgs/development/python-modules/zope_testrunner/default.nix +++ b/nixpkgs/pkgs/development/python-modules/zope_testrunner/default.nix @@ -3,7 +3,7 @@ , fetchPypi , zope_interface , zope_exceptions -, zope_testing +, zope-testing , six }: @@ -17,7 +17,7 @@ buildPythonPackage rec { hash = "sha256-1r1y9E6jLKpBW5bP4UFSsnhjF67xzW9IqCe2Le8Fj9Q="; }; - propagatedBuildInputs = [ zope_interface zope_exceptions zope_testing six ]; + propagatedBuildInputs = [ zope_interface zope_exceptions zope-testing six ]; doCheck = false; # custom test modifies sys.path |