astropy / astropy/astropy

PTH flake test breaks build process

Open
#20,109 3 comments 0 reactions 0 assignees View on GitHub
Close? installation Needs-clarification question zzz :zzz: Python3.10
Dominant language
Python
Stars
5.3k
Forks
2.2k
Avg merge
1d 18h
Merged PRs (30d)
74

Description

### Description

I'm trying to build astropy 8.0.1+ https://github.com/astropy/astropy/commit/9f445d4e2c5be492295165727f8a668d6e182e4f with Python 3.10

The commit eb1dfbdcab5e4d2da06884b6ffc371c979f5db54 has broken my ArchLinux build process:

```
ASTROPY_USE_SYSTEM_ALL=1 python -m build --wheel --no-isolation --skip-dependency-check
ASTROPY_USE_SYSTEM_ALL=1 python -m installer --destdir="${pkgdir}" dist/*.whl
```

```
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/usr/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 432, in build_wheel
return self._build_with_temp_dir(
File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 417, in _build_with_temp_dir
self.run_setup()
File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 339, in run_setup
exec(code, locals())
File "", line 16, in
File "/usr/lib/python3.10/site-packages/extension_helpers/_setup_helpers.py", line 63, in get_extensions
for setuppkg in iter_setup_packages(srcdir, packages):
File "/usr/lib/python3.10/site-packages/extension_helpers/_setup_helpers.py", line 128, in iter_setup_packages
module = import_file(setup_package, name=packagename + ".setup_package")
File "/usr/lib/python3.10/site-packages/extension_helpers/_utils.py", line 133, in import_file
mod = loader.load_module()
File "", line 548, in _check_name_wrapper
File "", line 1063, in load_module
File "", line 888, in load_module
File "", line 290, in _load_module_shim
File "", line 719, in _load
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "./astropy/table/setup_package.py", line 9, in
ROOT = Path(__file__).parent.relative_to(Path.cwd())
File "/usr/lib/python3.10/pathlib.py", line 818, in relative_to
raise ValueError("{!r} is not in the subpath of {!r}"
ValueError: 'astropy/table' is not in the subpath of '[..]/astropy/src/astropy' OR one path is relative and the other is absolute.
```
actually untrue, it is at $AUR/astropy/src/astropy/astropy/table/

Contributor guide

Open the contributing guide

Research direction

Start with astropy/table/setup_package.py and reproduce the failure using the reported Python 3.10 build and installer commands with ASTROPY_USE_SYSTEM_ALL=1. Trace the Path.cwd() and relative_to() assumptions around the reported commit, then verify that the wheel build completes successfully in the ArchLinux-style source layout.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.