Skip to content

Commit

Permalink
Merge branch 'master' of github.com:nicfit/mishmash
Browse files Browse the repository at this point in the history
* 'master' of github.com:nicfit/mishmash:
  new: updated to nicfit.py 0.5.5
  • Loading branch information
nicfit committed Jan 23, 2017
2 parents 2338efb + 524f1aa commit 3e93844
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 39 deletions.
7 changes: 7 additions & 0 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@ default_context:
use_paver: "no"
use_pytest: "yes"
intended_audience: "End Users/Desktop"
py26: "no"
py27: "no"
py33: "no"
py34: "no"
py35: "yes"
py36: "yes"
py37: "yes"
4 changes: 0 additions & 4 deletions AUTHORS

This file was deleted.

7 changes: 7 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Authors
-------

* Travis Shirk <travis@pobox.com>
* nicfit <nicfit@gmail.com>
* nicfit <travis@pobox.com>
* Chris Newton <redshodan@users.noreply.github.com>
11 changes: 5 additions & 6 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
include mishmash/_default-config.ini
graft mishmash/web

include AUTHORS
include AUTHORS.rst
include CONTRIBUTING.rst
include HISTORY.rst
include LICENSE
Expand All @@ -14,13 +11,15 @@ prune docs/_build

recursive-include ./tests *.py

exclude .gitchangelog.rc
global-exclude __pycache__
global-exclude .editorconfig
global-exclude *.py[co]

recursive-include requirements *.txt

include mishmash/_default-config.ini
graft mishmash/web

exclude .cookiecutter.json
exclude .gitchangelog.rc
prune etc

45 changes: 24 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
.PHONY: clean-pyc clean-build clean-patch clean-local docs clean help lint \
test test-all coverage docs release dist tags install \
test test-all coverage docs release dist tags build install \
build-release pre-release freeze-release _tag-release _upload-release \
_pypi-release _github-release clean-docs cookiecutter changelog docker \
_web-release
SRC_DIRS = ./mishmash
TEST_DIR = ./tests
TEMP_DIR ?= ./tmp
CC_DIR = ${TEMP_DIR}/MishMash
define BROWSER_PYSCRIPT
import os, webbrowser, sys
try:
from urllib import pathname2url
except:
from urllib.request import pathname2url
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
endef
export BROWSER_PYSCRIPT
BROWSER := python -c "$$BROWSER_PYSCRIPT"
NAME ?= Travis Shirk
EMAIL ?= travis@pobox.com
GITHUB_USER ?= nicfit
Expand All @@ -36,6 +26,7 @@ help:
@echo "clean-test - remove test and coverage artifacts"
@echo "clean-docs - remove autogenerating doc artifacts"
@echo "clean-patch - remove patch artifacts (.rej, .orig)"
@echo "build - byte-compile python files and generate other build objects"
@echo "lint - check style with flake8"
@echo "coverage - check code coverage quickly with the default Python"
@echo "test-all - run tests on various Python versions with tox"
Expand All @@ -47,7 +38,10 @@ help:
@echo ""
@echo "Options:"
@echo "TEST_PDB - If defined PDB options are added when 'pytest' is invoked"
@echo "BROWSER - Set to "yes" to open docs/coverage results in a web browser"
@echo "BROWSER - HTML viewer used by docs-view/coverage-view"

build:
python setup.py build

clean: clean-local clean-build clean-pyc clean-test clean-patch clean-docs
rm -rf tags
Expand Down Expand Up @@ -98,15 +92,18 @@ coverage:
--cov-report=html --cov-report term \
--cov-config=setup.cfg ${TEST_DIR}

coverage-view: coverage
${BROWSER} build/tests/coverage/index.html;\

docs:
rm -f docs/mishmash.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ ${SRC_DIRS}
$(MAKE) -C docs clean
$(MAKE) -C docs html
@if test -n '$(BROWSER)'; then \
$(BROWSER) docs/_build/html/index.html;\
fi

docs-view: docs
$(BROWSER) docs/_build/html/index.html;\

clean-docs:
# TODO
Expand All @@ -132,7 +129,7 @@ pre-release: lint test changelog
IFS=$$'\n';\
for auth in `git authors --list`; do \
echo "Checking $$auth...";\
grep "$$auth" AUTHORS || echo "$$auth" >> AUTHORS;\
grep "$$auth" AUTHORS.rst || echo "* $$auth" >> AUTHORS.rst;\
done
@github-release --version # Just a exe existence check

Expand Down Expand Up @@ -222,22 +219,28 @@ tags:

README.html: README.rst
rst2html5.py README.rst >| README.html
if test -n "${BROWSER}"; then \
${BROWSER} README.html;\
fi

CC_DIFF ?= gvimdiff -geometry 169x60 -f
cookiecutter:
rm -rf ${TEMP_DIR}
git clone --branch `git rev-parse --abbrev-ref HEAD` . ${CC_DIR}
# FIXME: Pull from a non-local ./cookiecutter
cookiecutter -o ${TEMP_DIR} -f --config-file ./.cookiecutter.json \
--no-input ../nicfit.py/cookiecutter
nicfit cookiecutter --config-file ./.cookiecutter.json --no-input ${TEMP_DIR}
if test "${CC_DIFF}" == "no"; then \
git -C ${CC_DIR} diff; \
git -C ${CC_DIR} status -s -b; \
else \
for f in `git -C ${CC_DIR} status --porcelain | \
awk '{print $$2}'`; do \
${CC_DIFF} ${CC_DIR}/$$f ./$$f; \
done \
if test -f ${CC_DIR}/$$f; then \
diff ${CC_DIR}/$$f ./$$f > /dev/null || \
${CC_DIFF} ${CC_DIR}/$$f ./$$f; \
fi \
done; \
diff ${CC_DIR}/.git/hooks/commit-msg .git/hooks/commit-msg >/dev/null || \
${CC_DIFF} ${CC_DIR}/.git/hooks/commit-msg ./.git/hooks/commit-msg; \
fi

docker:
Expand Down
2 changes: 1 addition & 1 deletion requirements/default.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
nicfit.py>=0.5.1b0
nicfit.py>=0.5.5
eyeD3>=0.8.0a3
SQLAlchemy>=0.9
countrycode
Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ flake8
twine
Sphinx
check-manifest
gitchangelog
pyramid_debugtoolbar
sphinx_bootstrap_theme
gitchangelog
13 changes: 8 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
"Natural Language :: English",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
]
Expand Down Expand Up @@ -88,6 +83,14 @@ def requirements(filename):
.format(gz=gz, **pkg_info)
)


def package_files(directory):
paths = []
for (path, _, filenames) in os.walk(directory):
for filename in filenames:
paths.append(os.path.join("..", path, filename))
return paths

if sys.argv[1:] and sys.argv[1] == "--release-name":
print(pkg_info["release_name"])
sys.exit(0)
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py35, py36
envlist = py35, py36

[testenv]
commands = pytest ./tests
Expand Down

0 comments on commit 3e93844

Please sign in to comment.