-
Notifications
You must be signed in to change notification settings - Fork 4
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
Reports missing dependency when setuptools version is in build-system #124
Comments
mauritsvanrees
added a commit
to plone/plone.app.event
that referenced
this issue
Sep 7, 2023
Otherwise the build command fails. See reinout/z3c.dependencychecker#124
mister-roboto
pushed a commit
to plone/buildout.coredev
that referenced
this issue
Sep 16, 2023
Branch: refs/heads/master Date: 2023-09-07T15:13:55+02:00 Author: Maurits van Rees (mauritsvanrees) <[email protected]> Commit: plone/plone.app.event@86c7756 Require setuptools 68.2 or higher for building the package. When built with setuptools 68.1, you could not import the package, at least not an editable package. Note that you can still *install* this package with older setuptools versions. See [Plone meta issue 172](plone/meta#172) for details. New problem though. `tox -e dependencies` says: ``` ERROR Missing dependencies: setuptools>=68.2 ``` I tried with `setuptools<68.1', which would also work, but that only changes the message: ``` ERROR Missing dependencies: setuptools<68.1 ``` I think this is a shortcoming in `z3c.dependencychecker`. It should not report this as a missing dependency. It should see that `pyproject.toml` has this dependency covered. We definitely should *not* require `setuptools>=68.2` in `install_requires`. Files changed: A news/172.internal M pyproject.toml Repository: plone.app.event Branch: refs/heads/master Date: 2023-09-07T15:47:33+02:00 Author: Maurits van Rees (mauritsvanrees) <[email protected]> Commit: plone/plone.app.event@ce6b5c3 tox -e dependencies: we do want isolation when building the package. Otherwise the build command fails. See reinout/z3c.dependencychecker#124 Files changed: M tox.ini Repository: plone.app.event Branch: refs/heads/master Date: 2023-09-07T15:53:11+02:00 Author: Maurits van Rees (mauritsvanrees) <[email protected]> Commit: plone/plone.app.event@ff5c13e tox: need to build with isolation in check-release env as well. Files changed: M tox.ini Repository: plone.app.event Branch: refs/heads/master Date: 2023-09-16T12:13:25+02:00 Author: Maurits van Rees (mauritsvanrees) <[email protected]> Commit: plone/plone.app.event@e040c0e Merge pull request #385 from plone/maurits-minimum-setuptools-version-for-build Require setuptools 68.2 or higher for building the package. Files changed: A news/172.internal M pyproject.toml M tox.ini
mister-roboto
pushed a commit
to plone/buildout.coredev
that referenced
this issue
Sep 16, 2023
Branch: refs/heads/master Date: 2023-09-07T15:13:55+02:00 Author: Maurits van Rees (mauritsvanrees) <[email protected]> Commit: plone/plone.app.event@86c7756 Require setuptools 68.2 or higher for building the package. When built with setuptools 68.1, you could not import the package, at least not an editable package. Note that you can still *install* this package with older setuptools versions. See [Plone meta issue 172](plone/meta#172) for details. New problem though. `tox -e dependencies` says: ``` ERROR Missing dependencies: setuptools>=68.2 ``` I tried with `setuptools<68.1', which would also work, but that only changes the message: ``` ERROR Missing dependencies: setuptools<68.1 ``` I think this is a shortcoming in `z3c.dependencychecker`. It should not report this as a missing dependency. It should see that `pyproject.toml` has this dependency covered. We definitely should *not* require `setuptools>=68.2` in `install_requires`. Files changed: A news/172.internal M pyproject.toml Repository: plone.app.event Branch: refs/heads/master Date: 2023-09-07T15:47:33+02:00 Author: Maurits van Rees (mauritsvanrees) <[email protected]> Commit: plone/plone.app.event@ce6b5c3 tox -e dependencies: we do want isolation when building the package. Otherwise the build command fails. See reinout/z3c.dependencychecker#124 Files changed: M tox.ini Repository: plone.app.event Branch: refs/heads/master Date: 2023-09-07T15:53:11+02:00 Author: Maurits van Rees (mauritsvanrees) <[email protected]> Commit: plone/plone.app.event@ff5c13e tox: need to build with isolation in check-release env as well. Files changed: M tox.ini Repository: plone.app.event Branch: refs/heads/master Date: 2023-09-16T12:13:25+02:00 Author: Maurits van Rees (mauritsvanrees) <[email protected]> Commit: plone/plone.app.event@e040c0e Merge pull request #385 from plone/maurits-minimum-setuptools-version-for-build Require setuptools 68.2 or higher for building the package. Files changed: A news/172.internal M pyproject.toml M tox.ini
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was typing this issue report, but halfway through realised it was not actually a problem with
z3c.dependencychecker
. Let me file the report anyway, in case others fall into the same trap, and then close it immediately.In
pyproject.toml
you can specify a build system, so that modern packaging techniques and agreements are used:dependencychecker
has no problem with this.But when you require a minimum version (or a maximum, or an explicit version) like this:
then
dependencychecker
gives an error:setuptools
itself is already ininstall_requires
.Hey, I wonder if it somehow sees the full string
setuptools>=68.2
as package name.When a dependency in
install_requires
has a minimum version, this goes fine though.See this PR: plone/plone.app.event#385
And this background issue where setuptools 68.1.* is not working for
plone.app.*
namespace packages: plone/meta#172Hang on, who is actually printing "Missing dependencies"? Because in the dependencychecker code I only see "Missing requirements".
Aha,
tox -e dependencies
is defined this way:And it already fails on the first command, the
python -m build
.And this now fails due to the
--no-isolation
option, because the tox env does not have the required setuptools version...When I remove this option, everything works again. And to avoid false positives: when I remove a requirement from
setup.py
, we do get a "Missing requirements" error.Looks like we should remove the option in our setup. But need to check if we had a good reason for this.
Anyway, I will close this short-lived bug report now. :-)
The text was updated successfully, but these errors were encountered: