From b0958155af9ff619ca8857cc1b888e120a41ff90 Mon Sep 17 00:00:00 2001 From: Jace Browning Date: Wed, 5 Jul 2017 15:26:20 -0400 Subject: [PATCH] Remove unused tools --- .verchew.ini | 14 ++---- CONTRIBUTING.md | 5 --- Makefile | 106 ++------------------------------------------ Pipfile | 7 --- Pipfile.lock | 53 +--------------------- scent.py | 1 - scripts/__init__.py | 0 setup.py | 62 -------------------------- 8 files changed, 8 insertions(+), 240 deletions(-) delete mode 100644 scripts/__init__.py delete mode 100644 setup.py diff --git a/.verchew.ini b/.verchew.ini index e58330e6..410fbc61 100644 --- a/.verchew.ini +++ b/.verchew.ini @@ -19,16 +19,8 @@ cli = pipenv version = 5. -[pandoc] +[Heroku] -cli = pandoc +cli = heroku -version = 1. - - -[Graphviz] - -cli = dot -cli_version_arg = -V - -version = 2. +version = heroku-cli/6. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 006dc16a..7b9ffb65 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,11 +66,6 @@ After checks pass, create a pull request to be merged after review. ### Requirements -Everything from above with the addition of: - -* Pandoc: http://johnmacfarlane.net/pandoc/installing.html -* Graphviz: http://www.graphviz.org/Download.php - ### Installation After cloning the repository, create a virtualenv: diff --git a/Makefile b/Makefile index c940b692..f25d35c3 100644 --- a/Makefile +++ b/Makefile @@ -83,8 +83,8 @@ launch: install .PHONY: run-prod run-prod: install .env - $(HONCHO) run bin/post_compile - $(HONCHO) start + pipenv shell -c "bin/post_compile; exit $$?" + pipenv shell -c "heroku local web=1; exit $$?" .PHONY: launch-prod launch-prod: install @@ -114,7 +114,7 @@ DEPENDENCIES := $(ENV)/.installed METADATA := *.egg-info .PHONY: install -install: $(DEPENDENCIES) $(METADATA) +install: $(DEPENDENCIES) $(DEPENDENCIES): $(PIP) Pipfile* pipenv install --dev @@ -127,10 +127,6 @@ else ifdef LINUX endif @ touch $@ -$(METADATA): $(PYTHON) setup.py - $(PYTHON) setup.py develop - @ touch $@ - $(PYTHON) $(PIP): pipenv --python=$(SYS_PYTHON) pipenv run pip --version @@ -202,96 +198,10 @@ test-all: install read-coverage: $(OPEN) htmlcov/index.html -# DOCUMENTATION ################################################################ - -PYREVERSE := pipenv run pyreverse -MKDOCS := pipenv run mkdocs - -MKDOCS_INDEX := site/index.html - -.PHONY: doc -doc: uml ## Generate documentation - -.PHONY: uml -uml: install docs/*.png -docs/*.png: $(MODULES) - $(PYREVERSE) $(PACKAGE) -p $(PACKAGE) -a 1 -f ALL -o png --ignore tests - - mv -f classes_$(PACKAGE).png docs/classes.png - - mv -f packages_$(PACKAGE).png docs/packages.png - -.PHONY: mkdocs -mkdocs: install $(MKDOCS_INDEX) -$(MKDOCS_INDEX): mkdocs.yml docs/*.md - ln -sf `realpath README.md --relative-to=docs` docs/index.md - ln -sf `realpath CHANGELOG.md --relative-to=docs/about` docs/about/changelog.md - ln -sf `realpath CONTRIBUTING.md --relative-to=docs/about` docs/about/contributing.md - ln -sf `realpath LICENSE.md --relative-to=docs/about` docs/about/license.md - $(MKDOCS) build --clean --strict - -.PHONY: mkdocs-live -mkdocs-live: mkdocs - eval "sleep 3; open http://127.0.0.1:8000" & - $(MKDOCS) serve - -# BUILD ######################################################################## - -PYINSTALLER := pipenv run pyinstaller -PYINSTALLER_MAKESPEC := pipenv run pyi-makespec - -DIST_FILES := dist/*.tar.gz dist/*.whl -EXE_FILES := dist/$(PROJECT).* - -.PHONY: dist -dist: install $(DIST_FILES) -$(DIST_FILES): $(MODULES) README.rst CHANGELOG.rst - rm -f $(DIST_FILES) - $(PYTHON) setup.py check --restructuredtext --strict --metadata - $(PYTHON) setup.py sdist - $(PYTHON) setup.py bdist_wheel - -%.rst: %.md - pandoc -f markdown_github -t rst -o $@ $< - -.PHONY: exe -exe: install $(EXE_FILES) -$(EXE_FILES): $(MODULES) $(PROJECT).spec - # For framework/shared support: https://github.com/yyuu/pyenv/wiki - $(PYINSTALLER) $(PROJECT).spec --noconfirm --clean - -$(PROJECT).spec: - $(PYINSTALLER_MAKESPEC) $(PACKAGE)/__main__.py --onefile --windowed --name=$(PROJECT) - -# RELEASE ###################################################################### - -TWINE := pipenv run twine - -.PHONY: register -register: dist ## Register the project on PyPI - @ echo NOTE: your project must be registered manually - @ echo https://github.com/pypa/python-packaging-user-guide/issues/263 - # TODO: switch to twine when the above issue is resolved - # $(TWINE) register dist/*.whl - -.PHONY: upload -upload: .git-no-changes register ## Upload the current version to PyPI - $(TWINE) upload dist/*.* - $(OPEN) https://pypi.python.org/pypi/$(PROJECT) - -.PHONY: .git-no-changes -.git-no-changes: - @ if git diff --name-only --exit-code; \ - then \ - echo Git working copy is clean...; \ - else \ - echo ERROR: Git working copy is dirty!; \ - echo Commit your changes and try again.; \ - exit -1; \ - fi; - # CLEANUP ###################################################################### .PHONY: clean -clean: .clean-dist .clean-test .clean-doc .clean-build ## Delete all generated and temporary files +clean: .clean-test .clean-build ## Delete all generated and temporary files .PHONY: clean-all clean-all: clean .clean-env .clean-workspace @@ -302,18 +212,10 @@ clean-all: clean .clean-env .clean-workspace find $(PACKAGES) -name '__pycache__' -delete rm -rf *.egg-info -.PHONY: .clean-doc -.clean-doc: - rm -rf README.rst docs/apidocs *.html docs/*.png site - .PHONY: .clean-test .clean-test: rm -rf .cache .pytest .coverage htmlcov -.PHONY: .clean-dist -.clean-dist: - rm -rf *.spec dist build - .PHONY: .clean-env .clean-env: clean rm -rf $(ENV) diff --git a/Pipfile b/Pipfile index 48512eae..69a34016 100644 --- a/Pipfile +++ b/Pipfile @@ -28,11 +28,4 @@ pytest-cov = "*" pytest-random = "*" coverage = "~=4.0" "coverage.space" = "~=0.8" -mkdocs = "*" -docutils = "*" -wheel = "*" -twine = "*" sniffer = "*" -Pygments = "*" -PyInstaller = "*" -honcho = "*" diff --git a/Pipfile.lock b/Pipfile.lock index 9471fa8d..d118df3a 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "12ddd5208bada881974bb80f9e6c7a39725952a011fa7a247d7372a80c2a4772" + "sha256": "f543784439ef4d46eab08c0feb10a9d6f2f1650847e0996c8b8c4ca2c8bec5c6" }, "requires": { "python_version": "3.6" @@ -100,9 +100,6 @@ "chardet": { "version": "==3.0.4" }, - "click": { - "version": "==6.7" - }, "colorama": { "version": "==0.3.9" }, @@ -115,45 +112,21 @@ "docopt": { "version": "==0.6.2" }, - "docutils": { - "version": "==0.13.1" - }, - "honcho": { - "version": "==1.0.1" - }, "idna": { "version": "==2.5" }, "isort": { "version": "==4.2.15" }, - "jinja2": { - "version": "==2.9.6" - }, "lazy-object-proxy": { "version": "==1.3.1" }, - "livereload": { - "version": "==2.5.1" - }, - "markdown": { - "version": "==2.6.8" - }, - "markupsafe": { - "version": "==1.0" - }, "mccabe": { "version": "==0.6.1" }, - "mkdocs": { - "version": "==0.16.3" - }, "nose": { "version": "==1.3.7" }, - "pkginfo": { - "version": "==1.4.1" - }, "py": { "version": "==1.4.34" }, @@ -163,12 +136,6 @@ "pydocstyle": { "version": "==2.0.0" }, - "pygments": { - "version": "==2.2.0" - }, - "pyinstaller": { - "version": "==3.2.1" - }, "pylint": { "version": "==1.7.2" }, @@ -190,15 +157,9 @@ "python-termstyle": { "version": "==0.1.10" }, - "pyyaml": { - "version": "==3.12" - }, "requests": { "version": "==2.18.1" }, - "requests-toolbelt": { - "version": "==0.8.0" - }, "setuptools": { "version": "==36.0.1" }, @@ -211,21 +172,9 @@ "snowballstemmer": { "version": "==1.2.1" }, - "tornado": { - "version": "==4.5.1" - }, - "tqdm": { - "version": "==4.14.0" - }, - "twine": { - "version": "==1.9.1" - }, "urllib3": { "version": "==1.21.1" }, - "wheel": { - "version": "==0.29.0" - }, "wrapt": { "version": "==1.10.10" } diff --git a/scent.py b/scent.py index 90136df9..7b2ebc0b 100644 --- a/scent.py +++ b/scent.py @@ -26,7 +26,6 @@ class Options(object): (('make', 'test-all'), "Integration Tests", False), (('make', 'check'), "Static Analysis", True), (('make', 'validate'), "Validate Templates", True), - (('make', 'doc'), None, True), ] diff --git a/scripts/__init__.py b/scripts/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/setup.py b/setup.py deleted file mode 100644 index b69547ba..00000000 --- a/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env python - -"""Setup script for the package.""" - -import os -import logging - -import setuptools - -from memegen import __project__, __version__ - -try: - README = open("README.rst").read() - CHANGELOG = open("CHANGELOG.rst").read() -except IOError: - LONG_DESCRIPTION = "" -else: - LONG_DESCRIPTION = README + '\n' + CHANGELOG - - -def load_requirements(): - """Exclude specific requirements based on platform.""" - requirements = [] - - for line in open("requirements.txt").readlines(): - line = line.strip() - name = line.split('=')[0].strip() - - if os.name == 'nt': - if name in ['psycopg2', 'gunicorn']: - logging.warning("Skipped requirement: %s", line) - continue - - requirements.append(line) - - return requirements - - -setuptools.setup( - name=__project__, - version=__version__, - - description="The open source meme generator.", - url='https://github.com/jacebrowning/memegen', - author='Jace Browning', - author_email='jacebrowning@gmail.com', - - packages=setuptools.find_packages(), - - entry_points={'console_scripts': []}, - - long_description=LONG_DESCRIPTION, - license='MIT', - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Natural Language :: English', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3.6', - ], - - install_requires=load_requirements(), -)