jjfiv / quizdown

Quickly create and export quiz questions from a markdown subset.
https://static.jjfoley.me/quizdown-web/
16 stars 1 forks source link

Missing dependency #7

Closed arranstewart closed 2 years ago

arranstewart commented 2 years ago

The Python package for quizdown seems not to be declaring its dependencies correctly.

Version information:

Using Python 3.6.9 on Ubuntu 18.04 and current version of quizdown (0.3.0).

Steps to reproduce

$ python3 -m venv env
$ . env/bin/activate
$ pip install quizdown
$ python -m quizdown --help

Expected behaviour

Help message should be displayed.

Actual behaviour

(env) $ python -m quizdown --help
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/home/user/env/lib/python3.6/site-packages/quizdown/__init__.py", line 2, in <module>
    from .types import Quiz, Question, QOption
  File "/home/user/env/lib/python3.6/site-packages/quizdown/types.py", line 5, in <module>
    @attr.s
AttributeError: module 'attr' has no attribute 's'

Comments

This error can be fixed by installing the attrs package as well as quizdown:

$ pip install attrs quizdown

But quizdown should correctly state its dependencies, and appears not to. (Double-checked by looking at the quizdown page on PyPi, https://pypi.org/project/quizdown/ – there's no "Requires" section at all.

jjfiv commented 2 years ago

Thanks @arranstewart ... an attempt was made at including this information:

https://github.com/jjfiv/quizdown/blob/9cf4f5d25fe191d79f00f99d2ee5177c8bbde71c/cffi/Cargo.toml#L22-L27

But clearly I need to dig into what happened.

Thanks for the clear report!

arranstewart commented 2 years ago

No worries :) I've never tried creating a Python package from a cargo file, so not sure what exactly is needed, unfortunately.

jjfiv commented 2 years ago

Now that I’m getting back into it, I think I just need to push a new version. Sadly my GitHub actions have bit rotted, eg #8.

jjfiv commented 2 years ago

This should be fixed in 0.3.2. Feel free to reopen or report otherwise.