mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-05 06:48:49 +00:00
update doc for #290
This commit is contained in:
@@ -136,11 +136,13 @@ Beside the python dependencies defined in [requirements.txt](https://github.com/
|
||||
dotdrop depends on following tools:
|
||||
|
||||
* `diff`
|
||||
* `file` (if libmagic is not installed, see <https://github.com/ahupp/python-magic>)
|
||||
* `git` (only if using the entry point script [dotdrop.sh](https://github.com/deadc0de6/dotdrop/blob/master/dotdrop.sh))
|
||||
* `readlink` or `realpath` (only if using the entry point script [dotdrop.sh](https://github.com/deadc0de6/dotdrop/blob/master/dotdrop.sh))
|
||||
|
||||
For MacOS users, make sure to install `realpath` (part of `coreutils`) through [homebrew](https://brew.sh/).
|
||||
For MacOS users, make sure to install below packages through [homebrew](https://brew.sh/):
|
||||
|
||||
* [coreutils](https://formulae.brew.sh/formula/coreutils) (only if using the entry point script [dotdrop.sh](https://github.com/deadc0de6/dotdrop/blob/master/dotdrop.sh) - realpath)
|
||||
* [libmagic](https://formulae.brew.sh/formula/libmagic) - python-magic
|
||||
|
||||
## Update dotdrop submodule
|
||||
|
||||
|
||||
@@ -152,6 +152,7 @@ class Templategen:
|
||||
if self.debug:
|
||||
self.log.dbg('using \"magic\" for filetype identification')
|
||||
except ImportError:
|
||||
# fallback
|
||||
_, filetype = utils.run(['file', '-b', '--mime-type', src],
|
||||
raw=False, debug=self.debug)
|
||||
if self.debug:
|
||||
|
||||
@@ -275,25 +275,32 @@ def dependencies_met():
|
||||
if not which(dep):
|
||||
raise Exception(err.format(dep))
|
||||
# check python deps
|
||||
err = 'missing python module {}'
|
||||
err = 'missing python module \"{}\"'
|
||||
|
||||
# python-magic
|
||||
try:
|
||||
import magic
|
||||
assert(magic)
|
||||
if not hasattr(magic, 'from_file'):
|
||||
LOG.warn(err.format('python-magic'))
|
||||
except ImportError:
|
||||
raise Exception(err.format('python-magic'))
|
||||
if not hasattr(magic, 'from_file'):
|
||||
e = 'wrong magic module found'
|
||||
raise Exception(e)
|
||||
LOG.warn(err.format('python-magic'))
|
||||
|
||||
# docopt
|
||||
try:
|
||||
from docopt import docopt
|
||||
assert(docopt)
|
||||
except ImportError:
|
||||
raise Exception(err.format('docopt'))
|
||||
|
||||
# jinja2
|
||||
try:
|
||||
import jinja2
|
||||
assert(jinja2)
|
||||
except ImportError:
|
||||
raise Exception(err.format('jinja2'))
|
||||
|
||||
# ruamel.yaml
|
||||
try:
|
||||
from ruamel.yaml import YAML
|
||||
assert(YAML)
|
||||
|
||||
Reference in New Issue
Block a user