1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 git,
6 mock,
7 pep440,
8 pip,
9 pytestCheckHook,
10 pythonOlder,
11 setuptools-scm,
12 six,
13 wheel,
14}:
15
16buildPythonPackage rec {
17 pname = "setupmeta";
18 version = "3.6.0";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.6";
22
23 src = fetchFromGitHub {
24 owner = "codrsquad";
25 repo = pname;
26 rev = "refs/tags/v${version}";
27 hash = "sha256-OI7PU5LQ6w0iAbK7nsP+6RizsEWjKP9nec2J6n0xUhI=";
28 };
29
30 preBuild = ''
31 export PYGRADLE_PROJECT_VERSION=${version};
32 '';
33
34 nativeBuildInputs = [
35 setuptools-scm
36 wheel
37 ];
38
39 nativeCheckInputs = [
40 git
41 mock
42 pep440
43 pip
44 pytestCheckHook
45 six
46 ];
47
48 preCheck = ''
49 unset PYGRADLE_PROJECT_VERSION
50 '';
51
52 disabledTests = [
53 # Tests want to scan site-packages
54 "test_check_dependencies"
55 "test_clean"
56 "test_scenario"
57 "test_git_versioning"
58 # setuptools.installer and fetch_build_eggs are deprecated.
59 # Requirements should be satisfied by a PEP 517 installer.
60 "test_brand_new_project"
61 ];
62
63 pythonImportsCheck = [ "setupmeta" ];
64
65 meta = with lib; {
66 description = "Python module to simplify setup.py files";
67 homepage = "https://github.com/codrsquad/setupmeta";
68 license = licenses.mit;
69 maintainers = with maintainers; [ fab ];
70 };
71}