cloudera/cloudera-airflow-plugins

Can't install pathlib required dependency

Closed this issue · 5 comments

Hello,

I'm having trouble installing pathlib dependency since the 24th of February 2022.
I'm using python 3.8, pip version 20.2.4, setuptools 60.9.3 and wheel 0.37.1.

The error that I have is :

ERROR: Command errored out with exit status 1:
command: /home/vsts/work/1/s/.tox/py38/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gdfmd4bj/pathlib/setup.py'"'"'; file='"'"'/tmp/pip-install-gdfmd4bj/pathlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-mnmahwn7
cwd: /tmp/pip-install-gdfmd4bj/pathlib/
Complete output (19 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-gdfmd4bj/pathlib/setup.py", line 6, in
setup(
File "/home/vsts/work/1/s/.tox/py38/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 109, in setup
_setup_distribution = dist = klass(attrs)
File "/home/vsts/work/1/s/.tox/py38/lib/python3.8/site-packages/setuptools/dist.py", line 456, in init
for ep in metadata.entry_points(group='distutils.setup_keywords'):
File "/home/vsts/work/1/s/.tox/py38/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/init.py", line 999, in entry_points
return SelectableGroups.load(eps).select(**params)
File "/home/vsts/work/1/s/.tox/py38/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/init.py", line 449, in load
ordered = sorted(eps, key=by_group)
File "/home/vsts/work/1/s/.tox/py38/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/init.py", line 997, in
dist.entry_points for dist in unique(distributions())
File "/home/vsts/work/1/s/.tox/py38/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/init.py", line 609, in entry_points
return EntryPoints._from_text_for(self.read_text('entry_points.txt'), self)
File "/home/vsts/work/1/s/.tox/py38/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/init.py", line 917, in read_text
return self._path.joinpath(filename).read_text(encoding='utf-8')
AttributeError: 'PosixPath' object has no attribute 'read_text'

Is seems pathlib is not installable anymore in my environment.
I got around the problem by manually installing all other dependencies excepting pathlib and installing pathlib2 to be able to use your cloudera-airflow-plugins.

Do you intent to switch to pathlib2 as it is being maintained and pathlib is not anymore ?

Thank you for your answer,

Regards,

Sami

Hello Sami,

Yes we intend to switch to pathlib2, it should be part of the next version of the plugin. Unfortunately I cannot give an ETA at the moment.

LvffY commented

@planoe-cloudera Any update on this issue ? It seems to have a PR that could fit our need here.

Hello, we are going to release a new version in the next couple of weeks which contains pathlib2

LvffY commented

@planoe-cloudera That's a great news ! 🎉🎉

Hello @LvffY version 1.0.2 is available in Pypi.org, it contains the pathlib2 library now