Skip to content

Commit

Permalink
Release 0.4.2 Fixed import error when used via CLI and in Windows (#6)
Browse files Browse the repository at this point in the history
* Fixed import error when used via CLI
* Fixed import errors in merge.py
* Prepare release 0.4.2
  • Loading branch information
ovasquez authored Feb 14, 2018
1 parent 1965f24 commit a5ccd72
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Changelog

## 0.0.4 - February 2, 2018
## 0.4.2 - February 14, 2018
- Fixed import error in `merge.py` when used in Windows.

## 0.4.1 - February 14, 2018
- Fixed import error when used from CLI.

## 0.4.0 - February 2, 2018
- Separate CLI functionality from the Merge logic for a more module friendly package.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ Supports unification of sites with the same `site_name` into a single sub-site.

MkDocs-Merge supports Python versions 2.7, 3.3, 3.4, 3.5, 3.6 and pypy.

Support for Python 2.6 (MkDocs does support 2.6) was removed due to the use of `ruamel.yaml`. More details
[here](https://yaml.readthedocs.io/en/latest/pyyaml.html#py2-py3-reintegration).

## Install

```bash
Expand Down Expand Up @@ -97,5 +94,6 @@ Very basic implementation. The code works but doesn't allow to specify options f
- [ ] Better error handling.
- [x] Merge configuration via CLI options.
- [x] Unit testing (work in progress).
- [ ] CLI integration testing.
- [ ] Consider more complex cases.
- [x] Make MkDocs Merge module friendly: thanks to [mihaipopescu](https://github.com/mihaipopescu)
2 changes: 1 addition & 1 deletion mkdocsmerge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"""Init module of MkDocs Merge"""


__version__ = '0.4.0'
__version__ = '0.4.2'
2 changes: 1 addition & 1 deletion mkdocsmerge/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import click
from mkdocsmerge import __version__
import merge
from mkdocsmerge import merge

UNIFY_HELP = ('Unify sites with the same "site_name" into a single sub-site. Contents of unified '
'sub-sites will be stored in the same subsite folder.')
Expand Down
6 changes: 4 additions & 2 deletions mkdocsmerge/merge.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import os.path
import distutils
from ruamel.yaml import YAML
# Both imports are needed to avoid errors in Windows
import distutils
from distutils import dir_util

MKDOCS_YML = 'mkdocs.yml'

Expand Down Expand Up @@ -86,7 +88,7 @@ def merge_sites(sites, master_site, unify_sites, print_func):

try:
# Update if the directory already exists to allow site unification
distutils.dir_util.copy_tree(old_site_docs, new_site_docs, update=1)
dir_util.copy_tree(old_site_docs, new_site_docs, update=1)
except OSError as exc:
print_func('Error copying files of site "' +
site_name + '". This site will be skipped.')
Expand Down

0 comments on commit a5ccd72

Please sign in to comment.