duo-labs / duo-labs/cloudtracker

“python_requires” should be set with “>=3”, as cloudtracker 2.1.5 is not compatible with all Python versions.

Open
#81 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
912
Forks
108
PR merge metrics
No merged PRs in 30d

Description

Currently, the keyword argument **python_requires** of **setup()** is not set, and thus it is assumed that this distribution is compatible with all Python versions.
However, I found it is not compatible with **Python2**. My local Python version is 2.7, and I encounter the following error when executing _“pip install cloudtracker”_

```
Collecting cloudtracker
Using cached cloudtracker-2.1.5.tar.gz (80 kB)
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wbT82F/cloudtracker/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wbT82F/cloudtracker/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-install-wbT82F/cloudtracker/pip-egg-info
cwd: /tmp/pip-install-wbT82F/cloudtracker/
Complete output (7 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-wbT82F/cloudtracker/setup.py", line 33, in
long_description=get_description(),
File "/tmp/pip-install-wbT82F/cloudtracker/setup.py", line 22, in get_description
return open(os.path.join(os.path.abspath(HERE), 'README.md'), encoding='utf-8').read()
TypeError: 'encoding' is an invalid keyword argument for this function
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
```

I found that **setup.py** used a Python3-specific keyword argument **encoding** for the function **open**, which lead to installation failure of cloudtracker in Python2.

Way to fix:
modify **setup()** in **setup.py,** add **python_requires** keyword argument:
```python
setup(…
python_requires='>=3',
…)
```
Thanks for your attention.
Best regrads,
PyVCEchecker

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.