mirror of
https://github.com/jazzband/django-downloadview.git
synced 2026-05-10 08:35:05 +00:00
Using tox in development environment. Makefile no longer uses buildout or virtualenv. Dropped tests for Python 2.6. Closes #74.
This commit is contained in:
commit
6232fcb736
24 changed files with 133 additions and 206 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
|
@ -12,6 +12,13 @@
|
|||
*.pyo
|
||||
*.egg-info
|
||||
|
||||
# Tox files.
|
||||
/.tox/
|
||||
|
||||
# Virtualenv files (created by tox).
|
||||
/build/
|
||||
/dist/
|
||||
|
||||
# Editors' temporary buffers.
|
||||
.*.swp
|
||||
*~
|
||||
|
|
|
|||
13
.travis.yml
13
.travis.yml
|
|
@ -1,5 +1,10 @@
|
|||
language: python
|
||||
python:
|
||||
- "2.7"
|
||||
install: make configure develop
|
||||
script: make test
|
||||
env:
|
||||
- TOXENV=py27
|
||||
- TOXENV=flake8
|
||||
- TOXENV=sphinx
|
||||
- TOXENV=readme
|
||||
install:
|
||||
- pip install tox
|
||||
script:
|
||||
- tox
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ future releases, check `milestones`_ and :doc:`/about/vision`.
|
|||
1.6 (unreleased)
|
||||
----------------
|
||||
|
||||
- Nothing changed yet.
|
||||
- Feature #74: the Makefile in project's repository no longer creates a
|
||||
virtualenv. Developers setup the environment as they like, i.e. using
|
||||
virtualenv, virtualenvwrapper or whatever. Tests are run with tox.
|
||||
|
||||
|
||||
1.5 (2013-11-29)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
###########################
|
||||
Contributing to the project
|
||||
###########################
|
||||
############
|
||||
Contributing
|
||||
############
|
||||
|
||||
This document provides guidelines for people who want to contribute to the
|
||||
project.
|
||||
This document provides guidelines for people who want to contribute to
|
||||
`django-downloadview`.
|
||||
|
||||
|
||||
**************
|
||||
|
|
@ -42,13 +42,8 @@ Fork and branch
|
|||
Setup a development environment
|
||||
*******************************
|
||||
|
||||
System requirements:
|
||||
|
||||
* `Python`_ version 2.7, available as ``python`` command
|
||||
|
||||
* `Virtualenv`_ version >= 1.9.1, available as ``virtualenv`` command
|
||||
|
||||
* make and wget to use the provided :file:`Makefile`.
|
||||
System requirements: `Python`_ version 2.7 and `tox`_ (you may use a
|
||||
`Virtualenv`_).
|
||||
|
||||
Execute:
|
||||
|
||||
|
|
@ -68,8 +63,7 @@ The Makefile
|
|||
|
||||
A :file:`Makefile` is provided to ease development. Use it to:
|
||||
|
||||
* setup the development environment: ``make develop``
|
||||
* update it, as an example, after a pull: ``make update``
|
||||
* setup a minimal development environment: ``make develop``
|
||||
* run tests: ``make test``
|
||||
* build documentation: ``make documentation``
|
||||
|
||||
|
|
@ -85,9 +79,7 @@ The :doc:`/demo` is part of the tests. Maintain it along with code and
|
|||
documentation.
|
||||
|
||||
|
||||
**********
|
||||
References
|
||||
**********
|
||||
.. rubric:: Notes & references
|
||||
|
||||
.. target-notes::
|
||||
|
||||
|
|
@ -96,6 +88,7 @@ References
|
|||
.. _`rebase`: http://git-scm.com/book/en/Git-Branching-Rebasing
|
||||
.. _`merge-based rebase`: http://tech.novapost.fr/psycho-rebasing-en.html
|
||||
.. _`Python`: http://python.org
|
||||
.. _`tox`: http://tox.testrun.org
|
||||
.. _`Virtualenv`: http://virtualenv.org
|
||||
.. _`style guide for Sphinx-based documentations`:
|
||||
http://documentation-style-guide-sphinx.readthedocs.org/
|
||||
20
INSTALL
20
INSTALL
|
|
@ -4,11 +4,12 @@ Install
|
|||
|
||||
.. note::
|
||||
|
||||
If you want to install a development environment, please see :doc:`/dev`.
|
||||
If you want to install a development environment, please see
|
||||
:doc:`/contributing`.
|
||||
|
||||
System requirements:
|
||||
|
||||
* Python 2.7
|
||||
* Python version 2.7
|
||||
|
||||
Install the package with your favorite Python installer. As an example, with
|
||||
pip:
|
||||
|
|
@ -22,7 +23,7 @@ the following requirements:
|
|||
|
||||
.. literalinclude:: /../setup.py
|
||||
:language: python
|
||||
:lines: 35
|
||||
:lines: 39
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
@ -30,19 +31,6 @@ the following requirements:
|
|||
:py:class:`~django.http.StreamingHttpResponse`.
|
||||
|
||||
|
||||
**************************
|
||||
Known good set of versions
|
||||
**************************
|
||||
|
||||
`django-downloadview` has been tested in an environment with the following set
|
||||
of versions. If something is going wrong with other versions, please report it
|
||||
in `django-downloadview's bugtracker`_.
|
||||
|
||||
.. literalinclude:: /../etc/buildout.cfg
|
||||
:language: ini
|
||||
:lines: 67-
|
||||
|
||||
|
||||
.. rubric:: Notes & references
|
||||
|
||||
.. seealso::
|
||||
|
|
|
|||
2
LICENSE
2
LICENSE
|
|
@ -2,7 +2,7 @@
|
|||
License
|
||||
#######
|
||||
|
||||
Copyright (c) 2012-2013, Benoît Bryon.
|
||||
Copyright (c) 2012-2014, Benoît Bryon.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
recursive-include django_downloadview *
|
||||
global-exclude *.pyc .*.swp
|
||||
include *.txt
|
||||
include AUTHORS CHANGELOG INSTALL LICENSE README VERSION
|
||||
include AUTHORS CHANGELOG CONTRIBUTING.rst INSTALL LICENSE README.rst VERSION
|
||||
|
|
|
|||
90
Makefile
90
Makefile
|
|
@ -1,95 +1,65 @@
|
|||
# Makefile for development.
|
||||
# See INSTALL and docs/dev.txt for details.
|
||||
SHELL = /bin/bash
|
||||
ROOT_DIR = $(shell pwd)
|
||||
BIN_DIR = $(ROOT_DIR)/bin
|
||||
DATA_DIR = $(ROOT_DIR)/var
|
||||
VIRTUALENV_DIR = $(ROOT_DIR)/lib/virtualenv
|
||||
PIP = $(VIRTUALENV_DIR)/bin/pip
|
||||
WGET = wget
|
||||
PYTHON = $(VIRTUALENV_DIR)/bin/python
|
||||
PROJECT = $(shell $(PYTHON) -c "import setup; print setup.NAME")
|
||||
PACKAGE = $(shell $(PYTHON) -c "import setup; print setup.PACKAGES[0]")
|
||||
BUILDOUT_CFG = $(ROOT_DIR)/etc/buildout.cfg
|
||||
BUILDOUT_DIR = $(ROOT_DIR)/lib/buildout
|
||||
BUILDOUT_VERSION = 2.2.1
|
||||
BUILDOUT_BOOTSTRAP_URL = https://raw.github.com/buildout/buildout/$(BUILDOUT_VERSION)/bootstrap/bootstrap.py
|
||||
BUILDOUT_BOOTSTRAP = $(BUILDOUT_DIR)/bootstrap.py
|
||||
BUILDOUT_BOOTSTRAP_ARGS = -c $(BUILDOUT_CFG) --version=$(BUILDOUT_VERSION) buildout:directory=$(ROOT_DIR)
|
||||
BUILDOUT = $(BIN_DIR)/buildout
|
||||
BUILDOUT_ARGS = -N -c $(BUILDOUT_CFG) buildout:directory=$(ROOT_DIR)
|
||||
NOSE = $(BIN_DIR)/nosetests
|
||||
# Reference card for usual actions in development environment.
|
||||
#
|
||||
# For standard installation of hospital as a library, see INSTALL.
|
||||
# For details about hospital's development environment, see CONTRIBUTING.rst.
|
||||
|
||||
|
||||
configure:
|
||||
# Configuration is stored in etc/ folder. Not generated yet.
|
||||
|
||||
|
||||
develop: buildout
|
||||
|
||||
|
||||
virtualenv:
|
||||
if [ ! -d $(VIRTUALENV_DIR)/bin/ ]; then virtualenv --no-site-packages $(VIRTUALENV_DIR); fi
|
||||
$(PIP) install -r $(ROOT_DIR)/etc/virtualenv.cfg
|
||||
|
||||
buildout: virtualenv
|
||||
if [ ! -d $(BUILDOUT_DIR) ]; then mkdir -p $(BUILDOUT_DIR); fi
|
||||
if [ ! -f $(BUILDOUT_BOOTSTRAP) ]; then wget -O $(BUILDOUT_BOOTSTRAP) $(BUILDOUT_BOOTSTRAP_URL); fi
|
||||
if [ ! -x $(BUILDOUT) ]; then $(PYTHON) $(BUILDOUT_BOOTSTRAP) $(BUILDOUT_BOOTSTRAP_ARGS); fi
|
||||
$(BUILDOUT) $(BUILDOUT_ARGS)
|
||||
develop:
|
||||
pip install tox zest.releaser
|
||||
pip install -e ./
|
||||
pip install -e ./demo/
|
||||
|
||||
|
||||
clean:
|
||||
find $(ROOT_DIR)/ -name "*.pyc" -delete
|
||||
find $(ROOT_DIR)/ -name ".noseids" -delete
|
||||
find . -name "*.pyc" -delete
|
||||
find . -name ".noseids" -delete
|
||||
|
||||
|
||||
distclean: clean
|
||||
rm -rf $(ROOT_DIR)/*.egg-info
|
||||
rm -rf $(ROOT_DIR)/demo/*.egg-info
|
||||
rm -rf *.egg-info
|
||||
rm -rf demo/*.egg-info
|
||||
|
||||
|
||||
maintainer-clean: distclean
|
||||
rm -rf $(BIN_DIR)/
|
||||
rm -rf $(ROOT_DIR)/lib/
|
||||
rm -rf bin/
|
||||
rm -rf lib/
|
||||
rm -rf build/
|
||||
rm -rf dist/
|
||||
rm -rf .tox/
|
||||
|
||||
|
||||
test: test-app test-demo test-documentation
|
||||
test:
|
||||
tox
|
||||
|
||||
|
||||
test-app:
|
||||
$(NOSE) -c $(ROOT_DIR)/etc/nose/base.cfg -c $(ROOT_DIR)/etc/nose/$(PACKAGE).cfg
|
||||
mv $(ROOT_DIR)/.coverage $(ROOT_DIR)/var/test/app.coverage
|
||||
tox -e py27
|
||||
|
||||
|
||||
test-demo:
|
||||
$(BIN_DIR)/demo test --nose-verbosity=2
|
||||
mv $(ROOT_DIR)/.coverage $(ROOT_DIR)/var/test/demo.coverage
|
||||
|
||||
|
||||
test-documentation:
|
||||
$(NOSE) -c $(ROOT_DIR)/etc/nose/base.cfg sphinxcontrib.testbuild.tests
|
||||
tox -e demo
|
||||
|
||||
|
||||
sphinx:
|
||||
make --directory=docs clean html doctest
|
||||
tox -e sphinx
|
||||
|
||||
|
||||
documentation: sphinx
|
||||
|
||||
|
||||
demo: develop
|
||||
$(BIN_DIR)/demo syncdb --noinput
|
||||
demo syncdb --noinput
|
||||
# Install fixtures.
|
||||
mkdir -p var/media
|
||||
cp -r $(ROOT_DIR)/demo/demoproject/fixtures var/media/object
|
||||
cp -r $(ROOT_DIR)/demo/demoproject/fixtures var/media/object-other
|
||||
cp -r $(ROOT_DIR)/demo/demoproject/fixtures var/media/nginx
|
||||
$(BIN_DIR)/demo loaddata demo.json
|
||||
cp -r demo/demoproject/fixtures var/media/object
|
||||
cp -r demo/demoproject/fixtures var/media/object-other
|
||||
cp -r demo/demoproject/fixtures var/media/nginx
|
||||
demo loaddata demo.json
|
||||
|
||||
|
||||
runserver: demo
|
||||
$(BIN_DIR)/demo runserver
|
||||
demo runserver
|
||||
|
||||
|
||||
release:
|
||||
$(BIN_DIR)/fullrelease
|
||||
fullrelease
|
||||
|
|
|
|||
|
|
@ -8,8 +8,9 @@ from django_downloadview.lighttpd import x_sendfile
|
|||
|
||||
|
||||
storage_dir = os.path.join(settings.MEDIA_ROOT, 'lighttpd')
|
||||
storage = FileSystemStorage(location=storage_dir,
|
||||
base_url=''.join([settings.MEDIA_URL, 'lighttpd/']))
|
||||
storage = FileSystemStorage(
|
||||
location=storage_dir,
|
||||
base_url=''.join([settings.MEDIA_URL, 'lighttpd/']))
|
||||
|
||||
|
||||
optimized_by_middleware = StorageDownloadView.as_view(storage=storage,
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ import sys
|
|||
|
||||
from django.core.management import execute_from_command_line
|
||||
|
||||
|
||||
def main():
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "%s.settings" % __package__)
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE",
|
||||
"{package}.settings".format(package=__package__))
|
||||
execute_from_command_line(sys.argv)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ URL = 'https://{name}.readthedocs.org/'.format(name=NAME)
|
|||
CLASSIFIERS = ['Development Status :: 4 - Beta',
|
||||
'License :: OSI Approved :: BSD License',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Framework :: Django']
|
||||
KEYWORDS = []
|
||||
PACKAGES = ['demoproject']
|
||||
|
|
|
|||
|
|
@ -203,7 +203,6 @@ class VirtualFile(File):
|
|||
yield buffer_
|
||||
|
||||
|
||||
|
||||
class HTTPFile(File):
|
||||
"""Wrapper for files that live on remote HTTP servers.
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class StringIteratorIO(io.TextIOBase):
|
|||
|
||||
Original code by Matt Joiner <anacrolix@gmail.com> from:
|
||||
|
||||
* http://stackoverflow.com/questions/12593576/adapt-an-iterator-to-behave-like-a-file-like-object-in-python
|
||||
* http://stackoverflow.com/questions/12593576/
|
||||
* https://gist.github.com/anacrolix/3788413
|
||||
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -136,8 +136,8 @@ class DownloadResponse(StreamingHttpResponse):
|
|||
generator-iterator) that produces the output in a block-by-block
|
||||
fashion.
|
||||
|
||||
* `Django WSGI handler (application implementation) return response object
|
||||
<https://github.com/django/django/blob/fd1279a44df3b9a837453cd79fd0fbcf81bae39d/django/core/handlers/wsgi.py#L268>`_.
|
||||
* Django WSGI handler (application implementation) returns response object
|
||||
(see :mod:`django.core.handlers.wsgi`).
|
||||
|
||||
* :class:`django.http.HttpResponse` and subclasses are iterators.
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ class DownloadResponse(StreamingHttpResponse):
|
|||
|
||||
``Content-Disposition`` header is encoded according to `RFC 5987
|
||||
<http://tools.ietf.org/html/rfc5987>`_. See also
|
||||
http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http.
|
||||
http://stackoverflow.com/questions/93551/.
|
||||
|
||||
"""
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class temporary_media_root(override_settings):
|
|||
Use this function as a context manager:
|
||||
|
||||
>>> from django_downloadview.test import temporary_media_root
|
||||
>>> from django.conf import settings
|
||||
>>> from django.conf import settings # NoQA
|
||||
>>> global_media_root = settings.MEDIA_ROOT
|
||||
>>> with temporary_media_root():
|
||||
... global_media_root == settings.MEDIA_ROOT
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = ../bin/sphinx-build
|
||||
SPHINXBUILD = sphinx-build -W # Turn warnings into errors.
|
||||
PAPER =
|
||||
BUILDDIR = ../var/docs
|
||||
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ html_theme = 'default'
|
|||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
html_static_path = []
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
|
|
|
|||
1
docs/contributing.txt
Normal file
1
docs/contributing.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
.. include:: ../CONTRIBUTING.rst
|
||||
|
|
@ -21,4 +21,4 @@ Contents
|
|||
django-sendfile
|
||||
demo
|
||||
about/index
|
||||
dev
|
||||
contributing
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ Let's consider the following view:
|
|||
|
||||
.. literalinclude:: /../demo/demoproject/lighttpd/views.py
|
||||
:language: python
|
||||
:lines: 1-6, 8-16
|
||||
:lines: 1-6, 8-17
|
||||
|
||||
What is important here is that the files will have an ``url`` property
|
||||
implemented by storage. Let's setup an optimization rule based on that URL.
|
||||
|
|
@ -97,7 +97,7 @@ As an example:
|
|||
|
||||
.. literalinclude:: /../demo/demoproject/lighttpd/views.py
|
||||
:language: python
|
||||
:lines: 1-7, 17-
|
||||
:lines: 1-7, 18-
|
||||
|
||||
|
||||
*************************************
|
||||
|
|
|
|||
|
|
@ -1,86 +0,0 @@
|
|||
# Buildout configuration file to deploy a development environment.
|
||||
|
||||
[buildout]
|
||||
# Version management.
|
||||
show-picked-versions = true
|
||||
# Configure directories: put buildout generated files in lib/buildout instead
|
||||
# of in current directory.
|
||||
bin-directory = bin
|
||||
develop-eggs-directory = lib/buildout/develop-eggs
|
||||
eggs-directory = lib/buildout/eggs
|
||||
installed = lib/buildout/.installed.cfg
|
||||
parts-directory = lib/buildout/parts
|
||||
# Package index, mirrors, allowed hosts and dependency links. Those options
|
||||
# control locations where buildout looks for packages.
|
||||
index = https://simple.crate.io
|
||||
find-links =
|
||||
allow-hosts =
|
||||
*.crate.io
|
||||
packages.crate-cdn.com
|
||||
use-dependency-links = false
|
||||
# Development.
|
||||
develop =
|
||||
${buildout:directory}/
|
||||
${buildout:directory}/demo/
|
||||
parts =
|
||||
scripts
|
||||
directories
|
||||
releaser
|
||||
activate
|
||||
omelette
|
||||
|
||||
[scripts]
|
||||
recipe = zc.recipe.egg
|
||||
eggs =
|
||||
django-downloadview-demo
|
||||
mock
|
||||
bpython
|
||||
nose
|
||||
rednose
|
||||
coverage
|
||||
sphinx
|
||||
sphinxcontrib-testbuild
|
||||
initialization =
|
||||
import os
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'demoproject.settings'
|
||||
|
||||
[directories]
|
||||
recipe = z3c.recipe.mkdir
|
||||
paths =
|
||||
var/docs
|
||||
docs/_static
|
||||
var/test
|
||||
|
||||
[releaser]
|
||||
recipe = zc.recipe.egg
|
||||
eggs = zest.releaser
|
||||
|
||||
[activate]
|
||||
recipe = evg.recipe.activate
|
||||
|
||||
[omelette]
|
||||
recipe = collective.recipe.omelette
|
||||
eggs = ${scripts:eggs}
|
||||
location = ${buildout:directory}/lib/omelette
|
||||
|
||||
[versions]
|
||||
bpython = 0.12
|
||||
collective.recipe.omelette = 0.16
|
||||
coverage = 3.7
|
||||
Django = 1.6
|
||||
django-nose = 1.2
|
||||
docutils = 0.11
|
||||
evg.recipe.activate = 0.5
|
||||
Jinja2 = 2.7.1
|
||||
MarkupSafe = 0.18
|
||||
mock = 1.0.1
|
||||
nose = 1.3.0
|
||||
Pygments = 1.6
|
||||
python-termstyle = 0.1.10
|
||||
rednose = 0.4.1
|
||||
requests = 2.0.1
|
||||
Sphinx = 1.1.3
|
||||
sphinxcontrib-testbuild = 0.1.3
|
||||
z3c.recipe.mkdir = 0.6
|
||||
zc.recipe.egg = 2.0.1
|
||||
zest.releaser = 3.48
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
--index-url https://simple.crate.io
|
||||
pip==1.4.1
|
||||
setuptools==1.4.1
|
||||
9
setup.py
9
setup.py
|
|
@ -1,11 +1,15 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Python packaging."""
|
||||
import os
|
||||
import sys
|
||||
|
||||
from setuptools import setup
|
||||
|
||||
|
||||
#: Absolute path to directory containing setup.py file.
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
#: Boolean, ``True`` if environment is running Python version 2.
|
||||
IS_PYTHON2 = sys.version_info[0] == 2
|
||||
|
||||
|
||||
NAME = 'django-downloadview'
|
||||
|
|
@ -13,12 +17,11 @@ DESCRIPTION = 'Serve files with Django and reverse-proxies.'
|
|||
README = open(os.path.join(here, 'README.rst')).read()
|
||||
VERSION = open(os.path.join(here, 'VERSION')).read().strip()
|
||||
AUTHOR = u'Benoît Bryon'
|
||||
EMAIL = u'benoit@marmelune.net'
|
||||
EMAIL = 'benoit@marmelune.net'
|
||||
URL = 'https://{name}.readthedocs.org/'.format(name=NAME)
|
||||
CLASSIFIERS = ['Development Status :: 4 - Beta',
|
||||
'License :: OSI Approved :: BSD License',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Framework :: Django']
|
||||
KEYWORDS = ['file',
|
||||
'stream',
|
||||
|
|
@ -33,6 +36,8 @@ KEYWORDS = ['file',
|
|||
'offload']
|
||||
PACKAGES = [NAME.replace('-', '_')]
|
||||
REQUIREMENTS = ['setuptools', 'Django>=1.5', 'requests']
|
||||
if IS_PYTHON2:
|
||||
REQUIREMENTS.append('mock')
|
||||
ENTRY_POINTS = {}
|
||||
|
||||
|
||||
|
|
|
|||
44
tox.ini
Normal file
44
tox.ini
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
[tox]
|
||||
envlist = py27,flake8,sphinx,readme
|
||||
|
||||
[testenv]
|
||||
deps =
|
||||
nose
|
||||
rednose
|
||||
coverage
|
||||
commands =
|
||||
pip install -e ./
|
||||
pip install -e demo/
|
||||
demo test --nose-verbosity=2 -c etc/nose/base.cfg -c etc/nose/django_downloadview.cfg django_downloadview
|
||||
demo test --nose-verbosity=2 demoproject
|
||||
rm .coverage
|
||||
pip freeze
|
||||
whitelist_externals =
|
||||
rm
|
||||
|
||||
[testenv:flake8]
|
||||
deps =
|
||||
flake8
|
||||
commands =
|
||||
flake8 django_downloadview/
|
||||
flake8 demo/demoproject/
|
||||
|
||||
[testenv:sphinx]
|
||||
deps =
|
||||
nose
|
||||
rednose
|
||||
Sphinx
|
||||
commands =
|
||||
make --directory=docs clean html doctest
|
||||
whitelist_externals =
|
||||
make
|
||||
|
||||
[testenv:readme]
|
||||
deps =
|
||||
docutils
|
||||
pygments
|
||||
commands =
|
||||
mkdir -p var/docs
|
||||
rst2html.py --exit-status=2 README.rst var/docs/README.html
|
||||
whitelist_externals =
|
||||
mkdir
|
||||
Loading…
Reference in a new issue