1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, build
6, git
7, importlib-metadata
8, pep517
9, pytest-mock
10, pytestCheckHook
11, setuptools
12, tomlkit
13, virtualenv
14}:
15
16buildPythonPackage rec {
17 pname = "poetry-core";
18 version = "1.3.2";
19 format = "pyproject";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = "python-poetry";
25 repo = pname;
26 rev = version;
27 hash = "sha256-3Ryfq0MwrL/mKP8DmkhLOyFlulf3c73z9fFIzMuqOrg=";
28 };
29
30 propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
31 importlib-metadata
32 ];
33
34 checkInputs = [
35 build
36 git
37 pep517
38 pytest-mock
39 pytestCheckHook
40 setuptools
41 tomlkit
42 virtualenv
43 ];
44
45 # Requires git history to work correctly
46 disabledTests = [
47 "default_with_excluded_data"
48 "default_src_with_excluded_data"
49 ];
50
51 pythonImportsCheck = [
52 "poetry.core"
53 ];
54
55 # Allow for package to use pep420's native namespaces
56 pythonNamespaces = [
57 "poetry"
58 ];
59
60 meta = with lib; {
61 description = "Core utilities for Poetry";
62 homepage = "https://github.com/python-poetry/poetry-core/";
63 license = licenses.mit;
64 maintainers = with maintainers; [ jonringer ];
65 };
66}