Skip to content

Commit

Permalink
python3.pkgs.releases: fix compatibility with semantic_version >= 2.7
Browse files Browse the repository at this point in the history
Previously, derivation patched-out constraint on semantic_version, but did not
address run-time error about

    Call either Version('1.2.3') or Version(major=1, ...).

This is known issue, but upstream chooses to pin "semantic_version<2.7" as
solution. More information in bitprophet/releases#86.
  • Loading branch information
Dmitry Bogatov committed Nov 4, 2022
1 parent a8cf893 commit 0bc9376
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkgs/development/python-modules/releases/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ buildPythonPackage
, fetchFromGitHub
, lib
, fetchpatch
, semantic-version
, sphinx
}:
Expand All @@ -17,6 +18,13 @@ buildPythonPackage rec {
hash = "sha256-XX2e6bjBNMun31h0sNJ9ieZE01U+PhA5JYYNOuMgD20=";
};

patches = [
(fetchpatch { # PR 86 (Fix compatibility with >=python-semanticversion-2.7.0)
url = "https://github.com/bitprophet/releases/commit/8787236dffb7383427b3e1448ece9a5b3eaf5257.patch";
sha256 = "sha256-VdNxkne8mm11fHgTFDQyCxHX85f8DVaY67ZJxXLYYAQ=";
})
];

postPatch = ''
substituteInPlace setup.py --replace "semantic_version<2.7" "semantic_version"
'';
Expand Down

0 comments on commit 0bc9376

Please sign in to comment.