Package: src:flit
Version: 3.9.0-1
Severity: serious
Tags: sid trixie
flit ftbfs in unstable,
[...]
__________________________________ test_sdist __________________________________
rel_path = 'README.rst', proj_dir = PosixPath('.'), guess_mimetype = True
def description_from_file(rel_path: str, proj_dir: Path,
guess_mimetype=True):
if osp.isabs(rel_path):
raise ConfigError("Readme path must be relative")
desc_path = proj_dir / rel_path
try:
> with desc_path.open('r', encoding='utf-8') as f:
flit_core/config.py:281:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = PosixPath('README.rst'), mode = 'r', buffering = -1, encoding = 'utf-8'
errors = None, newline = None
def open(self, mode='r', buffering=-1, encoding=None,
errors=None, newline=None):
"""
Open the file pointed by this path and return a file object, as
the built-in open() function does.
"""
if "b" not in mode:
encoding = io.text_encoding(encoding)
> return io.open(self, mode, buffering, encoding, errors, newline)
E FileNotFoundError: [Errno 2] No such file or directory: 'README.rst'
/usr/lib/python3.11/pathlib.py:1045: FileNotFoundError
During handling of the above exception, another exception occurred:
tmp_path = '/tmp/pytest-of-buildd/pytest-0/test_sdist0', cwd_project = None
def test_sdist(tmp_path, cwd_project):
tmp_path = str(tmp_path)
> filename = buildapi.build_sdist(tmp_path)
flit_core/tests/test_build_thyself.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
flit_core/buildapi.py:82: in build_sdist
path = SdistBuilder.from_ini_path(pyproj_toml).build(Path(sdist_directory))
flit_core/sdist.py:90: in from_ini_path
ini_info = read_flit_config(ini_path)
flit_core/config.py:79: in read_flit_config
return prep_toml_config(d, path)
flit_core/config.py:106: in prep_toml_config
loaded_cfg = read_pep621_metadata(d['project'], path)
flit_core/config.py:454: in read_pep621_metadata
desc_content, mimetype = description_from_file(readme, path.parent)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
rel_path = 'README.rst', proj_dir = PosixPath('.'), guess_mimetype = True
def description_from_file(rel_path: str, proj_dir: Path,
guess_mimetype=True):
if osp.isabs(rel_path):
raise ConfigError("Readme path must be relative")
desc_path = proj_dir / rel_path
try:
with desc_path.open('r', encoding='utf-8') as f:
raw_desc = f.read()
except IOError as e:
if e.errno == errno.ENOENT:
> raise ConfigError(
"Description file {} does not exist".format(desc_path)
)
E flit_core.config.ConfigError: Description file README.rst does
not exist
flit_core/config.py:285: ConfigError
=========================== short test summary info ============================
FAILED flit_core/tests/test_build_thyself.py::test_prepare_metadata - flit_co...
FAILED flit_core/tests/test_build_thyself.py::test_wheel - flit_core.config.C...
FAILED flit_core/tests/test_build_thyself.py::test_sdist - flit_core.config.C...
========================= 3 failed, 87 passed in 0.38s =========================