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

ASF subversion and git services commented on IMPALA-11892:
----------------------------------------------------------

Commit eca34cc9817397f0d6935b72d37974fafda85426 in impala's branch 
refs/heads/master from Michael Smith
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=eca34cc98 ]

IMPALA-11892: Restore pkg_resources with Python 2

Impala's shell tarball used to include a copy of pkg_resources.py (from
setuptools); due to the Python version we use for packaging, all modules
with native libraries use pkg_resources to load the library. It was
removed in IMPALA-9718 because Impala's copy of pkg_resources didn't
work with Python 3.

Some platforms - RHEL 7 for Python 2, Ubuntu/Debian - don't install
setuptools by default as part of the python package, which causes
impala-shell to error with "ImportError: No module named pkg_resources".

Restores Impala's copy of pkg_resources.py to PYTHONPATH when running
impala-shell under Python 2. Omits it for Python 3 so we use updated
setuptools when available. python-setuptools will still be a manual
requirement with Python 3.

Testing
- manually confirmed impala-shell starts in Ubuntu 20.04 docker
  container after 'apt install python' (omits setuptools).
- manually confirmed impala-shell starts in Ubuntu 20.04 docker
  container after 'apt install python3-setuptools' (includes python).

Change-Id: I78c05bce75ecc68de2296b1c2e57cd3c17c3cb0a
Reviewed-on: http://gerrit.cloudera.org:8080/19467
Reviewed-by: Joe McDonnell <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> impala-shell tarball with Python 2 now requires setuptools
> ----------------------------------------------------------
>
>                 Key: IMPALA-11892
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11892
>             Project: IMPALA
>          Issue Type: Bug
>    Affects Versions: Impala 4.2.0
>            Reporter: Michael Smith
>            Assignee: Michael Smith
>            Priority: Major
>             Fix For: Impala 4.3.0
>
>
> IMPALA-9718 removed pkg_resources as it wasn't compatible with Python 3. 
> However the pkg_resources class from setuptools is still required, so this 
> caused an ease-of-use regression for the shell tarball as it now has an 
> external dependency on setuptools.
> Restore pkg_resources to the shell tarball only when using Python 2.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to