pyranges / pyrle

Numerical Run Length Encoding and Arithmetic in Cython
https://biocore-ntnu.github.io/pyranges/an-introduction-to-rles.html
MIT License
16 stars 3 forks source link

pip fails while installing pyrle due to Cython dependency #5

Closed jwarwick-delfi closed 2 years ago

jwarwick-delfi commented 2 years ago

Hello,

Pyrle requires cython in its setup.py, however, when I use pip to install pyrle in a clean virtual environment, it doesn't even attempt to install cython and fails.

My guess is that this has to do with the lack of a pyproject.toml, similar to this project which has the same dependency: https://github.com/biocore-ntnu/pyranges/issues/85

> "${VENV}/bin/pip" install pyrle
Collecting pyrle
  Using cached pyrle-0.0.33.tar.gz (353 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/3k/1rb9kxyn35z51bc7ny7z1xgw0000gn/T/pip-install-_1ax1got/pyrle_c07065939b52406684a99a2dda8455b0/setup.py", line 7, in <module>
          from Cython.Build import cythonize
      ModuleNotFoundError: No module named 'Cython'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

I'm using Python 3.9 with pip 21.2.3 on OSX.

endrebak commented 2 years ago

Thanks for reporting. If you install cython first, does it work then? An example PR with pyproject.toml would help (if you know how).

jwarwick-delfi commented 2 years ago

it does work if I install cython first, but I am using the pants build tool, so all the dependencies need to be installed at once. The ticket I linked to above includes a link to this PR, which seems to have fixed the issue for the pyranges project.

endrebak commented 2 years ago

Tried to fix it with 0.0.34 that is out on PYPI now. Thanks for the reporting and suggesting a fix.

jwarwick-delfi commented 2 years ago

Fixed confirmed on my side! Thanks very much for the quick response and fix!

endrebak commented 2 years ago

No, thank you for bothering to report this :D