Fix version incompatibilities of py-pandas and py-openpyxl#40472
Fix version incompatibilities of py-pandas and py-openpyxl#40472adamjstewart merged 13 commits intospack:developfrom
Conversation
adamjstewart
left a comment
There was a problem hiding this comment.
openpyxl isn't a required dep of pandas. You could add an +excel variant that installs the 5 other deps needed, or you could just allow the user to install it afterwards.
We need to make sure that openpyxl is recent enough, whichever way gets us there and is the easiest. Happy to create a excel variant if you think this is the easiest solution. |
|
I think a variant that defaults to False is the appropriate way. |
Done, please check. Thanks! |
|
@spackbot fix style |
|
Let me see if I can fix that for you! |
|
I was able to run spack style --fix==> Running style checks on spack
selected: isort, black, flake8, mypy
==> Modified files
var/spack/repos/builtin/packages/py-odfpy/package.py
var/spack/repos/builtin/packages/py-pandas/package.py
var/spack/repos/builtin/packages/py-pyxlsb/package.py
var/spack/repos/builtin/packages/py-xlsxwriter/package.py
==> Running isort checks
isort checks were clean
==> Running black checks
All done! ✨ 🍰 ✨
4 files left unchanged.
black checks were clean
==> Running flake8 checks
flake8 checks were clean
==> Running mypy checks
Success: no issues found in 588 source files
mypy checks were clean
==> spack style checks were clean
I wasn't able to make any further changes, but please see the message above for remaining issues you can fix locally! |
* Fix version incompatibilities of py-pandas and py-openpyxl * Add variant excel for py-pandas * Add package py-pyxlsb * Add versios for py-xlsxwriter * Define excel dependencies for py-pandas 1.4, 1.5, 2.0, 2.1 * Fix variant excel in py-pandas * Add package py-odfpy, which is also a dependency for [email protected]: * Rearrange excel dependencies for py-pandas * Change url to pypi * Add missing newline to fix style in py-odfpy
* Fix version incompatibilities of py-pandas and py-openpyxl * Add variant excel for py-pandas * Add package py-pyxlsb * Add versios for py-xlsxwriter * Define excel dependencies for py-pandas 1.4, 1.5, 2.0, 2.1 * Fix variant excel in py-pandas * Add package py-odfpy, which is also a dependency for [email protected]: * Rearrange excel dependencies for py-pandas * Change url to pypi * Add missing newline to fix style in py-odfpy
* Fix version incompatibilities of py-pandas and py-openpyxl * Add variant excel for py-pandas * Add package py-pyxlsb * Add versios for py-xlsxwriter * Define excel dependencies for py-pandas 1.4, 1.5, 2.0, 2.1 * Fix variant excel in py-pandas * Add package py-odfpy, which is also a dependency for [email protected]: * Rearrange excel dependencies for py-pandas * Change url to pypi * Add missing newline to fix style in py-odfpy
* Fix version incompatibilities of py-pandas and py-openpyxl * Add variant excel for py-pandas * Add package py-pyxlsb * Add versios for py-xlsxwriter * Define excel dependencies for py-pandas 1.4, 1.5, 2.0, 2.1 * Fix variant excel in py-pandas * Add package py-odfpy, which is also a dependency for [email protected]: * Rearrange excel dependencies for py-pandas * Change url to pypi * Add missing newline to fix style in py-odfpy
* Fix version incompatibilities of py-pandas and py-openpyxl * Add variant excel for py-pandas * Add package py-pyxlsb * Add versios for py-xlsxwriter * Define excel dependencies for py-pandas 1.4, 1.5, 2.0, 2.1 * Fix variant excel in py-pandas * Add package py-odfpy, which is also a dependency for [email protected]: * Rearrange excel dependencies for py-pandas * Change url to pypi * Add missing newline to fix style in py-odfpy
This PR fixes the issue reported in #40452.
To fix that, based on @adamjstewart's suggestions, I added an
excelvariant that adds five optional dependencies topy-pandas. I checked the pandas releases 1.4, 1.5, 2.0, 2.1 and defined those optional dependencies for Excel in the package. I defined the variantexcelonly for those versions ofpy-pandas, because it's likely a waste of my time to code this up for ancient versions. I checked the five dependencies, two didn't exist yet (py-pyxlsb,py-odfpy), which I added, and one needed additional versions to satisfy the requirements (py-xlsxwriter).I tested this for version 1.5.3 on my macOS, and it all installed fine.
Closes #40452