1. Lennart Regebro
  2. pyroma
Issue #5 resolved

Crashing when setup.py is not available.

karl dubost
created an issue

Thanks for pyroma. Pyroma is crashing when the essential file is not available instead of giving an helpful message saying something "Hey we are missing a setup.py for starting."

 pyroma myPythonProject/
------------------------------
Checking myPythonProject/
Traceback (most recent call last):
  File "/usr/local/bin/pyroma", line 9, in <module>
    load_entry_point('pyroma==1.2', 'console_scripts', 'pyroma')()
  File "/Library/Python/2.7/site-packages/pyroma/__init__.py", line 50, in main
    run(sys.argv[1])
  File "/Library/Python/2.7/site-packages/pyroma/__init__.py", line 19, in run
    data = projectdata.get_data(os.path.abspath(argument))
  File "/Library/Python/2.7/site-packages/pyroma/projectdata.py", line 96, in get_data
    import setup
ImportError: No module named setup

Comments (2)

  1. Lennart Regebro repo owner

    There's more possible reasons than a missing setup.py for that message. However, I now catch the message. It's now printed out, but pyroma continues, making a nicer experience.

    ------------------------------
    Checking /
    No module named setup
    Traceback (most recent call last):
      File "/home/projects/pyroma/pyroma/projectdata.py", line 103, in get_data
        import setup
    ImportError: No module named setup
    Found nothing
    ------------------------------
    I couldn't find any package data
    ------------------------------
    Final rating: 0/10
    This cheese seems to contain no dairy products
    ------------------------------
    
  2. Log in to comment