lektor/lektor-markdown-highlighter

Can't make it work with Lektor 3.1.1 on MacOS 10.13.6

Closed this issue · 7 comments

Hi!

I just installed the 3.1.1 version of Lektor.
I'd like to use the lektor-markdown-highlighter for a website filled with code snippets.

I managed to install the plugin with lektor plugins add markdown-highlighter, but as soon as I try to build the website I get the following traceback

$ lektor build
Updating packages in /Users/robertoarista/Library/Caches/Lektor/packages/86e11e9e702bfc7ef4388cdbb4625b50 for project
Collecting lektor-markdown-highlighter==0.3
  Could not find a version that satisfies the requirement lektor-markdown-highlighter==0.3 (from versions: 0.1, 0.2)
No matching distribution found for lektor-markdown-highlighter==0.3
Traceback (most recent call last):
  File "/usr/local/bin/lektor", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/lektor/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/lektor/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/lektor/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/lektor/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/lektor/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/lektor/lib/python2.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "/usr/local/lib/lektor/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/lektor/lib/python2.7/site-packages/lektor/cli.py", line 214, in build_cmd
    ctx.load_plugins()
  File "/usr/local/lib/lektor/lib/python2.7/site-packages/lektor/cli.py", line 130, in load_plugins
    load_packages(self.get_env(), reinstall=reinstall)
  File "/usr/local/lib/lektor/lib/python2.7/site-packages/lektor/packages.py", line 306, in load_packages
    refresh=reinstall)
  File "/usr/local/lib/lektor/lib/python2.7/site-packages/lektor/packages.py", line 276, in update_cache
    download_and_install_package(package_root, package, version)
  File "/usr/local/lib/lektor/lib/python2.7/site-packages/lektor/packages.py", line 105, in download_and_install_package
    raise RuntimeError('Failed to install dependency package.')
RuntimeError: Failed to install dependency package.

any advice?

I downgraded the plugin to version 0.2 and it works

Try upgrading again to 0.3. I was going to suggest a lektor plugins flush-cache, and see if that fixed it. Downgrading to 0.2 might have had the same effect. 0.3 was pushed.

same result :(

can I provide any extra useful info?

I can reproduce it :/ At least that means I can dig into it. I'm not sure what the cause of this is at the moment. Thanks for reporting!

sprt commented

Same issue on Ubuntu 16.04

I haven't analyzed this in depth but I think it is a Python 2 specific problem. The 0.3 release of the package only has a py3 wheel file. The previous 0.2 release used the classic sdist (gzipped tar file) which is version agnostic by default.

This should be fixable by adding a setup.cfg: https://packaging.python.org/guides/distributing-packages-using-setuptools/#universal-wheels (if the project is python 2 compatible of course)