diff --git a/.gitignore b/.gitignore index 2e257a8c..af2643ae 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ __pycache__/ # Distribution / packaging .Python env/ +data/ build/ develop-eggs/ dist/ @@ -58,13 +59,6 @@ docs/_build/ # PyBuilder target/ -# Manpages -gallery-dl.1 -gallery-dl.conf.5 - -# Bash completion -gallery-dl.bash_completion - # Snap packaging specific /snap/.snapcraft/ /parts/ diff --git a/CHANGELOG.md b/CHANGELOG.md index b1b1f11b..c17e4e41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased +### Fixes +- Fix inclusion of bash completion and man pages in source distributions + ## 1.11.0 - 2019-11-08 ### Additions - Support for diff --git a/Makefile b/Makefile index f5c7527a..12099eae 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ all: man completion docs/supportedsites.rst clean: $(RM) -r build/ + $(RM) -r data/ install: man completion $(PYTHON) setup.py install @@ -23,20 +24,20 @@ test: executable: scripts/pyinstaller.py -completion: build/completion/gallery-dl +completion: data/completion/gallery-dl -man: build/man/gallery-dl.1 build/man/gallery-dl.conf.5 +man: data/man/gallery-dl.1 data/man/gallery-dl.conf.5 .PHONY: all clean install release test executable completion man docs/supportedsites.rst: gallery_dl/*/*.py scripts/supportedsites.py $(PYTHON) scripts/supportedsites.py -build/man/gallery-dl.1: gallery_dl/option.py gallery_dl/version.py scripts/man.py +data/man/gallery-dl.1: gallery_dl/option.py gallery_dl/version.py scripts/man.py $(PYTHON) scripts/man.py -build/man/gallery-dl.conf.5: docs/configuration.rst gallery_dl/version.py scripts/man.py +data/man/gallery-dl.conf.5: docs/configuration.rst gallery_dl/version.py scripts/man.py $(PYTHON) scripts/man.py -build/completion/gallery-dl: gallery_dl/option.py scripts/bash_completion.py +data/completion/gallery-dl: gallery_dl/option.py scripts/bash_completion.py $(PYTHON) scripts/bash_completion.py diff --git a/gallery_dl/version.py b/gallery_dl/version.py index b2e74098..82bd7fb9 100644 --- a/gallery_dl/version.py +++ b/gallery_dl/version.py @@ -6,4 +6,4 @@ # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. -__version__ = "1.11.0" +__version__ = "1.11.1-dev" diff --git a/scripts/bash_completion.py b/scripts/bash_completion.py index b2c5eace..6ce2a8d3 100755 --- a/scripts/bash_completion.py +++ b/scripts/bash_completion.py @@ -47,7 +47,7 @@ for action in option.build_parser()._actions: if opt.startswith("--"): opts.append(opt) -PATH = util.path("build/completion/gallery-dl") +PATH = util.path("data/completion/gallery-dl") with open(PATH, "w", encoding="utf-8") as file: file.write(TEMPLATE % { "opts" : " ".join(opts), diff --git a/scripts/man.py b/scripts/man.py index 20d55564..b8554d3a 100755 --- a/scripts/man.py +++ b/scripts/man.py @@ -99,7 +99,7 @@ and https://github.com/mikf/gallery-dl/graphs/contributors )) if not path: - path = util.path("build/man/gallery-dl.1") + path = util.path("data/man/gallery-dl.1") with open(path, "w", encoding="utf-8") as file: file.write(TEMPLATE.lstrip() % { "options": "\n".join(options), @@ -217,7 +217,7 @@ and https://github.com/mikf/gallery-dl/graphs/contributors content.append(strip_rst(text, field != "Example")) if not path: - path = util.path("build/man/gallery-dl.conf.5") + path = util.path("data/man/gallery-dl.conf.5") with open(path, "w", encoding="utf-8") as file: file.write(TEMPLATE.lstrip() % { "options": "\n".join(content), diff --git a/scripts/release.sh b/scripts/release.sh index ef444e01..31196b14 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -27,6 +27,7 @@ update() { sed -i "s#\"${PYVERSION}\"#\"${NEWVERSION}\"#" "gallery_dl/version.py" sed -i "s#v${OLDVERSION}#v${NEWVERSION}#" "${README}" + make man } update-dev() { diff --git a/setup.py b/setup.py index ff630937..f0f0f16e 100644 --- a/setup.py +++ b/setup.py @@ -36,9 +36,9 @@ VERSION = re.search( FILES = [ (path, [f for f in files if check_file(f)]) for (path, files) in [ - ("share/bash-completion/completions", ["build/completion/gallery-dl"]), - ("share/man/man1" , ["build/man/gallery-dl.1"]), - ("share/man/man5" , ["build/man/gallery-dl.conf.5"]), + ("share/bash-completion/completions", ["data/completion/gallery-dl"]), + ("share/man/man1" , ["data/man/gallery-dl.1"]), + ("share/man/man5" , ["data/man/gallery-dl.conf.5"]), ] ]