fralau / mkdocs-macros-plugin

Create richer and more beautiful pages in MkDocs, by using variables and calls to macros in the markdown code.
https://mkdocs-macros-plugin.readthedocs.io
Other
323 stars 50 forks source link

git required #31

Closed janroelofs closed 4 years ago

janroelofs commented 4 years ago

Since updating to 0.4.4 git seems to be required. Running without git installed:

Traceback (most recent call last):
 File "/usr/local/bin/mkdocs", line 8, in <module>
   sys.exit(cli())
 File "/usr/local/lib/python3.6/site-packages/click/core.py", line 829, in __call__
   return self.main(*args, **kwargs)
 File "/usr/local/lib/python3.6/site-packages/click/core.py", line 782, in main
   rv = self.invoke(ctx)
 File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
   return _process_result(sub_ctx.command.invoke(sub_ctx))
 File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
   return ctx.invoke(self.callback, **ctx.params)
 File "/usr/local/lib/python3.6/site-packages/click/core.py", line 610, in invoke
   return callback(*args, **kwargs)
 File "/usr/local/lib/python3.6/site-packages/mkdocs/__main__.py", line 159, in build_command
   build.build(config.load_config(**kwargs), dirty=not clean)
 File "/usr/local/lib/python3.6/site-packages/mkdocs/commands/build.py", line 239, in build
   config = config['plugins'].run_event('config', config)
 File "/usr/local/lib/python3.6/site-packages/mkdocs/plugins.py", line 94, in run_event
   result = method(item, **kwargs)
 File "/usr/local/lib/python3.6/site-packages/macros/plugin.py", line 309, in on_config
   define_env(self)
 File "/usr/local/lib/python3.6/site-packages/macros/context.py", line 239, in define_env
   env.variables['git'] = get_git_info()
 File "/usr/local/lib/python3.6/site-packages/macros/context.py", line 148, in get_git_info
   universal_newlines=True).strip()
 File "/usr/lib64/python3.6/subprocess.py", line 356, in check_output
   **kwargs).stdout
 File "/usr/lib64/python3.6/subprocess.py", line 423, in run
   with Popen(*popenargs, **kwargs) as process:
 File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__
   restore_signals, start_new_session)
 File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child
   raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'git': 'git'

I could not find the requirement in the docs, and version 0.2.4 did not require git.

fralau commented 4 years ago

Duplicate of #30

You should update to 0.4.7.

fralau commented 4 years ago

Has your issue been solved?

rutgervaneijden commented 4 years ago

In a sense yes, I installed git. Although I’m not using git.

Thank you for asking, kind regards,

Rutger

From: ... Subject: Re: [fralau/mkdocs_macros_plugin] git required (#31)

Has your issue been solved?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

fralau commented 4 years ago

Thanks, I believe we can close this usse.

janroelofs commented 4 years ago

I also circumvented it by adding git. Still planning to test the fix without git sometime but I agree to closing the issue. Thanks for the quick response.

trogper commented 4 years ago

When is this going to be on pypi? I'm considering whether to use 0.3.3 in CI/pipeline or wait for 0.4.7

fralau commented 4 years ago

Thanks for the reminder. 0.4.7 Is now on pypi.