diff --git a/Makefile b/Makefile index d1f4726..daa3457 100644 --- a/Makefile +++ b/Makefile @@ -7,14 +7,6 @@ all: svtplay-dl VERSION = 1.9.11 LATEST_RELEASE = $(VERSION) -# If we build a new release, this is what it will be called: -NEW_RELEASE = $(VERSION) -RELEASE_DIR = svtplay-dl-$(NEW_RELEASE) - -PREFIX ?= /usr/local -BINDIR = $(PREFIX)/bin -MANDIR = $(PREFIX)/share/man/man1 - # Compress the manual if MAN_GZIP is set to y, ifeq ($(MAN_GZIP),y) MANFILE_EXT = .gz @@ -35,16 +27,6 @@ export PYTHONPATH=lib # nosetests3), you can remove the -3 flag. TEST_OPTS ?= -2 -3 -install: svtplay-dl $(MANFILE) - install -d $(DESTDIR)$(BINDIR) - install -d $(DESTDIR)$(MANDIR) - install -m 755 svtplay-dl $(DESTDIR)$(BINDIR) - install -m 644 $(MANFILE) $(DESTDIR)$(MANDIR) - -svtplay-dl: $(PYFILES) - $(MAKE) -C lib - mv -f lib/svtplay-dl . - svtplay-dl.1: svtplay-dl.pod rm -f $@ $(POD2MAN) $< $@ @@ -65,32 +47,13 @@ pylint: doctest: svtplay-dl sh scripts/diff_man_help.sh -$(RELEASE_DIR): clean_releasedir - mkdir $(RELEASE_DIR) - cd $(RELEASE_DIR) && git clone -b master ../ . && \ - make $(MANFILE) - -clean_releasedir: - rm -rf $(RELEASE_DIR) - -release: $(RELEASE_DIR) release-test - set -e; cd $(RELEASE_DIR) && \ - sed -i -re 's/^\(__version__ = \).*/\1"$(NEW_RELEASE)"/' lib/svtplay_dl/__init__.py;\ - git add Makefile lib/svtplay_dl/__init__.py; \ - git commit -m "New release $(NEW_RELEASE)"; - (cd $(RELEASE_DIR) && git format-patch --stdout HEAD^) | git am - +release: git tag -m "New version $(NEW_RELEASE)" \ -m "$$(git log --oneline $$(git describe --tags --abbrev=0 HEAD^)..HEAD^)" \ $(NEW_RELEASE) - make clean_releasedir - -release-test: $(RELEASE_DIR) - make -C $(RELEASE_DIR) test - make -C $(RELEASE_DIR) doctest - clean: $(MAKE) -C lib clean rm -f svtplay-dl rm -f $(MANFILE) + rm -f .tox diff --git a/README.rst b/README.rst index 3a152a6..e2ecdc4 100644 --- a/README.rst +++ b/README.rst @@ -88,17 +88,11 @@ To install it, run :: - # as root: - python3 setup.py install - - # or the old method - make - - # as root: - make install + sudo python3 setup.py install After install ============= + :: svtplay-dl [options] URL diff --git a/lib/Makefile b/lib/Makefile deleted file mode 100644 index 085ed4e..0000000 --- a/lib/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -PYLINT_OPTS = --reports=no -d I -d C -d R -d W0511 - -all: svtplay-dl - -clean: - find . -name '*.pyc' -exec rm {} \; - rm -f svtplay-dl - -pylint: - pylint $(PYLINT_OPTS) svtplay_dl - -export PACKAGES = svtplay_dl \ - svtplay_dl.fetcher \ - svtplay_dl.utils \ - svtplay_dl.service \ - svtplay_dl.subtitle \ - svtplay_dl.postprocess -export PYFILES = $(sort $(addsuffix /*.py,$(subst .,/,$(PACKAGES)))) - -PYTHON ?= /usr/bin/env python3 - -VERSION = $(shell git describe 2>/dev/null || echo $(LATEST_RELEASE)-unknown) - -svtplay-dl: $(PYFILES) - @# Verify that there's no .build already \ - ! [ -d .build ] || { \ - echo "ERROR: build already in progress? (or remove $(PWD)/.build/)"; \ - exit 1; \ - }; \ - mkdir -p .build - - @# Stage the files in .build for postprocessing - for py in $(PYFILES); do \ - install -d ".build/$${py%/*}"; \ - install $$py .build/$$py; \ - done - - # Add git version info to __version__, seen in --version - sed -i -e 's/^__version__ = "\([^"]\+\)"$$/__version__ = "$(VERSION)"/' \ - .build/svtplay_dl/__init__.py - - @# reset timestamps, to avoid non-determinism in zip file - find .build/ -exec touch -m -t 198001010000 {} \; - - (cd .build && zip -X --quiet svtplay-dl $(PYFILES)) - (cd .build && zip -X --quiet --junk-paths svtplay-dl svtplay_dl/__main__.py) - - echo '#!$(PYTHON)' > svtplay-dl - cat .build/svtplay-dl.zip >> svtplay-dl - rm -rf .build - chmod a+x svtplay-dl