daler / pybedtools

Python wrapper -- and more -- for BEDTools (bioinformatics tools for "genome arithmetic")
http://daler.github.io/pybedtools
Other
297 stars 103 forks source link

Cythonizing files requires `language_level=2` to be set in cythonize() #393

Closed lbeltrame closed 11 months ago

lbeltrame commented 11 months ago

The most recent versions of Cython moved from 2 to 3str, and that breaks the build in various ways.

Context for some of the issues that arise: https://stackoverflow.com/questions/56115159/pxd-relative-cimport-works-for-language-level-2-but-not-for-3

daz10000 commented 11 months ago

Leaving some notes since I just had to fight my way through this to get pybedtools working on 3.11.

pyx files edit

These three files need a #cython: language_level=2 line near the top

pybedtools/_Window.pyx pybedtools/cbedtools.pyx pybedtools/featurefuncs.pyx

setup.py

Needs language_level=2 as the title says

setup(
        name='pybedtools',
        language_level=2,
        maintainer='Ryan Dale',
        version=VERSION
daler commented 11 months ago

thanks @daz10000 and @lbeltrame -- can you try v0.9.1?

daler commented 11 months ago

Seems to be working according to the related #387, so closing this one too (though @lbeltrame if you hit issues please reopen).

lbeltrame commented 11 months ago

I'm currently on holiday, will test in a couple weeks and report back.