Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

climage does not work on python 3.12 #10

Open
aleivag opened this issue Sep 27, 2024 · 3 comments
Open

climage does not work on python 3.12 #10

aleivag opened this issue Sep 27, 2024 · 3 comments

Comments

@aleivag
Copy link
Contributor

aleivag commented Sep 27, 2024

climage cant run on python 3.12 becausevit imports pkg_resources in

https://github.com/pnappa/CLImage/blob/master/climage/__init__.py#L4

so if you do:

➜  /tmp python3.12 -m 'venv' /tmp/venv
➜  /tmp /tmp/venv/bin/pip install climage
Collecting climage
  Using cached climage-0.2.0-py3-none-any.whl.metadata (2.7 kB)
Collecting Pillow (from climage)
  Using cached pillow-10.4.0-cp312-cp312-manylinux_2_28_x86_64.whl.metadata (9.2 kB)
Collecting kdtree (from climage)
  Using cached kdtree-0.16-py2.py3-none-any.whl.metadata (1.3 kB)
Using cached climage-0.2.0-py3-none-any.whl (21 kB)
Using cached kdtree-0.16-py2.py3-none-any.whl (7.7 kB)
Using cached pillow-10.4.0-cp312-cp312-manylinux_2_28_x86_64.whl (4.5 MB)
Installing collected packages: kdtree, Pillow, climage
Successfully installed Pillow-10.4.0 climage-0.2.0 kdtree-0.16

[notice] A new release of pip is available: 23.3.2 -> 24.2
[notice] To update, run: python3.12 -m pip install --upgrade pip
➜  /tmp /tmp/venv/bin/python -c 'import climage'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/venv/lib64/python3.12/site-packages/climage/__init__.py", line 4, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

off course climage could specify setuptools as part of the dependecies, but that would be an overkill to be honest. specially because this is just to fill the version field.

I volunteer to fix this issue, I propose the following solutions

  1. Lets turn this project around, and lets create a version.py file, thats the file we manipulate to increase versions.
  2. we either read that from setup.py, or better yet, we remove setup.py and just make it a pyproject.toml with a dynamic = ["version"] field to read the version from source
  3. if the mantainer wants it, i can also make this project hatch friendly, so taht bumping version is easy.
  4. and i can do, or provide gidance on how to cut a release though github actions every time a comit bumps the version.py file

let me know what you think... i'll play with a PR and attach it
6.

@aleivag
Copy link
Contributor Author

aleivag commented Sep 27, 2024

did #11

@pnappa
Copy link
Owner

pnappa commented Sep 29, 2024

I've published version 0.2.1. Let me know if that fixes things.

@pnappa
Copy link
Owner

pnappa commented Sep 29, 2024

And even better, I've released 0.2.2 which fixes all the broken README images on PyPI 😉. There's no other functional changes in this version. https://pypi.org/project/climage/

Please update using pip3 install --upgrade climage.

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

No branches or pull requests

2 participants