gristlabs / asttokens

Annotate Python AST trees with source text and token information
Apache License 2.0
172 stars 34 forks source link

Fixing issues in my PR. #52

Closed KOLANICH closed 4 years ago

dsagal commented 4 years ago

Thanks, but would you mind explaining these changes? Are the new setup_requires requirements actually necessary?

alexmojaki commented 4 years ago

Some background: I recently merged in a PR which makes asttokens a dependency of IPython (in git master at least) via stack_data. @KOLANICH saw the new dependencies and wanted to update how they're packaged. They've made similar PRs in my 3 packages which also became dependencies. You can maybe get answers to some of your questions in one of those PRs here.

KOLANICH commented 4 years ago

Are the new setup_requires requirements actually necessary?

Yes. "setuptools_scm[toml]>=3.4.3" is required because we use newly introduced support for pyproject.toml in it.

setuptools>=44 is needed because earlier versions won't use pyproject.toml, so setuptools_scm specified in it won't be called, so it won't generate the version file, so the lib will error on importing it. That's why we duplicate it into setup.cfg to make sure earlier versions can use this information and install and use the needed tools.

Of course we can use an older deprecated approach, but IMHO it makes no sense, it is not a problem to install new versions of setuptools and setuptools_scm.