daler/pybedtools

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

lbeltrame opened this issue · 4 comments

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

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

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

daler commented

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

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