-
-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
python311Packages.shapely: 2.0.1 → 2.0.2 #263989
Conversation
@@ -45,7 +45,10 @@ buildPythonPackage rec { | |||
]; | |||
|
|||
preCheck = '' | |||
rm -r shapely # prevent import of local shapely |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ugly but without it, test collection fails because it will try to load shapely from the project directory:
============================= test session starts ==============================
platform linux -- Python 3.11.5, pytest-7.4.2, pluggy-1.2.0
rootdir: /build/shapely-2.0.2
configfile: setup.cfg
collected 0 items / 1 error
==================================== ERRORS ====================================
________________________ ERROR collecting test session _________________________
/nix/store/lhjsx27ijd31l8qgxkv5rv1z0c3hs7pn-python3.11-pytest-7.4.2/lib/python3.11/site-packages/_pytest/config/__init__.py:641: in _importconftest
mod = import_path(conftestpath, mode=importmode, root=rootpath)
/nix/store/lhjsx27ijd31l8qgxkv5rv1z0c3hs7pn-python3.11-pytest-7.4.2/lib/python3.11/site-packages/_pytest/pathlib.py:567: in import_path
importlib.import_module(module_name)
/nix/store/ffll6glz3gwx342z0ch8wx30p5cnqz1z-python3-3.11.5/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1204: in _gcd_import
???
<frozen importlib._bootstrap>:1176: in _find_and_load
???
<frozen importlib._bootstrap>:1126: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:241: in _call_with_frames_removed
???
<frozen importlib._bootstrap>:1204: in _gcd_import
???
<frozen importlib._bootstrap>:1176: in _find_and_load
???
<frozen importlib._bootstrap>:1126: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:241: in _call_with_frames_removed
???
<frozen importlib._bootstrap>:1204: in _gcd_import
???
<frozen importlib._bootstrap>:1176: in _find_and_load
???
<frozen importlib._bootstrap>:1126: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:241: in _call_with_frames_removed
???
<frozen importlib._bootstrap>:1204: in _gcd_import
???
<frozen importlib._bootstrap>:1176: in _find_and_load
???
<frozen importlib._bootstrap>:1147: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:690: in _load_unlocked
???
<frozen importlib._bootstrap_external>:940: in exec_module
???
<frozen importlib._bootstrap>:241: in _call_with_frames_removed
???
shapely/__init__.py:1: in <module>
from shapely.lib import GEOSException # NOQA
E ModuleNotFoundError: No module named 'shapely.lib'
=========================== short test summary info ============================
ERROR - ModuleNotFoundError: No module named 'shapely.lib'
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.08s ===============================
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is related to this issue, #255262.
Changing the current directory is one of the workarounds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that cd $out
works but decided against it because then it would run tests installed to $out
and I am not sure all tests are installed (and if they should be).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the main investigator of #255262, I personally prefer cd $out
- if we suspect upstream doesn't install all tests, perhaps we can check that by listing what gets installed in the package vs what's in the source? I doubt upstream won't install either all of none.
In any case, a link to #255262 near the workaround (which ever you'd eventually choose) would be great.
@ofborg build python311Packages.shapely |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Version bump and tests workaround looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the main investigator of #255262, I personally prefer
cd $out
- if we suspect upstream doesn't install all tests, perhaps we can check that by listing what gets installed in the package vs what's in the source? I doubt upstream won't install either all of none.In any case, a link to #255262 near the workaround (which ever you'd eventually choose) would be great.
I prefer cd $out
as well. Current cp
workaround might in theory prevent losing some test, but I wouldn't go this way until we know that this can happen.
https://github.com/shapely/shapely/releases/tag/2.0.2 The tests were moved to shapely/ directory so we cannot just remove it.
Since more people expressed their support for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good.
Description of changes
https://github.com/shapely/shapely/releases/tag/2.0.2
The tests were moved to shapely/ directory so we cannot just remove it.
Blocks geos bump: #240229
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)