Unverified Commit 88133d17 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #251572 from fabaff/pathvalidate-bump

python311Packages.pathvalidate: 2.5.2 -> 3.1.0
parents fedb7b1e 16112a9c
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -2,20 +2,25 @@
, buildPythonPackage
, fetchPypi
, pythonOlder
, setuptools
}:

buildPythonPackage rec {
  pname = "pathvalidate";
  version = "2.5.2";
  format = "setuptools";
  version = "3.1.0";
  format = "pyproject";

  disabled = pythonOlder "3.6";
  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-X/V9D6vl7Lek8eSVe/61rYq1q0wPpx95xrvCS9m30U0=";
    hash = "sha256-QmlwIm4kGZ/ZDZOZXSI8Hii9qWfN9DcHVaFM33KiqO4=";
  };

  nativeBuildInputs = [
    setuptools
  ];

  # Requires `pytest-md-report`, causing infinite recursion.
  doCheck = false;

@@ -24,8 +29,9 @@ buildPythonPackage rec {
  ];

  meta = with lib; {
    description = "A Python library to sanitize/validate a string such as filenames/file-paths/etc";
    description = "Library to sanitize/validate a string such as filenames/file-paths/etc";
    homepage = "https://github.com/thombashi/pathvalidate";
    changelog = "https://github.com/thombashi/pathvalidate/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ oxalica ];
  };
+85 −15
Original line number Diff line number Diff line
{ buildPythonPackage
, fetchFromGitHub
, lib
{ lib
, buildPythonPackage
, dataproperty
, dominate
, elasticsearch
, fetchFromGitHub
, loguru
, mbstrdecoder
, pandas
, pathvalidate
, pytestCheckHook
, pythonOlder
, pyyaml
, setuptools
, simplejson
, tabledata
, tcolorpy
, typepy
, pytestCheckHook
, pyyaml
, toml
, elasticsearch
, dominate
, typepy
, xlsxwriter
, xlwt
}:

buildPythonPackage rec {
  pname = "pytablewriter";
  version = "0.64.2";
  version = "1.0.0";
  format = "pyproject";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "thombashi";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-+IOHnmdd9g3SoHyITJJtbJ0/SAAmwWmwX5XeqsO34EM=";
    rev = "refs/tags/v${version}";
    hash = "sha256-VDx7/kKRBho4oWvUXYe5K9CC4vUCDs91G05Wlpa47OE=";
  };

  nativeBuildInputs = [
    setuptools
  ];

  propagatedBuildInputs = [
    dataproperty
    mbstrdecoder
@@ -35,23 +48,80 @@ buildPythonPackage rec {
    typepy
  ];

  checkInputs = [ pyyaml toml elasticsearch dominate ];
  nativeCheckInputs = [ pytestCheckHook ];
  passthru.optional-dependencies = {
    all = [
      dominate
      elasticsearch
      loguru
      pandas
      # pytablereader
      pyyaml
      simplejson
      toml
      xlsxwriter
      xlwt
    ];
    es = [
      elasticsearch
    ];
    es8 = [
      elasticsearch
    ];
    excel = [
      xlwt
      xlsxwriter
    ];
    html = [
      dominate
    ];
    logging = [
      loguru
    ];
    # from = [
    #   pytablereader
    # ];
    pandas = [
      pandas
    ];
    # sqlite = [
    #   simplesqlite
    # ];
    # theme = [
    #   pytablewriter-altrow-theme
    # ];
    toml = [
      toml
    ];
    yaml = [
      pyyaml
    ];
  };

  nativeCheckInputs = [
    pytestCheckHook
  ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);

  pythonImportsCheck = [
    "pathvalidate"
  ];

  # Circular dependency
  disabledTests = [
    "test_normal_from_file"
    "test_normal_from_text"
    "test_normal_clear_theme"
  ];

  disabledTestPaths = [
    "test/writer/binary/test_excel_writer.py"
    "test/writer/binary/test_sqlite_writer.py"
  ];

  meta = with lib; {
    homepage = "https://github.com/thombashi/pytablewriter";
    description = "A library to write a table in various formats";
    maintainers = with maintainers; [ genericnerdyusername ];
    homepage = "https://github.com/thombashi/pytablewriter";
    changelog = "https://github.com/thombashi/pytablewriter/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ genericnerdyusername ];
  };
}
+32 −10
Original line number Diff line number Diff line
{ buildPythonPackage
{ lib
, buildPythonPackage
, fetchFromGitHub
, lib
, git
, riscv-isac
, riscv-config
, jinja2
, pythonOlder
, riscv-config
, riscv-isac
}:

buildPythonPackage rec {
  pname = "riscof";
  version = "1.25.3";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "riscv-software-src";
@@ -18,18 +22,36 @@ buildPythonPackage rec {
    hash = "sha256-ToI2xI0fvnDR+hJ++T4ss5X3gc4G6Cj1uJHx0m2X7GY=";
  };

  postPatch = "substituteInPlace riscof/requirements.txt --replace 'GitPython==3.1.17' GitPython";

  propagatedBuildInputs = [ riscv-isac riscv-config jinja2 ];

  patches = [
    # riscof copies a template directory from the store, but breaks because it doesn't change permissions and expects it to be writeable
    # riscof copies a template directory from the store, but breaks because it
    # doesn't change permissions and expects it to be writeable
    ./make_writeable.patch
  ];

  postPatch = ''
    substituteInPlace setup.py \
      --replace "import pip" ""
    substituteInPlace riscof/requirements.txt \
      --replace "GitPython==3.1.17" "GitPython"
  '';

  propagatedBuildInputs = [
    riscv-isac
    riscv-config
    jinja2
  ];

  pythonImportsCheck = [
    "riscof"
  ];

  # No unitests available
  doCheck = false;

  meta = with lib; {
    homepage = "https://github.com/riscv-software-src/riscof";
    description = "RISC-V Architectural Test Framework";
    homepage = "https://github.com/riscv-software-src/riscof";
    changelog = "https://github.com/riscv-software-src/riscof/blob/${version}/CHANGELOG.md";
    maintainers = with maintainers; [ genericnerdyusername ];
    license = licenses.bsd3;
  };