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