@@ -0,0 +1,29 @@
1+{ lib, python3, git, mercurial}:
2+
3+python3.pkgs.buildPythonApplication rec {
4+ pname = "bumpver";
5+ version = "2020.1107";
6+
7+ src = python3.pkgs.fetchPypi {
8+ inherit pname version;
9+ sha256 = "75704333a8d1699e2cadcf1fcd3027a2cab6837ae343af10a61c6eef4e0313d7";
10+ };
11+
12+ prePatch = ''
13+ substituteInPlace setup.py \
14+ --replace "if any(arg.startswith(\"bdist\") for arg in sys.argv):" ""\
15+ --replace "import lib3to6" ""\
16+ --replace "package_dir = lib3to6.fix(package_dir)" ""
17+ '';
18+
19+ propagatedBuildInputs = with python3.pkgs; [ pathlib2 click toml lexid colorama setuptools ];
20+
21+ checkInputs = [ python3.pkgs.pytestCheckHook git mercurial];
22+
23+ meta = with lib; {
24+ description = "Bump version numbers in project files";
25+ homepage = "https://pypi.org/project/bumpver/";
26+ license = licenses.mit;
27+ maintainers = with maintainers; [ kfollesdal ];
28+ };
29+}