home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 668790818

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/4295#issuecomment-668790818 https://api.github.com/repos/pydata/xarray/issues/4295 668790818 MDEyOklzc3VlQ29tbWVudDY2ODc5MDgxOA== 916576 2020-08-04T19:46:59Z 2020-08-04T19:46:59Z NONE

and when pyproject.toml was supported isn't even the point -- for whatever reason, it's still not very comon practice.

But when it comes to dependencies, setuptool is an odd one -- as it is used bioth to build teh pacakge and potentially at run time. I can rant about what a bad design that is, but it's a fact.

However, in the case of xarray, it seems to be used at runtime very sparingly:

(and then, only pkg_resources -- which really should be distributed by itself)

in init.py to get teh version number: __version__ = pkg_resources.get_distribution("xarray").version

I would argue that that is NOT a good way to manage your versioning, but certainly not the only way.

and in formatting_html.py

pkg_resources.resource_string("xarray", fname).decode("utf8")

I'm not sure I know what that actually does.

If it were me, I'd replace those and not have a setuptols run time dependency at all.

But in any case, unless pkg_resources has changed in recent years, you could probably have th run-time setuptools dependency be really old without problem.

That is separate from the install time dependency, which is really outside xarray anyway.

To summarize:

setuptools is used:

at built time: for that, xarray can use as recetn a version as you want.

at install time: this does overlap if folks are doing a source install -- but xarray has wheels up on pypi (and conda is pre-built) IN that case, it's up to teh user / pip to have setuptools if needed. When installing a wheel, I"m not sure setuptools is used at all, but in any case, pip does require it.

At run time: here is where the dependency matters: if I were you I"d get rid of the run time dependency, but if not, an old version should be fine here.

Looking at the setup,cfg file, I see:

install_requires = numpy >= 1.15 pandas >= 0.25 setuptools >= 41.2 # For pkg_resources setup_requires = setuptools >= 41.2 setuptools_scm note that you don't have to have the same version in both of these stanzas -- I think if you push the install_requires version back, you'll solve this problem without having to worry about building with old versions.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  671019427
Powered by Datasette · Queries took 2.248ms · About: xarray-datasette