Bug#1057612: python-scrapy: FTBFS: failing tests

2023-12-09 Thread Andrey Rakhmatullin
On Tue, Dec 05, 2023 at 11:10:28PM +0100, Santiago Vila wrote:
> scrapy/http/request/form.py:11: in 
> from lxml.html import (
> /usr/lib/python3/dist-packages/lxml/html/__init__.py:53: in 
> from .. import etree
> E   ImportError: cannot import name 'etree' from 'lxml' 
> (/usr/lib/python3/dist-packages/lxml/__init__.py)
This just needs a lxml rebuild, right?



Bug#1057612: python-scrapy: FTBFS: failing tests

2023-12-05 Thread Santiago Vila

Package: src:python-scrapy
Version: 2.11.0-1
Severity: serious
Tags: ftbfs

Dear maintainer:

During a rebuild of all packages in unstable, your package failed to build:


[...]
 debian/rules binary
dh binary --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
I: pybuild base:310: python3.12 setup.py config
running config
I: pybuild base:310: python3.11 setup.py config
running config
   dh_auto_build -O--buildsystem=pybuild
I: pybuild base:310: /usr/bin/python3.12 setup.py build
running build
running build_py
creating /<>/.pybuild/cpython3_3.12_scrapy/build/scrapy

[... snipped ...]


- https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

If you don't want 'scrapy.templates.project' to be distributed and are
already explicitly excluding 'scrapy.templates.project' via
`find_namespace_packages(...)/find_namespace` or 
`find_packages(...)/find`,
you can try to use `exclude_package_data`, or 
`include-package-data=False` in
combination with a more fine grained `package-data` configuration.

You can read more about "package data files" on setuptools 
documentation page:

- https://setuptools.pypa.io/en/latest/userguide/datafiles.html


[^1]: For Python, any directory (with suitable naming) can be imported,
  even if it does not contain any `.py` files.
  On the other hand, currently there is no concept of package data
  directory, all directories are treated like packages.



!!
  check.warn(importable)
/usr/lib/python3/dist-packages/setuptools/command/build_py.py:204: _Warning: 
Package 'scrapy.templates.project.module' is absent from the `packages` 
configuration.
!!




# Package would be ignored #

Python recognizes 'scrapy.templates.project.module' as an importable 
package[^1],
but it is absent from setuptools' `packages` configuration.

This leads to an ambiguous overall configuration. If you want to 
distribute this
package, please make sure that 'scrapy.templates.project.module' is 
explicitly added
to the `packages` configuration field.

Alternatively, you can also rely on setuptools' discovery methods
(for example by using `find_namespace_packages(...)`/`find_namespace:`
instead of `find_packages(...)`/`find:`).

You can read more about "package discovery" on setuptools documentation 
page:

- https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

If you don't want 'scrapy.templates.project.module' to be distributed 
and are
already explicitly excluding 'scrapy.templates.project.module' via
`find_namespace_packages(...)/find_namespace` or 
`find_packages(...)/find`,
you can try to use `exclude_package_data`, or 
`include-package-data=False` in
combination with a more fine grained `package-data` configuration.

You can read more about "package data files" on setuptools 
documentation page:

- https://setuptools.pypa.io/en/latest/userguide/datafiles.html


[^1]: For Python, any directory (with suitable naming) can be imported,
  even if it does not contain any `.py` files.
  On the other hand, currently there is no concept of package data
  directory, all directories are treated like packages.



!!
  check.warn(importable)
/usr/lib/python3/dist-packages/setuptools/command/build_py.py:204: _Warning: 
Package 'scrapy.templates.project.module.spiders' is absent from the `packages` 
configuration.
!!




# Package would be ignored #

Python recognizes 'scrapy.templates.project.module.spiders' as an 
importable package[^1],
but it is absent from setuptools' `packages` configuration.

This leads to an ambiguous overall configuration. If you want to 
distribute this
package, please make sure that 
'scrapy.templates.project.module.spiders' is explicitly added
to the `packages` configuration field.

Alternatively, you can also rely on setuptools' discovery methods
(for example by using `find_namespace_packages(...)`/`find_namespace:`
instead of `find_packages(...)`/`find:`).

You can read more about "package discovery" on setuptools