diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-11-30 23:38:21 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-11-30 23:38:21 +0000 |
| commit | 7457fb5d5b38a971806ed979461626d0d8dc921f (patch) | |
| tree | 82b9722a9ffb5b9196c037aa5c00348e52bc64b9 | |
Add basic project structure
| -rw-r--r-- | .gitignore | 6 | ||||
| -rw-r--r-- | .travis.yml | 14 | ||||
| -rw-r--r-- | LICENSE | 22 | ||||
| -rw-r--r-- | README.md | 0 | ||||
| -rw-r--r-- | makefile | 35 | ||||
| -rw-r--r-- | mammoth/__init__.py | 0 | ||||
| -rw-r--r-- | setup.py | 20 | ||||
| -rw-r--r-- | test-requirements.txt | 1 | ||||
| -rw-r--r-- | tox.ini | 7 |
9 files changed, 105 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..85d6e1e --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*.pyc +/README +/_virtualenv +/*.egg-info +/.tox +/MANIFEST diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..917e240 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: python +python: + - "2.6" + - "2.7" + - "3.2" + - "3.3" + - "pypy" +install: + - "touch README" + - "pip install . --use-mirrors" + - "pip install -r test-requirements.txt --use-mirrors" +script: nosetests tests +notifications: + email: false @@ -0,0 +1,22 @@ +Copyright (c) 2013, Michael Williamson +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/README.md diff --git a/makefile b/makefile new file mode 100644 index 0000000..431a1cc --- /dev/null +++ b/makefile @@ -0,0 +1,35 @@ +.PHONY: test upload clean bootstrap setup + +test: + sh -c '. _virtualenv/bin/activate; nosetests tests' + +upload: setup assert-converted-readme + python setup.py sdist upload + make clean + +register: setup + python setup.py register + +README: README.md + pandoc --from=markdown --to=rst README.md > README || cp README.md README + +assert-converted-readme: + test "`cat README`" != "`cat README.md`" + +clean: + rm -f README + rm -f MANIFEST + rm -rf dist + +bootstrap: _virtualenv setup + _virtualenv/bin/pip install -e . +ifneq ($(wildcard test-requirements.txt),) + _virtualenv/bin/pip install -r test-requirements.txt +endif + make clean + +setup: README + +_virtualenv: + virtualenv _virtualenv + _virtualenv/bin/pip install 'distribute>=0.6.45' diff --git a/mammoth/__init__.py b/mammoth/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/mammoth/__init__.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..5f529c6 --- /dev/null +++ b/setup.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python + +import os +from distutils.core import setup + +def read(fname): + return open(os.path.join(os.path.dirname(__file__), fname)).read() + +setup( + name='mammoth', + version='0.1.0', + description='"Convert Word documents to simple and clean HTML"', + long_description=read("README"), + author='Michael Williamson', + author_email='mike@zwobble.org', + url='http://github.com/mwilliamson/python-mammoth', + packages=['mammoth'], + keywords="docx word office clean html", +) + diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..02f2252 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +nose>=1.2.1,<2.0 @@ -0,0 +1,7 @@ +[tox] +envlist = py26,py27,py32,py33,pypy +[testenv] +changedir = {envtmpdir} +deps=-r{toxinidir}/test-requirements.txt +commands= + nosetests {toxinidir}/tests |
