Unverified Commit 0833561d authored by Doron Behar's avatar Doron Behar Committed by GitHub
Browse files

Merge pull request #320113 from doronbehar/pkg/python-pint

python311Packages.pint: fix pint-convert executable
parents 4f23d940 45e59249
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools-scm,
  typing-extensions,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "flexcache";
  version = "0.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "hgrecco";
    repo = "flexcache";
    rev = "refs/tags/${version}";
    hash = "sha256-MAbTe7NxzfRPzo/Wnb5SnPJvJWf6zVeYsaw/g9OJYSE=";
  };

  build-system = [ setuptools-scm ];

  dependencies = [ typing-extensions ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "flexcache" ];

  meta = {
    description = "An robust and extensible package to cache on disk the result of expensive calculations";
    homepage = "https://github.com/hgrecco/flexcache";
    changelog = "https://github.com/hgrecco/flexcache/blob/${src.rev}/CHANGES";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ doronbehar ];
  };
}
+37 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools-scm,
  typing-extensions,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "flexparser";
  version = "0.3.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "hgrecco";
    repo = "flexparser";
    rev = "refs/tags/${version}";
    hash = "sha256-9ImG8uh1SZ+pAbqzWBkTVn+3EBAGzzdP8vqqP59IgIw=";
  };

  build-system = [ setuptools-scm ];

  dependencies = [ typing-extensions ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "flexparser" ];

  meta = {
    description = "Parsing made fun ... using typing";
    homepage = "https://github.com/hgrecco/flexparser";
    changelog = "https://github.com/hgrecco/flexparser/blob/${src.rev}/CHANGES";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ doronbehar ];
  };
}
+21 −16
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,
  fetchFromGitHub,
  pythonOlder,

  # build-system
@@ -10,6 +10,9 @@

  # propagates
  typing-extensions,
  appdirs,
  flexcache,
  flexparser,

  # tests
  pytestCheckHook,
@@ -22,15 +25,16 @@

buildPythonPackage rec {
  pname = "pint";
  version = "0.23";
  version = "0.24";
  format = "pyproject";

  disabled = pythonOlder "3.6";

  src = fetchPypi {
    inherit version;
    pname = "Pint";
    hash = "sha256-4VCbkWBtvFJSfGAKTvdP+sEv/3Boiv8g6QckCTRuybQ=";
  src = fetchFromGitHub {
    owner = "hgrecco";
    repo = "pint";
    rev = "refs/tags/${version}";
    hash = "sha256-zMcLC3SSl/W7+xX4ah3ZV7fN/LIGJzatqH4MNK8/fec=";
  };

  nativeBuildInputs = [
@@ -38,15 +42,23 @@ buildPythonPackage rec {
    setuptools-scm
  ];

  propagatedBuildInputs = [ typing-extensions ];
  propagatedBuildInputs = [
    appdirs
    flexcache
    flexparser
    typing-extensions
    # Both uncertainties and numpy are not necessarily needed for every
    # function of pint, but needed for the pint-convert executable which we
    # necessarily distribute with this package as it is.
    uncertainties
    numpy
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-subtests
    pytest-benchmark
    numpy
    matplotlib
    uncertainties
  ];

  pytestFlagsArray = [ "--benchmark-disable" ];
@@ -55,13 +67,6 @@ buildPythonPackage rec {
    export HOME=$(mktemp -d)
  '';

  disabledTests = [
    # https://github.com/hgrecco/pint/issues/1898
    "test_load_definitions_stage_2"
    # pytest8 deprecation
    "test_nonnumeric_magnitudes"
  ];

  meta = with lib; {
    changelog = "https://github.com/hgrecco/pint/blob/${version}/CHANGES";
    description = "Physical quantities module";
+15 −14
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,
  future,
  setuptools-scm,
  fetchFromGitHub,
  pytestCheckHook,
  numpy,
  pynose,
}:

buildPythonPackage rec {
  pname = "uncertainties";
  version = "3.1.7";
  format = "setuptools";
  version = "3.2.1";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-gBEeCDnyOcWyM8tHcgF7SDoLehVzpYG5Krd0ajXm+qs=";
  src = fetchFromGitHub {
    owner = "lmfit";
    repo = "uncertainties";
    rev = "refs/tags/${version}";
    hash = "sha256-AaFazHeq7t4DnG2s9GvmAJ3ni62PWHR//mNPL+WyGSI=";
  };

  propagatedBuildInputs = [ future ];
  nativeBuildInputs = [
    setuptools-scm
  ];

  nativeCheckInputs = [
    pynose
    pytestCheckHook
    numpy
  ];

  checkPhase = ''
    nosetests -sve test_1to2
  '';

  meta = with lib; {
    homepage = "https://pythonhosted.org/uncertainties/";
    description = "Transparent calculations with uncertainties on the quantities involved (aka error propagation)";
+4 −0
Original line number Diff line number Diff line
@@ -4457,6 +4457,10 @@ self: super: with self; {
  flet-runtime = callPackage ../development/python-modules/flet-runtime { };
  flexcache = callPackage ../development/python-modules/flexcache { };
  flexparser = callPackage ../development/python-modules/flexparser { };
  flexmock = callPackage ../development/python-modules/flexmock { };
  flickrapi = callPackage ../development/python-modules/flickrapi { };