jssimporter / python-jss

python-jss is deprecated. Please see the wiki for alternatives.
GNU General Public License v3.0
102 stars 41 forks source link

importing __version__ from jss prevents pip install from working with pre-installing requirements #100

Open pboushy opened 4 years ago

pboushy commented 4 years ago

If you try to install python-jss from source using pip install, you get several errors that you need to install six, requests, etc.

pip is capable of installing these dependencies for python-jss, but can't because setup.py is trying to import jss and failing on the dependencies (chicken and the egg scenario)

There are multiple ways to solve this:

  1. set the version in setup.py
  2. Choose one of the methods for single-sourcing-the-version listed https://packaging.python.org/guides/single-sourcing-package-version/#single-sourcing-the-version

By doing this it will simplify the installation of python-jss.

After some discussion on this, I'm glad to submit a pull request for the change.

Personally, since the version isn't used anywhere except setup.py currently, I'd recommend we set it statically in setup.py, and can revisit that in the future.