Gentoo Archives: gentoo-dev

From: parona <parona@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] setuptools problem
Date: Mon, 10 Oct 2022 08:24:04
Message-Id: fZKPEmB_55P0W4lqmCKnqozyNqyvAYG4yxQnSTkbUol44y3BO1FcBlFQMLj9JWXLDASkCQMjpIklMPSfKzHZEE2w9WZqbM_Yuc5HyfQ19I8=@protonmail.com
In Reply to: [gentoo-dev] setuptools problem by Andrey Grozin
1 Hello,
2
3 You should add DISTUTILS_USE_PEP517=hatchling.
4
5 A good resource for python ebuilds is here https://projects.gentoo.org/python/guide/distutils.html?highlight=pep517#the-pep-517-and-legacy-modes
6
7 ------- Original Message -------
8 On Monday, October 10th, 2022 at 11:08, Andrey Grozin <grozin@×××××××××××××××××.org> wrote:
9
10
11 > Hello *,
12 >
13 > I'm trying to bump dev-python/rpyc to 5.2.3, and I get
14 >
15 > > > > Compiling source in
16 >
17 > /var/tmp/portage/dev-python/rpyc-5.2.3/work/rpyc-5.2.3 ...
18 > * python3_9: running distutils-r1_run_phase distutils-r1_python_compile
19 > python3.9 -c from setuptools import setup; setup() build -j 6
20 > configuration error: `project.license` must be valid exactly by one
21 > definition (2 matches found):
22 >
23 > - keys:
24 > 'file': {type: string}
25 > required: ['file']
26 > - keys:
27 > 'text': {type: string}
28 > required: ['text']
29 >
30 > DESCRIPTION:
31 > `Project license <https://www.python.org/dev/peps/pep-0621/#license>`_.
32 >
33 >
34 > GIVEN VALUE:
35 > "MIT"
36 >
37 > OFFENDING RULE: 'oneOf'
38 >
39 > DEFINITION:
40 > {
41 > "oneOf": [
42 > {
43 > "properties": {
44 > "file": {
45 > "type": "string",
46 > "$$description": [
47 > "Relative path to the file (UTF-8) which
48 > contains the license for the",
49 > "project."
50 > ]
51 > }
52 > },
53 > "required": [
54 > "file"
55 > ]
56 > },
57 > {
58 > "properties": {
59 > "text": {
60 > "type": "string",
61 > "$$description": [
62 > "The license of the project whose meaning is
63 > that of the",
64 > "`License field from the core metadata", "<https://packaging.python.org/specifications/core-metadata/#license>`_."
65 >
66 > ]
67 > }
68 > },
69 > "required": [
70 > "text"
71 > ]
72 > }
73 > ]
74 > }
75 > Traceback (most recent call last):
76 > File "<string>", line 1, in <module>
77 >
78 > File "/usr/lib/python3.9/site-packages/setuptools/init.py", line 87,
79 > in setup
80 > return distutils.core.setup(**attrs)
81 > File "/usr/lib/python3.9/distutils/core.py", line 121, in setup
82 > dist.parse_config_files()
83 > File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 868, in
84 > parse_config_files
85 > pyprojecttoml.apply_configuration(self, filename,
86 > ignore_option_errors)
87 > File
88 > "/usr/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py",
89 > line 62, in apply_configuration
90 > config = read_configuration(filepath, True, ignore_option_errors,
91 > dist)
92 > File
93 > "/usr/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py",
94 > line 126, in read_configuration
95 > validate(subset, filepath)
96 > File
97 > "/usr/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py",
98 > line 51, in validate
99 > raise ValueError(f"{error}\n{summary}") from None
100 > ValueError: invalid pyproject.toml config: `project.license`.
101 > configuration error: `project.license` must be valid exactly by one
102 > definition (2 matches found):
103 >
104 > - keys:
105 > 'file': {type: string}
106 > required: ['file']
107 > - keys:
108 > 'text': {type: string}
109 > required: ['text']
110 >
111 > Any idea what has gone wrong? By googling I've found
112 > https://github.com/vanheeringen-lab/seq2science/issues/851
113 > https://bytemeta.vip/repo/jdtuck/fdasrsf_python/issues/23
114 > which seem similar.
115 >
116 > Thanks in advance,
117 > Andrey