From 5bb05e461d96b25c7056771b49aba6168ae5e8c2 Mon Sep 17 00:00:00 2001 From: "Gavin M. Roy" Date: Thu, 28 Aug 2014 19:25:02 -0400 Subject: [PATCH] Updates to many things - Documentation updates, fleshing out more of the baseline expectations - README.rst updates with the baseline expectations - Remove tornado from the requirements.txt - Update the nosetests configuration in setup.cfg - Remove unneeded 2.6 requirements - Update classifiers - Update name in cookiecutter.json - Use manual package names in packages - Mark as non-zip safe - Remove tests directory - Make default tests.py file - Explicitly add coverage to the test requirements - Add README.rst to MANIFEST.in - Update Trove classifiers - Ensure setup.py will include README.rst and LICENSE (dupe of MANIFEST.in) - Add test_suite to setup.py - Set default description in cookiecutter.json Additional refactoring - Change to be a sprockets.foo.bar project - Move doc to docs - Add additional documentation templates - Change version to only show major.minor - Add docs/Makefile - Minor README and docs updates Fix the travis file and readthedocs URLs Deployment/pypi related updates --- cookiecutter.json | 6 +- .../.travis.yml | 13 +- .../LICENSE | 8 +- .../MANIFEST.in | 5 +- .../README.rst | 52 ++++++ .../doc/changelog.rst | 6 - .../doc/index.rst | 7 - .../docs/Makefile | 153 ++++++++++++++++++ .../docs/api.rst | 2 + .../{doc => docs}/conf.py | 4 +- .../docs/examples.rst | 10 ++ .../docs/history.rst | 5 + .../docs/index.rst | 66 ++++++++ .../requirements.txt | 1 - .../setup.cfg | 15 +- .../setup.py | 27 +++- .../__init__.py | 1 + .../__init__.py | 6 + .../test-requirements.txt | 1 + .../tests.py | 13 ++ .../tests/__init__.py | 0 21 files changed, 356 insertions(+), 45 deletions(-) delete mode 100644 sprockets.{{cookiecutter.project_name}}/doc/changelog.rst delete mode 100644 sprockets.{{cookiecutter.project_name}}/doc/index.rst create mode 100644 sprockets.{{cookiecutter.project_name}}/docs/Makefile create mode 100644 sprockets.{{cookiecutter.project_name}}/docs/api.rst rename sprockets.{{cookiecutter.project_name}}/{doc => docs}/conf.py (87%) create mode 100644 sprockets.{{cookiecutter.project_name}}/docs/examples.rst create mode 100644 sprockets.{{cookiecutter.project_name}}/docs/history.rst create mode 100644 sprockets.{{cookiecutter.project_name}}/docs/index.rst create mode 100644 sprockets.{{cookiecutter.project_name}}/sprockets/{{cookiecutter.project_name.split('.')[0]}}/__init__.py rename sprockets.{{cookiecutter.project_name}}/sprockets/{{{cookiecutter.project_name}} => {{cookiecutter.project_name.split('.')[0]}}/{{cookiecutter.project_name.split('.')[-1]}}}/__init__.py (53%) create mode 100644 sprockets.{{cookiecutter.project_name}}/tests.py delete mode 100644 sprockets.{{cookiecutter.project_name}}/tests/__init__.py diff --git a/cookiecutter.json b/cookiecutter.json index d5ff8e8..90ffccf 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -1,8 +1,8 @@ { "project_name": "", - "full_name": "", - "email": "", - "description": "", + "full_name": "AWeber Communications", + "email": "api@aweber.com", + "description": "Short description required", "git_org": "sprockets", "year": "2014" } diff --git a/sprockets.{{cookiecutter.project_name}}/.travis.yml b/sprockets.{{cookiecutter.project_name}}/.travis.yml index b414654..db9030f 100644 --- a/sprockets.{{cookiecutter.project_name}}/.travis.yml +++ b/sprockets.{{cookiecutter.project_name}}/.travis.yml @@ -1,9 +1,11 @@ -%YAML 1.2 +%YAML 1.1 --- language: python python: - 2.6 - 2.7 + - pypy + - 3.2 - 3.3 - 3.4 install: @@ -12,3 +14,12 @@ install: script: nosetests after_success: - coveralls +deploy: + provider: pypi + user: sprockets + on: + python: 2.7 + tags: true + all_branches: true + password: + secure: [REPLACE-ME] diff --git a/sprockets.{{cookiecutter.project_name}}/LICENSE b/sprockets.{{cookiecutter.project_name}}/LICENSE index 80dcfe9..6ccc982 100644 --- a/sprockets.{{cookiecutter.project_name}}/LICENSE +++ b/sprockets.{{cookiecutter.project_name}}/LICENSE @@ -9,9 +9,9 @@ are permitted provided that the following conditions are met: * 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. - * Neither the name of Sprockets nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. + * Neither the name of Sprockets nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. 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 @@ -22,4 +22,4 @@ 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. \ No newline at end of file +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/sprockets.{{cookiecutter.project_name}}/MANIFEST.in b/sprockets.{{cookiecutter.project_name}}/MANIFEST.in index 388f773..1c854ba 100644 --- a/sprockets.{{cookiecutter.project_name}}/MANIFEST.in +++ b/sprockets.{{cookiecutter.project_name}}/MANIFEST.in @@ -1,6 +1,7 @@ include LICENSE +include README.rst include *requirements.txt -graft doc -graft tests +graft docs +graft tests.py global-exclude __pycache__ global-exclude *.pyc diff --git a/sprockets.{{cookiecutter.project_name}}/README.rst b/sprockets.{{cookiecutter.project_name}}/README.rst index 502e51e..87ade73 100644 --- a/sprockets.{{cookiecutter.project_name}}/README.rst +++ b/sprockets.{{cookiecutter.project_name}}/README.rst @@ -1,3 +1,55 @@ sprockets.{{ cookiecutter.project_name }} {{ '=' * (10 + cookiecutter.project_name|length) }} +{{ cookiecutter.description }} +|Version| |Downloads| |Status| |Coverage| |License| + +Installation +------------ +sprockets.{{ cookiecutter.project_name }} is available on the +`Python Package Index `_ +and can be installed via ``pip`` or ``easy_install``: + +.. code:: bash + + pip install sprockets.{{ cookiecutter.project_name }} + +Documentation +------------- +https://sprockets{{ cookiecutter.project_name.replace('.', '') }}.readthedocs.org + +Requirements +------------ +@TODO: Put full requirements list here, should match requirements.text +- `sprockets `_ + +Example +------- +This examples demonstrates how to use sprockets.{{ cookiecutter.project_name }} by ... +.. code:: python + + from sprockets import {{ cookiecutter.project_name }} + + # Example here + +More complex examples and documentation are available at https://sprockets.{{ cookiecutter.project_name }}.readthedocs.org + +Version History +--------------- +Available at https://sprockets{{ cookiecutter.project_name.replace('.', '') }}.readthedocs.org/en/latest/history.html + +.. |Version| image:: https://badge.fury.io/py/sprockets.{{ cookiecutter.project_name }}.svg? + :target: http://badge.fury.io/py/sprockets.{{ cookiecutter.project_name }} + +.. |Status| image:: https://travis-ci.org/sprockets/sprockets.{{ cookiecutter.project_name }}.svg?branch=master + :target: https://travis-ci.org/sprockets/sprockets.{{ cookiecutter.project_name }} + +.. |Coverage| image:: https://img.shields.io/coveralls/sprockets/sprockets.{{ cookiecutter.project_name }}.svg? +.. |Coverage| image:: https://coveralls.io/repos/sprockets/sprockets.{{ cookiecutter.project_name }}.svg? + :target: https://coveralls.io/r/sprockets/sprockets.{{ cookiecutter.project_name }} + +.. |Downloads| image:: https://pypip.in/d/sprockets.{{ cookiecutter.project_name }}/badge.svg? + :target: https://pypi.python.org/pypi/sprockets.{{ cookiecutter.project_name }} + +.. |License| image:: https://pypip.in/license/sprockets.{{ cookiecutter.project_name }}/badge.svg? + :target: https://sprockets{{ cookiecutter.project_name.replace('.', '') }}.readthedocs.org \ No newline at end of file diff --git a/sprockets.{{cookiecutter.project_name}}/doc/changelog.rst b/sprockets.{{cookiecutter.project_name}}/doc/changelog.rst deleted file mode 100644 index 11c4a74..0000000 --- a/sprockets.{{cookiecutter.project_name}}/doc/changelog.rst +++ /dev/null @@ -1,6 +0,0 @@ -Changelog ---------- - -* Next Release - - - Implement greatness! diff --git a/sprockets.{{cookiecutter.project_name}}/doc/index.rst b/sprockets.{{cookiecutter.project_name}}/doc/index.rst deleted file mode 100644 index 2d745ea..0000000 --- a/sprockets.{{cookiecutter.project_name}}/doc/index.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. include:: ../README.rst - -.. toctree:: - :hidden: - :maxdepth: 2 - - changelog diff --git a/sprockets.{{cookiecutter.project_name}}/docs/Makefile b/sprockets.{{cookiecutter.project_name}}/docs/Makefile new file mode 100644 index 0000000..6f6d8b7 --- /dev/null +++ b/sprockets.{{cookiecutter.project_name}}/docs/Makefile @@ -0,0 +1,153 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/rabbitpy.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/rabbitpy.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/rabbitpy" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/rabbitpy" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff --git a/sprockets.{{cookiecutter.project_name}}/docs/api.rst b/sprockets.{{cookiecutter.project_name}}/docs/api.rst new file mode 100644 index 0000000..fe5fb86 --- /dev/null +++ b/sprockets.{{cookiecutter.project_name}}/docs/api.rst @@ -0,0 +1,2 @@ +.. automodule:: sprockets.{{ cookiecutter.project_name }} + :members: \ No newline at end of file diff --git a/sprockets.{{cookiecutter.project_name}}/doc/conf.py b/sprockets.{{cookiecutter.project_name}}/docs/conf.py similarity index 87% rename from sprockets.{{cookiecutter.project_name}}/doc/conf.py rename to sprockets.{{cookiecutter.project_name}}/docs/conf.py index f388d76..49b51c0 100644 --- a/sprockets.{{cookiecutter.project_name}}/doc/conf.py +++ b/sprockets.{{cookiecutter.project_name}}/docs/conf.py @@ -3,7 +3,6 @@ import sphinx_rtd_theme from sprockets.{{cookiecutter.project_name}} import version_info, __version__ - needs_sphinx = '1.0' extensions = [ 'sphinx.ext.autodoc', @@ -15,7 +14,7 @@ source_suffix = '.rst' master_doc = 'index' project = '{{cookiecutter.project_name}}' copyright = '{{cookiecutter.year}}, {{cookiecutter.full_name}}' -version = __version__ +version = '.'.join(__version__.split('.')[0:1]) release = __version__ if len(version_info) > 3: release += '-{0}'.format(str(v) for v in version_info[3:]) @@ -26,4 +25,5 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] intersphinx_mapping = { 'python': ('https://docs.python.org/', None), 'requests': ('https://requests.readthedocs.org/en/latest/', None), + 'sprockets': ('https://sprockets.readthedocs.org/en/latest/', None), } diff --git a/sprockets.{{cookiecutter.project_name}}/docs/examples.rst b/sprockets.{{cookiecutter.project_name}}/docs/examples.rst new file mode 100644 index 0000000..3c86279 --- /dev/null +++ b/sprockets.{{cookiecutter.project_name}}/docs/examples.rst @@ -0,0 +1,10 @@ +Examples +======== +The following example ... + +.. code:: python + + from sprockets import {{ cookiecutter.project_name }} + + class Foo(object): + pass diff --git a/sprockets.{{cookiecutter.project_name}}/docs/history.rst b/sprockets.{{cookiecutter.project_name}}/docs/history.rst new file mode 100644 index 0000000..9c6846c --- /dev/null +++ b/sprockets.{{cookiecutter.project_name}}/docs/history.rst @@ -0,0 +1,5 @@ +Version History +--------------- +- 0.0.0 [YYYY-MM-DD] + - Change 1 + - Change 2 \ No newline at end of file diff --git a/sprockets.{{cookiecutter.project_name}}/docs/index.rst b/sprockets.{{cookiecutter.project_name}}/docs/index.rst new file mode 100644 index 0000000..8d3725c --- /dev/null +++ b/sprockets.{{cookiecutter.project_name}}/docs/index.rst @@ -0,0 +1,66 @@ +sprockets.{{ cookiecutter.project_name }} +{{ '=' * (10 + cookiecutter.project_name|length) }} +{{ cookiecutter.description }} + +|Version| |Downloads| |Status| |Coverage| |License| + +Installation +------------ +``sprockets.{{ cookiecutter.project_name }}`` is available on the +`Python Package Index `_ +and can be installed via ``pip`` or ``easy_install``: + +.. code:: bash + + pip install sprockets.{{ cookiecutter.project_name }} + +Requirements +------------ +@TODO: Put full requirements list here, should match requirements.text +- `sprockets `_ + +API Documentation +----------------- +.. toctree:: + :maxdepth: 2 + + api + examples + +Version History +--------------- +See :doc:`history` + +Issues +------ +Please report any issues to the Github project at `https://github.com/sprockets/sprockets.{{ cookiecutter.project_name }}/issues `_ + +Source +------ +sprockets.{{ cookiecutter.project_name }} source is available on Github at `https://github.com/sprockets/sprockets.{{ cookiecutter.project_name }} `_ + +License +------- +sprockets.{{ cookiecutter.project_name }} is released under the `3-Clause BSD license `_. + +Indices and tables +------------------ + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + +.. |Version| image:: https://badge.fury.io/py/sprockets.{{ cookiecutter.project_name }}.svg? + :target: http://badge.fury.io/py/sprockets.{{ cookiecutter.project_name }} + +.. |Status| image:: https://travis-ci.org/sprockets/sprockets.{{ cookiecutter.project_name }}.svg?branch=master + :target: https://travis-ci.org/sprockets/sprockets.{{ cookiecutter.project_name }} + +.. |Coverage| image:: https://coveralls.io/repos/sprockets/sprockets.{{ cookiecutter.project_name }}.svg? + :target: https://coveralls.io/r/sprockets/sprockets.{{ cookiecutter.project_name }} + +.. |Downloads| image:: https://pypip.in/d/sprockets.{{ cookiecutter.project_name }}/badge.svg? + :target: https://pypi.python.org/pypi/sprockets.{{ cookiecutter.project_name }} + +.. |License| image:: https://pypip.in/license/sprockets.{{ cookiecutter.project_name }}/badge.svg? + :target: https://sprockets{{ cookiecutter.project_name.replace('.', '') }}.readthedocs.org diff --git a/sprockets.{{cookiecutter.project_name}}/requirements.txt b/sprockets.{{cookiecutter.project_name}}/requirements.txt index f479d8c..e69de29 100644 --- a/sprockets.{{cookiecutter.project_name}}/requirements.txt +++ b/sprockets.{{cookiecutter.project_name}}/requirements.txt @@ -1 +0,0 @@ -tornado>=4,<5 diff --git a/sprockets.{{cookiecutter.project_name}}/setup.cfg b/sprockets.{{cookiecutter.project_name}}/setup.cfg index ae34edc..ebd242f 100644 --- a/sprockets.{{cookiecutter.project_name}}/setup.cfg +++ b/sprockets.{{cookiecutter.project_name}}/setup.cfg @@ -1,19 +1,12 @@ -[bdist_wheel] -universal = 1 - [build_sphinx] all-files = 1 -source-dir = doc -build-dir = build/doc +source-dir = docs +build-dir = build/docs [nosetests] -match = should_ -include = _tests with-coverage = 1 -cover-package = sprockets.{{cookiecutter.project_name}},tests -nocapture = 1 +cover-package = sprockets.{{cookiecutter.project_name}} verbose = 1 [flake8] -exclude = build,dist,doc,env - +exclude = build,dist,docs,env diff --git a/sprockets.{{cookiecutter.project_name}}/setup.py b/sprockets.{{cookiecutter.project_name}}/setup.py index c41bc81..ee13b88 100644 --- a/sprockets.{{cookiecutter.project_name}}/setup.py +++ b/sprockets.{{cookiecutter.project_name}}/setup.py @@ -25,8 +25,6 @@ setup_requires = read_requirements_file('setup-requirements.txt') tests_require = read_requirements_file('test-requirements.txt') if sys.version_info < (2, 7): - install_requires.append('argparse') - install_requires.append('logutils') tests_require.append('unittest2') if sys.version_info < (3, 0): tests_require.append('mock') @@ -41,19 +39,32 @@ setuptools.setup( author_email='{{cookiecutter.email}}', license=codecs.open('LICENSE', encoding='utf-8').read(), classifiers=[ - 'Development Status :: 3 - Alpha', + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', + 'Natural Language :: English', + 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', + 'Topic :: Software Development :: Libraries', + 'Topic :: Software Development :: Libraries :: Python Modules' ], - packages=setuptools.find_packages( - exclude=['*.tests', '*.tests.*', 'tests.*', 'tests']), - namespace_packages=['sprockets'], + packages=['sprockets', + 'sprockets.{{cookiecutter.project_name.split('.')[0]}}', + 'sprockets.{{cookiecutter.project_name}}'], + package_data={'': ['LICENSE', 'README.md']}, + include_package_data=True, + namespace_packages=['sprockets', + 'sprockets.{{cookiecutter.project_name.split('.')[0]}}'], install_requires=install_requires, setup_requires=setup_requires, tests_require=tests_require, - zip_safe=True, -) + test_suite='nose.collector', + zip_safe=False) diff --git a/sprockets.{{cookiecutter.project_name}}/sprockets/{{cookiecutter.project_name.split('.')[0]}}/__init__.py b/sprockets.{{cookiecutter.project_name}}/sprockets/{{cookiecutter.project_name.split('.')[0]}}/__init__.py new file mode 100644 index 0000000..de40ea7 --- /dev/null +++ b/sprockets.{{cookiecutter.project_name}}/sprockets/{{cookiecutter.project_name.split('.')[0]}}/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/sprockets.{{cookiecutter.project_name}}/sprockets/{{cookiecutter.project_name}}/__init__.py b/sprockets.{{cookiecutter.project_name}}/sprockets/{{cookiecutter.project_name.split('.')[0]}}/{{cookiecutter.project_name.split('.')[-1]}}/__init__.py similarity index 53% rename from sprockets.{{cookiecutter.project_name}}/sprockets/{{cookiecutter.project_name}}/__init__.py rename to sprockets.{{cookiecutter.project_name}}/sprockets/{{cookiecutter.project_name.split('.')[0]}}/{{cookiecutter.project_name.split('.')[-1]}}/__init__.py index 2e4dd40..42f8cb5 100644 --- a/sprockets.{{cookiecutter.project_name}}/sprockets/{{cookiecutter.project_name}}/__init__.py +++ b/sprockets.{{cookiecutter.project_name}}/sprockets/{{cookiecutter.project_name.split('.')[0]}}/{{cookiecutter.project_name.split('.')[-1]}}/__init__.py @@ -1,2 +1,8 @@ +""" +{{cookiecutter.project_name}} + +{{cookiecutter.description}} + +""" version_info = (0, 0, 0) __version__ = '.'.join(str(v) for v in version_info) diff --git a/sprockets.{{cookiecutter.project_name}}/test-requirements.txt b/sprockets.{{cookiecutter.project_name}}/test-requirements.txt index ad33c1c..20b57db 100644 --- a/sprockets.{{cookiecutter.project_name}}/test-requirements.txt +++ b/sprockets.{{cookiecutter.project_name}}/test-requirements.txt @@ -1,2 +1,3 @@ +coverage>=3.7,<4 coveralls>=0.4,<1 nose>=1.3,<2 diff --git a/sprockets.{{cookiecutter.project_name}}/tests.py b/sprockets.{{cookiecutter.project_name}}/tests.py new file mode 100644 index 0000000..74ce6df --- /dev/null +++ b/sprockets.{{cookiecutter.project_name}}/tests.py @@ -0,0 +1,13 @@ +""" +Tests for the sprockets.{{cookiecutter.project_name}} package + +""" +import mock +try: + import unittest2 as unittest +except ImportError: + import unittest + + +class MyTest(unittest.TestCase): + pass diff --git a/sprockets.{{cookiecutter.project_name}}/tests/__init__.py b/sprockets.{{cookiecutter.project_name}}/tests/__init__.py deleted file mode 100644 index e69de29..0000000