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

Publish pre-compiled wheels to PyPI #295

Closed
janosh opened this issue Nov 13, 2024 · 15 comments
Closed

Publish pre-compiled wheels to PyPI #295

janosh opened this issue Nov 13, 2024 · 15 comments
Assignees

Comments

@janosh
Copy link
Contributor

janosh commented Nov 13, 2024

didn't find any previous issue on this but apologies if this was discussed before

are there are blockers (technical or development time) for publishing pre-compiled wheels for phono3py to PyPI? would be great to be able to install with pip/uv

@atztogo
Copy link
Member

atztogo commented Nov 13, 2024

The wheel packaging was not easy and stressful to me from the experience of providing wheels of phonopy (not available now) and spglib (maintained by @LecrisUT now :)). I don't know now, but I thought it was not easy before because of lapacke that was not very popular before.

@janosh
Copy link
Contributor Author

janosh commented Nov 13, 2024

there's a very nice project directly from the python packaging authority PyPA) https://github.com/pypa/cibuildwheel which handles a lot of the platform-specific complexity of building wheels for every OS and Python version. i've used it on a few projects and had good experiences. i don't know if it handles all the needs of phono3py but if it wasn't tried yet, probably worth a shot

@atztogo
Copy link
Member

atztogo commented Nov 14, 2024

Thanks, @janosh! I used it a long time ago, but back then, it would sometimes stop working unexpectedly for reasons I couldn't figure out. I often spent a day or more troubleshooting since I didn’t fully understand how it worked. Eventually, I decided, 'This isn’t really my job,' and let it go.

Since users sometimes express complaints, and software development continues to be unfairly undervalued in academia, I need to be careful not to exhaust myself to avoid losing the passion to continue scientific software development.

@LecrisUT
Copy link
Collaborator

Lapacke is a bit tricky and most likely I can't make it performant, but I can port the spglib build system here. I have one project to attend to this week, but I can add this ond to my todo for next week. @atztogo all ok sith refactoring the build system here?

@atztogo
Copy link
Member

atztogo commented Nov 14, 2024

@atztogo all ok sith refactoring the build system here?

Sure, thanks. But please don't feel too obligated.

@LecrisUT
Copy link
Collaborator

No worries, this is my bread-and-butter and my new job at Qt is also cmake oriented.

@hrushikesh-s
Copy link

Having this would be really useful for my new atomate2 anharmonic phonons workflow

are there are blockers (technical or development time) for publishing pre-compiled wheels for phono3py to PyPI? would be great to be able to install with pip/uv

@metalcycling
Copy link

This would be great to have. We have a Ray cluster using Docker containers as nodes, and we install everything at the system level using uv pip install --system. Right now, we can't install phono3py outside of a conda environment which we want to avoid.

@metalcycling
Copy link

Also, we found a way to install phono3py using pip and/or uv.

CC=/usr/bin/gcc CXX=/usr/bin/g++ uv pip install --index-url https://pypi.anaconda.org/conda-forge/simple --extra-index-url https://pypi.org/simple phono3py phonopy h5py

@atztogo
Copy link
Member

atztogo commented Jan 18, 2025

I made it only for linux (CIBW_SKIP: "cp39-* pp* *_i686 *musllinux*"). I am not sure if it works properly.

https://pypi.org/project/phono3py/3.11.1/#files
https://github.com/phonopy/phono3py/blob/develop/.github/workflows/wheels.yml

@janosh
Copy link
Contributor Author

janosh commented Jan 18, 2025

thanks so much @atztogo! 👍

just tried pip install phono3py and uv pip install phono3py. both worked on macOS 3.12.7 and 3.13.

probably worth leaving this open to track windows wheels?

@atztogo
Copy link
Member

atztogo commented Jan 18, 2025

probably worth leaving this open to track windows wheels?

For you maybe yes. But not for me. This is a stressful job for me.

@janosh
Copy link
Contributor Author

janosh commented Jan 18, 2025

understood, maybe #335 helps

@atztogo
Copy link
Member

atztogo commented Feb 1, 2025

I think this issue has been done. See https://pypi.org/project/phono3py/#files

The wheels were made by https://github.com/phonopy/phono3py/blob/develop/.github/workflows/wheels.yml

I haven't tested the packages. Since there are options for running tests in cibuildwheel, those should be specified, but I postponed. Instead, tests were only performed by

In conda-forge package building, those packages have been tested. conda-forge/phono3py-feedstock#100

@janosh
Copy link
Contributor Author

janosh commented Feb 1, 2025

wonderful! thanks a lot @atztogo 👍

i don't have a windows machine to test but the wheels work for me on macOS and Linux:

pip install -U phono3py
python -c 'import phono3py; print(phono3py.__version__)'
>>> 3.12.2

@janosh janosh closed this as completed Feb 1, 2025
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 a pull request may close this issue.

5 participants