diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-07-26 12:02:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-26 12:02:08 +0000 |
commit | f5a346e8e70789f786c25f9719c25fa7309bcb2c (patch) | |
tree | 90e0fd546539a1c51ddca8e6a357e6ca59c843a5 /pkgs/development/python-modules | |
parent | 90e04385761295cb8ec4518eb6a5f88fb3a2fd7e (diff) | |
parent | 5d73cf23c5424a586a8ba6f97a7465c3c45236e2 (diff) | |
download | nixpkgs-f5a346e8e70789f786c25f9719c25fa7309bcb2c.tar nixpkgs-f5a346e8e70789f786c25f9719c25fa7309bcb2c.tar.gz nixpkgs-f5a346e8e70789f786c25f9719c25fa7309bcb2c.tar.bz2 nixpkgs-f5a346e8e70789f786c25f9719c25fa7309bcb2c.tar.lz nixpkgs-f5a346e8e70789f786c25f9719c25fa7309bcb2c.tar.xz nixpkgs-f5a346e8e70789f786c25f9719c25fa7309bcb2c.tar.zst nixpkgs-f5a346e8e70789f786c25f9719c25fa7309bcb2c.zip |
Merge staging-next into staging
Diffstat (limited to 'pkgs/development/python-modules')
5 files changed, 157 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/hfst/default.nix b/pkgs/development/python-modules/hfst/default.nix new file mode 100644 index 00000000000..b865c4c84d6 --- /dev/null +++ b/pkgs/development/python-modules/hfst/default.nix @@ -0,0 +1,45 @@ +{ lib +, pkgs +, stdenv +, buildPythonPackage +, foma +, icu +, swig +}: + +buildPythonPackage rec { + pname = "hfst"; + inherit (pkgs.hfst) version src; + + sourceRoot = "${src.name}/python"; + + postPatch = '' + # omorfi-python looks for 'hfst' Python package + sed -i 's/libhfst_swig/hfst/' setup.py; + ''; + + nativeBuildInputs = [ + swig + ]; + + buildInputs = [ + icu + pkgs.hfst + ]; + + setupPyBuildFlags = [ + "--inplace" + ]; + + # Find foma in Darwin tests + preCheck = lib.optionalString stdenv.isDarwin '' + export DYLD_LIBRARY_PATH="${foma}/lib" + ''; + + meta = with lib; { + description = "Python bindings for HFST"; + homepage = "https://github.com/hfst/hfst"; + license = licenses.gpl3; + maintainers = with maintainers; [ lurkki ]; + }; +} diff --git a/pkgs/development/python-modules/omorfi/default.nix b/pkgs/development/python-modules/omorfi/default.nix new file mode 100644 index 00000000000..6bbe964de73 --- /dev/null +++ b/pkgs/development/python-modules/omorfi/default.nix @@ -0,0 +1,32 @@ +{ buildPythonPackage +, pkgs +, lib +, stdenv +, hfst +}: + +buildPythonPackage rec { + pname = "omorfi"; + inherit (pkgs.omorfi) src version; + + sourceRoot = "${src.name}/src/python"; + + propagatedBuildInputs = [ + hfst + ]; + + # Fixes some improper import paths + patches = [ ./importfix.patch ]; + + # Apply patch relative to source/src + patchFlags = [ "-p3" ]; + + meta = with lib; { + description = "Python interface for Omorfi"; + homepage = "https://github.com/flammie/omorfi"; + license = licenses.gpl3; + maintainers = with maintainers; [ lurkki ]; + # Ofborg build error (hfst not found?) + broken = stdenv.isDarwin; + }; +} diff --git a/pkgs/development/python-modules/omorfi/importfix.patch b/pkgs/development/python-modules/omorfi/importfix.patch new file mode 100644 index 00000000000..67a54363c7b --- /dev/null +++ b/pkgs/development/python-modules/omorfi/importfix.patch @@ -0,0 +1,76 @@ +diff --git a/src/python/omorfi/entryguessing/gradation.py b/src/python/omorfi/entryguessing/gradation.py +index 7d3ed8cb..825d7ead 100755 +--- a/src/python/omorfi/entryguessing/gradation.py ++++ b/src/python/omorfi/entryguessing/gradation.py +@@ -17,8 +17,8 @@ + # You should have received a copy of the GNU General Public License + # along with this program. If not, see <http://www.gnu.org/licenses/>. + +-from .omorfi.error_logging import fail_guess_because +-from .omorfi.string_mangling import replace_rightmost, replace_rightmosts ++from omorfi.error_logging import fail_guess_because ++from omorfi.string_manglers import replace_rightmost, replace_rightmosts + + + def gradation_make_morphophonemes(wordmap): +diff --git a/src/python/omorfi/entryguessing/guess_new_class.py b/src/python/omorfi/entryguessing/guess_new_class.py +index 1884716b..3a781bfc 100755 +--- a/src/python/omorfi/entryguessing/guess_new_class.py ++++ b/src/python/omorfi/entryguessing/guess_new_class.py +@@ -17,8 +17,8 @@ + # You should have received a copy of the GNU General Public License + # along with this program. If not, see <http://www.gnu.org/licenses/>. + +-from .error_logging import fail_guess_because +-from .string_manglers import three_syllable ++from omorfi.error_logging import fail_guess_because ++from omorfi.string_manglers import three_syllable + + + def guess_new_class(wordmap): +diff --git a/src/python/omorfi/entryguessing/plurale_tantum.py b/src/python/omorfi/entryguessing/plurale_tantum.py +index a8af81fb..95fc4b7b 100755 +--- a/src/python/omorfi/entryguessing/plurale_tantum.py ++++ b/src/python/omorfi/entryguessing/plurale_tantum.py +@@ -17,8 +17,8 @@ + # You should have received a copy of the GNU General Public License + # along with this program. If not, see <http://www.gnu.org/licenses/>. + +-from .error_logging import fail_guess_because +-from .omorfi.string_manglers import replace_rightmost, replace_rightmosts ++from omorfi.error_logging import fail_guess_because ++from omorfi.string_manglers import replace_rightmost, replace_rightmosts + + + def plurale_tantum_get_singular_stem(wordmap): +diff --git a/src/python/omorfi/formats/experimental_xml_formatter.py b/src/python/omorfi/formats/experimental_xml_formatter.py +index abccbff5..11b0f518 100755 +--- a/src/python/omorfi/formats/experimental_xml_formatter.py ++++ b/src/python/omorfi/formats/experimental_xml_formatter.py +@@ -19,9 +19,9 @@ + + from xml.sax.saxutils import escape as xml_escape + +-from ftb3_formatter import Ftb3Formatter ++from .ftb3_formatter import Ftb3Formatter + +-from .settings import version_id_easter_egg ++from omorfi.settings import version_id_easter_egg + + + def make_xmlid(s): +diff --git a/src/python/omorfi/formats/lexc_formatter.py b/src/python/omorfi/formats/lexc_formatter.py +index 4ec616b7..b146129f 100755 +--- a/src/python/omorfi/formats/lexc_formatter.py ++++ b/src/python/omorfi/formats/lexc_formatter.py +@@ -19,8 +19,8 @@ + + # functions for formatting the database data to lexc + +-from .settings import deriv_boundary, morph_boundary, newword_boundary, optional_hyphen, stub_boundary, word_boundary +-from .string_manglers import lexc_escape ++from omorfi.settings import deriv_boundary, morph_boundary, newword_boundary, optional_hyphen, stub_boundary, word_boundary ++from omorfi.string_manglers import lexc_escape + + + def format_copyright_lexc(): diff --git a/pkgs/development/python-modules/trainer/default.nix b/pkgs/development/python-modules/trainer/default.nix index ea4f0e265d7..43f147a6a9c 100644 --- a/pkgs/development/python-modules/trainer/default.nix +++ b/pkgs/development/python-modules/trainer/default.nix @@ -16,7 +16,7 @@ let pname = "trainer"; - version = "0.0.27"; + version = "0.0.29"; in buildPythonPackage { inherit pname version; @@ -26,7 +26,7 @@ buildPythonPackage { owner = "coqui-ai"; repo = "Trainer"; rev = "refs/tags/v${version}"; - hash = "sha256-2uITlcaGcRujhSZPK746d13X8ZrgaGbfMZruLmTpQIs="; + hash = "sha256-ISEIIJReYKT3tEAF9/pckPg2+aYkBJyRWo6fvWZ/asI="; }; postPatch = '' diff --git a/pkgs/development/python-modules/types-protobuf/default.nix b/pkgs/development/python-modules/types-protobuf/default.nix index 319082c8a64..8a169a2d9ce 100644 --- a/pkgs/development/python-modules/types-protobuf/default.nix +++ b/pkgs/development/python-modules/types-protobuf/default.nix @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "types-protobuf"; - version = "4.23.0.1"; + version = "4.23.0.2"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-e9XqEioFexGoK3hdneRkkyoekXX+l3pBKK3vEdfzVUc="; + hash = "sha256-EGawadTw4Jveu2TKTzXMa4rM9S+Ag2gEbM7JZ0SvA3U="; }; propagatedBuildInputs = [ |