Skip to content

Conversation

@theAeon
Copy link
Contributor

@theAeon theAeon commented Mar 7, 2025

Apparently it Just Works with Cython 3 if you move the distutils stuff over to setuptools. Who'dve thought. (can't verify all tests right now but passed most of them and then ran out of space).

reference issue #422

@theAeon theAeon changed the title issue #422 Support python 3.13/cython 3 Mar 8, 2025
@daler
Copy link
Owner

daler commented Mar 11, 2025

Thank you for this!

(I can't quite work out how to permanently enable running tests for this PR so I have to keep manually enabling...)

@theAeon
Copy link
Contributor Author

theAeon commented Mar 11, 2025

No worries!

@theAeon
Copy link
Contributor Author

theAeon commented Mar 11, 2025

currently replicating CI locally as I was not getting import errors (or i wouldn't have submitted the pr)

@theAeon
Copy link
Contributor Author

theAeon commented Mar 11, 2025

Well, that's bizarre. Runs fine when invoking pytest.main from the interpreter and explodes when run from the command line.

@theAeon
Copy link
Contributor Author

theAeon commented Mar 14, 2025

@daler made a few adjustments if you would give it an approval :)

@theAeon
Copy link
Contributor Author

theAeon commented Mar 14, 2025

seems genomepy doesn't actually support 3.13 yet-dunno if that's a blocker

@theAeon
Copy link
Contributor Author

theAeon commented Mar 14, 2025

easy fix tbh simonvh/norns#10

@theAeon
Copy link
Contributor Author

theAeon commented Mar 14, 2025

so it turns out that the directory was a red herring for cython having trouble locating the naked cpdef in cbedtools-so i just added it to init.py and called it a day. should(?) work now

@theAeon
Copy link
Contributor Author

theAeon commented Mar 14, 2025

oh for God's sake I literally excluded that file

@theAeon
Copy link
Contributor Author

theAeon commented Mar 14, 2025

once more

@daler
Copy link
Owner

daler commented Mar 14, 2025

Fantastic! Thanks for working out all the details. I don't have the bandwidth that I used to, so this is super helpful.

At some point I'll need to do a more careful review of those .pxd files (i.e., prob don't need language level 2 any more) but at least this builds on 3.13. Will cut a release shortly.

@daler daler merged commit c869000 into daler:master Mar 14, 2025
5 checks passed
@theAeon theAeon deleted the cy3 branch March 14, 2025 23:45
@daler
Copy link
Owner

daler commented Mar 15, 2025

Uh oh...upon uploading to TestPyPI, I'm unable to install locally on macOS or Linux with the following:

conda create -y -p ./env "python>=3.13"
conda activate ./env
python3 -m pip install \
  --index-url https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple/ pybedtools==0.12

I haven't quite figured out why it passed here though.

@theAeon
Copy link
Contributor Author

theAeon commented Mar 15, 2025

pulling it down from test.pypi on my end shows cpp files generated by 0.29, which would do that. Just delete the cpp files from the sdist, modern setuptools is smart enough to handle it.

@daler
Copy link
Owner

daler commented Mar 17, 2025

Ugh, looks like I hadn't run the clean part of setup.py. All fixed; v0.12 is now in PyPI and bioconda. Thanks again for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants