[ 
https://issues.apache.org/jira/browse/ARROW-17389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17580722#comment-17580722
 ] 

Miles Granger commented on ARROW-17389:
---------------------------------------

It appears to me, setuptools is trying to do us a "favor" and adds back the 
test packages even though they are passed to exclude. This one of the warnings 
I get when debugging excluding the test from wheels or otherwise. Even 
explicitly providing packages in List[str], will result in this behavior.

   ~############################~
    ~# Package would be ignored #~
    ~############################~
    ~Python recognizes 'pyarrow.tests.parquet' as an importable package,~
    ~but it is not listed in the `packages` configuration of setuptools.~

    ~'pyarrow.tests.parquet' has been automatically added to the distribution 
only~
    ~because it may contain data files, but this behavior is likely to change~
    ~in future versions of setuptools (and therefore is considered deprecated).~

    ~Please make sure that 'pyarrow.tests.parquet' is included as a package by 
using~
    ~the `packages` configuration field or the proper discovery methods~
    ~(for example by using `find_namespace_packages(...)`/`find_namespace:`~
    ~instead of `find_packages(...)`/`find:`).~

    ~You can read more about "package discovery" and "data files" on setuptools~
    ~documentation page.~

[~jorisvandenbossche] is it worth while to either open an issue in setuptools 
or could we move the tests out of the parquet folder into the parent?

> [Python] In pyarrow, conftest is installed even when tests are not
> ------------------------------------------------------------------
>
>                 Key: ARROW-17389
>                 URL: https://issues.apache.org/jira/browse/ARROW-17389
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>            Reporter: Benjamin Beasley
>            Priority: Trivial
>
> When PYARROW_INSTALL_TESTS is set to 0, the packages keyword to 
> setuptools.setup is:
> {{find_namespace_packages(include=['pyarrow*'], exclude=["pyarrow.tests*"])}}
> Since pyarrow.conftest is associated with the tests, I think it should be 
> added to the list of modules to exclude in this case, i.e.,
> {{find_namespace_packages(include=['pyarrow*'], exclude=["pyarrow.tests*", 
> "pyarrow.conftest"])}}
> (As a separate issue, it doesn’t seem like any of these excludes is having 
> any effect for me anyway, as I find the tests are still included in wheels no 
> matter what.)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to