1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 jsonschema,
6 poetry-core,
7 pymacaroons,
8 pytest-mock,
9 pytestCheckHook,
10 pythonOlder,
11 typing-extensions,
12}:
13
14buildPythonPackage rec {
15 pname = "pypitoken";
16 version = "7.0.1";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchFromGitHub {
22 owner = "ewjoachim";
23 repo = pname;
24 rev = "refs/tags/${version}";
25 hash = "sha256-1SUR6reZywgFpSdD49E5PjEDNrlvsHH4TK6SkXStUws=";
26 };
27
28 postPatch = ''
29 sed -i "/--cov/d" setup.cfg
30 '';
31
32 nativeBuildInputs = [ poetry-core ];
33
34 propagatedBuildInputs = [
35 pymacaroons
36 jsonschema
37 typing-extensions
38 ];
39
40 nativeCheckInputs = [
41 pytest-mock
42 pytestCheckHook
43 ];
44
45 pythonImportsCheck = [ "pypitoken" ];
46
47 meta = with lib; {
48 description = "Library for generating and manipulating PyPI tokens";
49 homepage = "https://pypitoken.readthedocs.io/";
50 changelog = "https://github.com/ewjoachim/pypitoken/releases/tag/6.0.3${version}";
51 license = with licenses; [ mit ];
52 maintainers = with maintainers; [ fab ];
53 };
54}