rueckstiess / mtools

A collection of scripts to set up MongoDB test environments and parse and visualize MongoDB log files.
Apache License 2.0
1.89k stars 404 forks source link

Installation using source failed #834

Closed virajut closed 3 years ago

virajut commented 3 years ago

I was trying to install mtools from source. I've cloned the repository, I was on develop and have tested it with Python3.6 and Python 3.9. While running python setup.py install it throws an error

Traceback (most recent call last): File "setup.py", line 39, in kws = {'install_requires': install_requires} NameError: name 'install_requires' is not defined

I can see that there is no initialisation of that list which would be causing above error.

Because of this error, Installation using source code is getting failed.

I've resolved this in my local but would love to hear an opinion on which option to go with.

I've currently initialised an empty list for install_requires and have created pull request with the same.

Expected behavior

By running python setup.py install, it should install mtools package without errors considering all the dependencies / required packages have been installed by running pip install -r requirements.txt in very previous step.

This behavior is specifically on develop branch.

Actual/current behavior

Having source code of develop branch, By running python setup.py install right after installing all the required dependencies (pip install -r requirements.txt), it fails with below error.

Traceback (most recent call last): File "setup.py", line 39, in kws = {'install_requires': install_requires} NameError: name 'install_requires' is not defined

Steps to reproduce the actual/current behavior

  1. Clone the repository
  2. Create virtualenv or conda environment with python 3.6 or python3.9
  3. Install all the required dependencies with pip install -r requirements.txt
  4. Run python setup.py install

Environment

Software Version
mtools *
Python 3.9, 3.6
MongoDB server *
Operating system Ubuntu 20.04
virajut commented 3 years ago

This issue is specifically on the develop branch. On the master, there is install_requires = ['six', 'python-dateutil>=2.7'] which is not causing any issues.

This is my very first contribution to this repo and not sure if this pull request is required separately for the develop branch or develop branch is not up to date yet with the changes from master.

Looking forward for suggestions / comments / improvements required.

stennie commented 3 years ago

Fixed via your PR #835, @virajut. Thanks!

Regards, Stennie