This is an automated email from the ASF dual-hosted git repository.

apitrou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 3420c0db2f GH-43532: [Python] Remove usage of deprecated pkg_resources 
in setup.py (#43602)
3420c0db2f is described below

commit 3420c0db2fe49d81bf3caf673e4e1302153a2c49
Author: Tai Le Manh <[email protected]>
AuthorDate: Thu Aug 8 16:37:00 2024 +0700

    GH-43532: [Python] Remove usage of deprecated pkg_resources in setup.py 
(#43602)
    
    
    
    ### Rationale for this change
    Closes #43532.
    
    ### What changes are included in this PR?
    Remove deprecated `pkg_resources.resource_filename('numpy', 
'core/include')`, replace with `numpy.get_include()`
    
    ### Are these changes tested?
    Test by CI.
    
    ### Are there any user-facing changes?
    No
    
    * GitHub Issue: #43532
    
    Authored-by: Tai Le Manh <[email protected]>
    Signed-off-by: Antoine Pitrou <[email protected]>
---
 python/setup.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/python/setup.py b/python/setup.py
index 2cef1c2d31..d3ef3a0914 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -32,7 +32,6 @@ else:
     # Get correct EXT_SUFFIX on Windows (https://bugs.python.org/issue39825)
     from distutils import sysconfig
 
-import pkg_resources
 from setuptools import setup, Extension, Distribution, find_namespace_packages
 
 from Cython.Distutils import build_ext as _build_ext
@@ -106,7 +105,8 @@ class build_ext(_build_ext):
     _found_names = ()
 
     def build_extensions(self):
-        numpy_incl = pkg_resources.resource_filename('numpy', 'core/include')
+        import numpy
+        numpy_incl = numpy.get_include()
 
         self.extensions = [ext for ext in self.extensions
                            if ext.name != '__dummy__']

Reply via email to