diff mbox series

[1/1] package/python-remi: fix pep517 build

Message ID 20240407115439.872167-1-fontaine.fabrice@gmail.com
State New
Headers show
Series [1/1] package/python-remi: fix pep517 build | expand

Commit Message

Fabrice Fontaine April 7, 2024, 11:54 a.m. UTC
Fix the following build failure raised since commit
8937db8dd595e0988751e5dbb568e870b07b39cc:

  File "/home/buildroot/autobuild/run/instance-0/output-1/host/lib/python3.11/site-packages/setuptools/build_meta.py", line 76, in fetch_build_eggs
    raise SetupRequirementsError(specifier_list)
setuptools.build_meta.SetupRequirementsError: ['setuptools_scm']

Fixes: 8937db8dd595e0988751e5dbb568e870b07b39cc
 - http://autobuild.buildroot.org/results/59ff2895baa49260fb83bc375993907144b945af

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/python-remi/python-remi.mk | 1 +
 1 file changed, 1 insertion(+)

Comments

Arnout Vandecappelle April 7, 2024, 7:33 p.m. UTC | #1
On 07/04/2024 13:54, Fabrice Fontaine wrote:
> Fix the following build failure raised since commit
> 8937db8dd595e0988751e5dbb568e870b07b39cc:
> 
>    File "/home/buildroot/autobuild/run/instance-0/output-1/host/lib/python3.11/site-packages/setuptools/build_meta.py", line 76, in fetch_build_eggs
>      raise SetupRequirementsError(specifier_list)
> setuptools.build_meta.SetupRequirementsError: ['setuptools_scm']

  If the package _does_ build without setuptools_scm, it means that the 
setup.cfg is wrong. So an upstream patch to fix that would be better..

  Regards,
  Arnout

> 
> Fixes: 8937db8dd595e0988751e5dbb568e870b07b39cc
>   - http://autobuild.buildroot.org/results/59ff2895baa49260fb83bc375993907144b945af
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>   package/python-remi/python-remi.mk | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/package/python-remi/python-remi.mk b/package/python-remi/python-remi.mk
> index 419a3441a7..ec1649f8a4 100644
> --- a/package/python-remi/python-remi.mk
> +++ b/package/python-remi/python-remi.mk
> @@ -11,5 +11,6 @@ PYTHON_REMI_SITE = https://files.pythonhosted.org/packages/b7/5c/fca9d9273fc9d5f
>   PYTHON_REMI_LICENSE = Apache-2.0
>   PYTHON_REMI_LICENSE_FILES = LICENSE
>   PYTHON_REMI_SETUP_TYPE = setuptools
> +PYTHON_REMI_BUILD_OPTS = --skip-dependency-check
>   
>   $(eval $(python-package))
Fabrice Fontaine April 7, 2024, 7:58 p.m. UTC | #2
Hello,

Le dim. 7 avr. 2024 à 21:33, Arnout Vandecappelle <arnout@mind.be> a écrit :
>
>
>
> On 07/04/2024 13:54, Fabrice Fontaine wrote:
> > Fix the following build failure raised since commit
> > 8937db8dd595e0988751e5dbb568e870b07b39cc:
> >
> >    File "/home/buildroot/autobuild/run/instance-0/output-1/host/lib/python3.11/site-packages/setuptools/build_meta.py", line 76, in fetch_build_eggs
> >      raise SetupRequirementsError(specifier_list)
> > setuptools.build_meta.SetupRequirementsError: ['setuptools_scm']
>
>   If the package _does_ build without setuptools_scm, it means that the
> setup.cfg is wrong. So an upstream patch to fix that would be better..

From my understanding, upstream uses setuptools_scm to retrieve version since
https://github.com/rawpython/remi/pull/404/commits/f27630721d2bbcfbce515dc2e6be3167f6a06a34

So setuptools_scm is not "strictly" needed.

I used --skip-dependency-check because it is already done in 6 other
packages since commit 8937db8dd595e0988751e5dbb568e870b07b39cc


>
>   Regards,
>   Arnout
>
> >
> > Fixes: 8937db8dd595e0988751e5dbb568e870b07b39cc
> >   - http://autobuild.buildroot.org/results/59ff2895baa49260fb83bc375993907144b945af
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >   package/python-remi/python-remi.mk | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/package/python-remi/python-remi.mk b/package/python-remi/python-remi.mk
> > index 419a3441a7..ec1649f8a4 100644
> > --- a/package/python-remi/python-remi.mk
> > +++ b/package/python-remi/python-remi.mk
> > @@ -11,5 +11,6 @@ PYTHON_REMI_SITE = https://files.pythonhosted.org/packages/b7/5c/fca9d9273fc9d5f
> >   PYTHON_REMI_LICENSE = Apache-2.0
> >   PYTHON_REMI_LICENSE_FILES = LICENSE
> >   PYTHON_REMI_SETUP_TYPE = setuptools
> > +PYTHON_REMI_BUILD_OPTS = --skip-dependency-check
> >
> >   $(eval $(python-package))

Best Regards,

Fabrice
Thomas Petazzoni May 9, 2024, 4:46 p.m. UTC | #3
Hello,

Would be good to get some input from Python experts here. James? Vincent?

On Sun, 7 Apr 2024 21:58:45 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> >   If the package _does_ build without setuptools_scm, it means that the
> > setup.cfg is wrong. So an upstream patch to fix that would be better..  
> 
> From my understanding, upstream uses setuptools_scm to retrieve version since
> https://github.com/rawpython/remi/pull/404/commits/f27630721d2bbcfbce515dc2e6be3167f6a06a34
> 
> So setuptools_scm is not "strictly" needed.
> 
> I used --skip-dependency-check because it is already done in 6 other
> packages since commit 8937db8dd595e0988751e5dbb568e870b07b39cc

