-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[MNT]: wheel of 3.5.0 apears to depend on setuptools-scm which apears to be unintentional #21783
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
Comments
I second this. setuptools-scm being installed on your system will affect other packages being built. The check that .git directory exists to decide on the pull in as an install requirement is wrong. Either setup.py needs to be changed - our when building packages in your CI - you must remove the .git directory. |
I am sold on the wheels not depending on setuptools-scm as a matter of principle, but if it being installed or not is breaking other packages for you @epeisach my knee-jerk reaction is that there are bugs in the other packages! |
setuptools_scm should only ever be a dependency of building the wheels, not runtime. @tacaswell I think this is a little suspect: Lines 315 to 328 in d536acf
Do you remember why that |
Because we have matplotlib/lib/matplotlib/__init__.py Lines 167 to 174 in d536acf
__init__.py to make the version auto-track in source installs (like we used to have with versioneer).
|
In MetPy I chose to go with: try:
from setuptools_scm import get_version
return get_version(root='../..', relative_to=__file__,
version_scheme='post-release')
except (ImportError, LookupError):
try:
from importlib.metadata import PackageNotFoundError, version
except ImportError: # Can remove when we require Python > 3.7
from importlib_metadata import PackageNotFoundError, version
try:
return version(__package__)
except PackageNotFoundError:
return 'Unknown' and avoid polluting |
I suggest we do that for 3.6.0, and do the minimal patching in the above PR for 3.5.1. |
I still have setuptools-scm as a dep of matplotlib 3.8.0 in my lock file. Can you help me debug please? I see that it's in the |
Summary
matplotlib does pull in setuptools as a runtime dependency.
if setuptools is installed it uses the pkg_resources to look for resources.
Is this on purpose? The code in the setup.py apears to me to mean that the dependency should not be a dependency for production packages, or am i wrong?
I would like to get rid of this dependency.
Proposed fix
If possible the nicest solution would be to just drop the dependency.
I am unsure if there is really a use case for setuptools_scm at runtime (as opposed to setup time).
Thansk for the great work!
The text was updated successfully, but these errors were encountered: