Commit 16f04ef9 authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python311Packages.awesomeversion: refactor

parent 37377f6e
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -2,11 +2,7 @@
, buildPythonPackage
, fetchFromGitHub
, pythonOlder

# build-system
, poetry-core

# tests
, pytest-snapshot
, pytestCheckHook
}:
@@ -14,13 +10,13 @@
buildPythonPackage rec {
  pname = "awesomeversion";
  version = "24.2.0";
  format = "pyproject";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "ludeeus";
    repo = pname;
    repo = "awesomeversion";
    rev = "refs/tags/${version}";
    hash = "sha256-bpLtHhpWc1VweVl5G8mM473Js3bXT11N3Zc0jiVqq5c=";
  };
@@ -28,7 +24,7 @@ buildPythonPackage rec {
  postPatch = ''
    # Upstream doesn't set a version
    substituteInPlace pyproject.toml \
      --replace 'version = "0"' 'version = "${version}"'
      --replace-fail 'version = "0"' 'version = "${version}"'
  '';

  nativeBuildInputs = [