jwodder / javaproperties

Python library for reading & writing Java .properties files
MIT License
30 stars 10 forks source link

six should be listed as dependeny in setup.py or requirements.txt #4

Closed knobix closed 5 years ago

knobix commented 5 years ago

OS: FreeBSD 11.2-RELEASE-p9 amd64/i386 (applies also for 12.0-RELEASE-p3) Python version: 2.7.16 (applies also for 3.6.8) javaproperties version: 0.5.1

The Python package is created in a pristine environment that has only the Python runtime and the Package "setuptools" as a basic dependency set.

When importing "javaproperties" it fails with

>>> import javaproperties Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/site-packages/javaproperties/__init__.py", line 15, in <module> from .propclass import Properties File "/usr/local/lib/python2.7/site-packages/javaproperties/propclass.py", line 2, in <module> from six import PY2, string_types ImportError: No module named six

By installing the six package the importing of "javaproperties" gives no more errors then.

jwodder commented 5 years ago

First of all, as indicated by the installation instructions in the README, javaproperties only supports installation with pip install javaproperties, not (as I assume you're doing) python setup.py install, so if the latter fails but the former does not, I'm not going to bother fixing it.

Secondly, six is declared as a dependency in setup.cfg, which is a valid location for such information since setuptools v30.3.0. Your setuptools appears to be out-of-date; if this is not the case, please reply with the exact installation command you ran and its output.

knobix commented 5 years ago

Indeed, you're right. I somehow missed the last lines of the setup.cfg because I found the declaration of dependencies mostly in setup.py or requirements.txt.

Sorry for the noise!