You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by jo...@apache.org on 2022/06/07 11:56:22 UTC
[arrow] branch master updated: ARROW-16726: [Python] Fix Setuptools warnings about installing packages as data (#13309)
This is an automated email from the ASF dual-hosted git repository.
jorisvandenbossche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 5fae150493 ARROW-16726: [Python] Fix Setuptools warnings about installing packages as data (#13309)
5fae150493 is described below
commit 5fae15049367a30a7f4213c14c2238600e233212
Author: Raúl Cumplido <ra...@gmail.com>
AuthorDate: Tue Jun 7 13:56:13 2022 +0200
ARROW-16726: [Python] Fix Setuptools warnings about installing packages as data (#13309)
I have tested locally this change and the warning disappears on `archery docker run conda-python-docs` when using `find_namespace_packages` instead.
I have validated that the wheel generated is the same size locally before:
```
(pyarrow-dev) raulcd@drogon ~/code/arrow/python/dist (master) $ ls -laht
total 142M
-rw-rw-r-- 1 raulcd raulcd 142M jun 3 13:28 pyarrow-9.0.0.dev169+g5273c90.d20220603-cp310-cp310-linux_x86_64.whl
```
and after the change:
```
(pyarrow-dev) raulcd@drogon ~/code/arrow/python/dist (master) $ ls -laht
total 142M
-rw-rw-r-- 1 raulcd raulcd 142M jun 3 13:36 pyarrow-9.0.0.dev169+g5273c90.d20220603-cp310-cp310-linux_x86_64.whl
```
Authored-by: Raúl Cumplido <ra...@gmail.com>
Signed-off-by: Joris Van den Bossche <jo...@gmail.com>
---
python/setup.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/python/setup.py b/python/setup.py
index 79ec3c8447..2486a8959e 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -34,7 +34,7 @@ else:
from distutils import sysconfig
import pkg_resources
-from setuptools import setup, Extension, Distribution
+from setuptools import setup, Extension, Distribution, find_namespace_packages
from Cython.Distutils import build_ext as _build_ext
import Cython
@@ -613,9 +613,10 @@ else:
if strtobool(os.environ.get('PYARROW_INSTALL_TESTS', '1')):
- packages = ['pyarrow', 'pyarrow.tests']
+ packages = find_namespace_packages(include=['pyarrow*'])
else:
- packages = ['pyarrow']
+ packages = find_namespace_packages(include=['pyarrow*'],
+ exclude=["pyarrow.tests*"])
setup(