[BUG] cython can't find *.h/pxd files for a package, which is installed as editable
Nobody has claimed this yet.
- Dominant language
- Cython
- Stars
- 10.8k
- Forks
- 1.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 39
Description
I would expect there should be no difference for pip install -e . wrt pip install .. But see the example below.
Code to reproduce the behaviour:
- Clone https://github.com/aleaxit/gmpy/
- Create & enable venv (this hardly matter)
- Install cython:
pip install cython - Make editable install:
pip install -e . - Run tests:
python test_cython/runtests.py(which fails with "'gmpy2.pxd' not found", etc) - Now do usual install:
pip install . - Run tests:
python test_cython/runtests.py- now pass.
The is a workaround for (5): PYTHONPATH=pwd/gmpy2 python test_cython/runtests.py.
Environment
Python 3.11.1+ (heads/3.11:ba88628808, Jan 14 2023, 08:40:06) [GCC 10.2.1 20210110] on linux
Cython version 0.29.33
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the difference in a clean environment using the gmpy example and test_cython/runtests.py, comparing pip install -e . with pip install .. Investigate how the editable installation exposes gmpy2.pxd and *.h files to Cython; done means the tests pass after the editable install without setting PYTHONPATH.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100