Skip to content

Add explicit setuptools dependency#390

Open
tomwardio wants to merge 1 commit into
pyranges:masterfrom
tomwardio:python3.12
Open

Add explicit setuptools dependency#390
tomwardio wants to merge 1 commit into
pyranges:masterfrom
tomwardio:python3.12

Conversation

@tomwardio

@tomwardio tomwardio commented Nov 11, 2024

Copy link
Copy Markdown

For Python >=3.12, setuptools is not longer included by default. Even for older distros, setuptools may not necessarily be included by default (e.g. building locally doesn't necessarily include setuptools).

@tomwardio

tomwardio commented Nov 11, 2024

Copy link
Copy Markdown
Author

Without explicitly depending on setuptools, tests fail with the following:

ImportError while loading conftest '/tmp/pyranges/tests/unit/conftest.py'.
tests/unit/conftest.py:5: in <module>
    from pyranges import PyRanges
pyranges/__init__.py:8: in <module>
    import pkg_resources
E   ModuleNotFoundError: No module named 'pkg_resources'

For Python >=3.12, setuptools is not longer included by default. Even for older distros, setuptools may not necessarily be included by default (e.g. building locally doesn't necessarily include setuptools).
@tomwardio tomwardio changed the title Add setuptools dependency when running with Python >=3.12 Add explicit setuptools dependency Nov 13, 2024
tomwardio added a commit to google-deepmind/alphagenome that referenced this pull request Nov 18, 2024
Currently pyranges implicitly relies on setuptools. pyranges/pyranges0#390 will rectify this, but in the meantime explicitly add setuptools to our project.

PiperOrigin-RevId: 696463550
Change-Id: I7d6450de0ebc35db9d585bf0df440a644ec4d657
@semenko

semenko commented Jan 31, 2025

Copy link
Copy Markdown
Contributor

I think importlib_resources is the preferred approach.

@tomwardio

Copy link
Copy Markdown
Author

I think importlib_resources is the preferred approach.

Yes that would be even better! I did the minimum to get this package to work with 3.12.

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