Skip to content

Fix setuptools_scm configuration#279

Merged
seifertm merged 2 commits intomasterfrom
fix-setuptools_scm
Feb 3, 2022
Merged

Fix setuptools_scm configuration#279
seifertm merged 2 commits intomasterfrom
fix-setuptools_scm

Conversation

@asvetlov
Copy link
Copy Markdown
Contributor

pyproject.toml should use setuptools_scm[toml] dependency.
In turn, bare setuptools_scm should be dropped from setup.cfg setup_requires section.

@webknjaz suggested the change for another aio-libs project.

@asvetlov
Copy link
Copy Markdown
Contributor Author

Interesting, tests are failed.
@webknjaz could you please take a look at what is wrong with the PR?
Should setup_requires = setuptools_scm>=6.2 be used for the project?

@seifertm
Copy link
Copy Markdown
Contributor

We encountered the same issue in the PR where we integrated setuptools_scm. I had a theory why this is happening, but I'm not 100% sure. Cross-reference: #37 (comment)

@webknjaz
Copy link
Copy Markdown
Member

Should setup_requires = setuptools_scm>=6.2 be used for the project?

This shouldn't be necessary. I can't check right now but my immediate guess would be to check pip/setuptools versions. I'll try to get back to this once I can look at it from my laptop.

@webknjaz
Copy link
Copy Markdown
Member

webknjaz commented Jan 29, 2022

Oh, I see what's happening:

ERROR: FAIL could not package project - v = InvocationError('/opt/hostedtoolcache/Python/3.7.12/x64/bin/python setup.py sdist --formats=zip --dist-dir /home/runner/work/pytest-asyncio/pytest-asyncio/.tox/dist', 1)

Tox invokes setup.py directly and PEP517 is never used. Enable build isolation to fix this.

This fixes an issue that forced us to add setuptools_scm to setup.cfg, instead of specifying the dependency just once in pyproject.toml.
See discussion #279

Signed-off-by: Michael Seifert <[email protected]>
@seifertm
Copy link
Copy Markdown
Contributor

seifertm commented Feb 3, 2022

Thanks @webknjaz, good find! Enabling build isolation did the trick: The dependency on setuptools_scm in pyproject.toml is now recognized correctly.

@seifertm seifertm merged commit e78b59d into master Feb 3, 2022
@seifertm seifertm deleted the fix-setuptools_scm branch February 3, 2022 15:07
@seifertm
Copy link
Copy Markdown
Contributor

seifertm commented Feb 3, 2022

@asvetlov I hope you don't mind I took this PR over :)

@webknjaz
Copy link
Copy Markdown
Member

webknjaz commented Feb 3, 2022

good find!

It would've been discovered earlier if setup.py was deleted (which I recommend — there's no legitimate reason for keeping it anymore).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants