svenkreiss / html5validator

Command line tool to validate HTML5 files. Great for continuous integration.
MIT License
314 stars 34 forks source link

Package is not zip_safe #62

Closed tchernobog closed 4 years ago

tchernobog commented 4 years ago

Hi, I am trying to use html5validator in my tests by listing it in my setup.py file.

    tests_require=[
        'pytest >=5.0',
        'pytest-cov',
        'behave >=1.2',
        'html5validator >=0.3.1',
    ]

However, I get the following failure:

The HTML pages are in ../tmp/pytest-of-root/pytest-0/test_html5_is_valid0/html.
Validating HTML for ['/tmp/pytest-of-root/pytest-0/test_html5_is_valid0/html/index.html']
----------------------------------------------------------- Captured stderr call -----------------------------------------------------------
WARNING: html_static_path entry '_static' does not exist
------------------------------------------------------------ Captured log call -------------------------------------------------------------
ERROR    html5validator.validator:validator.py:151 Error: Unable to access jarfile /src/.eggs/html5validator-0.3.1-py3.7.egg/vnujar/vnu.jar
============================================================= warnings summary =============================================================

A quick check shows that .eggs/html5validator-0.3.1-py3.7.egg is a compressed zip file, instead of a directory.

Note that this problem is not visible when using pip instead of easy_install, as pip always unpacks dependencies.

Please either list the .jar file among the eager_resources in setup.py, or specify zip_safe=False in setup.py. That should ensure it is always uncompressed.

svenkreiss commented 4 years ago

Thanks for that observation. Will fix right away.

tchernobog commented 4 years ago

Thanks, I confirm that release 0.3.2 fixed the issue for me.