1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 morphys,
6 pytestCheckHook,
7 python-baseconv,
8 pythonOlder,
9 six,
10}:
11buildPythonPackage rec {
12 pname = "py-multibase";
13 version = "1.0.3";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-0oog78u2Huwo9VgnoL8ynHzqgP/9kzrsrqauhDEmf+Q=";
21 };
22
23 postPatch = ''
24 substituteInPlace setup.cfg \
25 --replace "[pytest]" "" \
26 --replace "python_classes = *TestCase" ""
27 substituteInPlace setup.py \
28 --replace "'pytest-runner'," ""
29 '';
30
31 propagatedBuildInputs = [
32 morphys
33 python-baseconv
34 six
35 ];
36
37 nativeCheckInputs = [ pytestCheckHook ];
38
39 pythonImportsCheck = [ "multibase" ];
40
41 meta = with lib; {
42 description = "Module for distinguishing base encodings and other simple string encodings";
43 homepage = "https://github.com/multiformats/py-multibase";
44 changelog = "https://github.com/multiformats/py-multibase/blob/v${version}/HISTORY.rst";
45 license = licenses.mit;
46 maintainers = with maintainers; [ rakesh4g ];
47 };
48}