But isn't it super crappy to skip the dependency checks? I mean the #1
issue that Buildroot tries to deal with are dependencies of packages.
So if we ask them to then skip their dependency checks, how will we
make sure that all necessary dependencies are installed?

I understand that setuptools_scm may not be strictly needed, but by
passing --skip-dependency-check, don't we also skip checking other
important/mandatory dependencies?

Thomas
Arnout Vandecappelle May 9, 2024, 8:54 p.m. UTC | #4
On 09/05/2024 18:46, Thomas Petazzoni wrote:
> Hello,
> 
> Would be good to get some input from Python experts here. James? Vincent?
> 
> On Sun, 7 Apr 2024 21:58:45 +0200
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> 
>>>    If the package _does_ build without setuptools_scm, it means that the
>>> setup.cfg is wrong. So an upstream patch to fix that would be better..
>>
>>  From my understanding, upstream uses setuptools_scm to retrieve version since
>> https://github.com/rawpython/remi/pull/404/commits/f27630721d2bbcfbce515dc2e6be3167f6a06a34
>>
>> So setuptools_scm is not "strictly" needed.
>>
>> I used --skip-dependency-check because it is already done in 6 other
>> packages since commit 8937db8dd595e0988751e5dbb568e870b07b39cc
> 
> But isn't it super crappy to skip the dependency checks? I mean the #1
> issue that Buildroot tries to deal with are dependencies of packages.
> So if we ask them to then skip their dependency checks, how will we
> make sure that all necessary dependencies are installed?
> 
> I understand that setuptools_scm may not be strictly needed, but by
> passing --skip-dependency-check, don't we also skip checking other
> important/mandatory dependencies?

  Theoretically I agree. However, IIUC, the dependencies that are checked are 
usually _runtime_ dependencies anyway, so we don't have it as an actual 
dependency. So I think the dependency checks are probably fairly useless for us.

  Ideally, there would be a way to do a dependency check on our runtime 
dependencies, but that can't possibly be done by anything upstream.

  Regards,
  Arnout
Thomas Petazzoni May 9, 2024, 9:14 p.m. UTC | #5
On Thu, 9 May 2024 22:54:34 +0200
Arnout Vandecappelle <arnout@mind.be> wrote:

>   Theoretically I agree. However, IIUC, the dependencies that are checked are 
> usually _runtime_ dependencies anyway, so we don't have it as an actual 
> dependency.

Well, we do select them. But I guess you mean that since they are not
guaranteed to be around at build time, there is no way to have a proper
dependency check?

If that's the case, then how are all the other packages that don't do
--skip-dependency-check achieving a successful build?

Thomas
James Hilliard May 9, 2024, 9:28 p.m. UTC | #6
On Thu, May 9, 2024 at 2:54 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
>
> On 09/05/2024 18:46, Thomas Petazzoni wrote:
> > Hello,
> >
> > Would be good to get some input from Python experts here. James? Vincent?
> >
> > On Sun, 7 Apr 2024 21:58:45 +0200
> > Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> >
> >>>    If the package _does_ build without setuptools_scm, it means that the
> >>> setup.cfg is wrong. So an upstream patch to fix that would be better..
> >>
> >>  From my understanding, upstream uses setuptools_scm to retrieve version since
> >> https://github.com/rawpython/remi/pull/404/commits/f27630721d2bbcfbce515dc2e6be3167f6a06a34
> >>
> >> So setuptools_scm is not "strictly" needed.
> >>
> >> I used --skip-dependency-check because it is already done in 6 other
> >> packages since commit 8937db8dd595e0988751e5dbb568e870b07b39cc
> >
> > But isn't it super crappy to skip the dependency checks? I mean the #1
> > issue that Buildroot tries to deal with are dependencies of packages.
> > So if we ask them to then skip their dependency checks, how will we
> > make sure that all necessary dependencies are installed?
> >
> > I understand that setuptools_scm may not be strictly needed, but by
> > passing --skip-dependency-check, don't we also skip checking other
> > important/mandatory dependencies?
>
>   Theoretically I agree. However, IIUC, the dependencies that are checked are
> usually _runtime_ dependencies anyway, so we don't have it as an actual
> dependency. So I think the dependency checks are probably fairly useless for us.

The pep517 infrastructure we use does not check runtime dependencies,
only build dependencies.

I think it's best to just add the host-python-setuptools-scm dependency in
this case. IMO we should not use --skip-dependency-check without a good
reason as this can result in python packages using non-ideal fallback
codepaths(i.e. packages may build without optimizations if certain build
dependencies are missing).

Note that scanpypi checks runtime dependencies but is probably not that
reliable at the moment.

>
>   Ideally, there would be a way to do a dependency check on our runtime
> dependencies, but that can't possibly be done by anything upstream.
>
>   Regards,
>   Arnout
diff mbox series

Patch

diff --git a/package/python-remi/python-remi.mk b/package/python-remi/python-remi.mk
index 419a3441a7..ec1649f8a4 100644
--- a/package/python-remi/python-remi.mk
+++ b/package/python-remi/python-remi.mk
@@ -11,5 +11,6 @@  PYTHON_REMI_SITE = https://files.pythonhosted.org/packages/b7/5c/fca9d9273fc9d5f
 PYTHON_REMI_LICENSE = Apache-2.0
 PYTHON_REMI_LICENSE_FILES = LICENSE
 PYTHON_REMI_SETUP_TYPE = setuptools
+PYTHON_REMI_BUILD_OPTS = --skip-dependency-check
 
 $(eval $(python-package))