File tree Expand file tree Collapse file tree 6 files changed +35
-29
lines changed Expand file tree Collapse file tree 6 files changed +35
-29
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,7 @@ develop:
20
20
@sh -c " if [ '${DJANGO} ' = '1.9.x' ]; then pip install 'django>=1.9,<1.10'; fi"
21
21
@sh -c " if [ '${DJANGO} ' = 'last' ]; then pip install django; fi"
22
22
@sh -c " if [ '${DJANGO} ' = 'dev' ]; then pip install git+git://github.com/django/django.git; fi"
23
- @pip install -qr requirements/tests.pip
24
- @pip install -qr requirements/develop.pip
23
+ @pip install -e .[dev]
25
24
$(MAKE ) .init-db
26
25
27
26
36
35
py.test -v
37
36
38
37
clean :
39
- rm -fr ${BUILDDIR} dist * .egg-info .coverage
38
+ rm -fr ${BUILDDIR} dist * .egg-info .coverage coverage.xml
40
39
find src -name __pycache__ -o -name " *.py?" -o -name " *.orig" -prune | xargs rm -rf
41
40
find src/concurrency/locale -name django.mo | xargs rm -f
42
41
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 17
17
18
18
19
19
class PyTest (TestCommand ):
20
+
20
21
def finalize_options (self ):
21
22
TestCommand .finalize_options (self )
22
23
self .test_args = ['tests' ]
@@ -57,6 +58,27 @@ def run(self):
57
58
remove_tree (self .build_help , dry_run = self .dry_run )
58
59
CleanCommand .run (self )
59
60
61
+ install_requires = ["django" ]
62
+ test_requires = ["django-webtest>=1.7.5" ,
63
+ "mock>=1.0.1" ,
64
+ "pytest-cache>=1.0" ,
65
+ "pytest-cov>=1.6" ,
66
+ "pytest-django>=2.8" ,
67
+ "pytest-echo>=1.3" ,
68
+ "pytest-pythonpath" ,
69
+ "pytest>=2.8" ,
70
+ "tox>=2.3" ,
71
+ "WebTest>=2.0.11" ]
72
+
73
+ dev_requires = ["autopep8" ,
74
+ "coverage" ,
75
+ "django_extensions" ,
76
+ "flake8" ,
77
+ "ipython" ,
78
+ "pdbpp" ,
79
+ "psycopg2" ,
80
+ "sphinx" ]
81
+
60
82
setup (
61
83
name = app .NAME ,
62
84
version = app .get_version (),
@@ -71,6 +93,9 @@ def run(self):
71
93
license = 'MIT License' ,
72
94
keywords = 'django' ,
73
95
install_requires = install_requires ,
96
+ tests_require = test_requires ,
97
+ extras_require = {'test' : test_requires ,
98
+ 'dev' : test_requires + dev_requires },
74
99
cmdclass = {'test' : PyTest },
75
100
classifiers = [
76
101
'Development Status :: 5 - Production/Stable' ,
Original file line number Diff line number Diff line change @@ -21,9 +21,13 @@ setenv =
21
21
mysql: DBENGINE = mysql
22
22
sqlite: DBENGINE = sqlite
23
23
24
+ envdir =
25
+ py27: {toxworkdir}/27
26
+ py33: {toxworkdir}/33
27
+ py34: {toxworkdir}/34
28
+ py35: {toxworkdir}/35
29
+
24
30
deps =
25
- -rrequirements/tests.pip
26
- ; psycopg2>=2.6.1
27
31
py{27,33,34,35}: psycopg2>=2.6.1
28
32
py{py}-pg: psycopg2cffi
29
33
mysql: MySQL-python
44
48
commands =
45
49
mysql: - mysql -u root -e ' CREATE DATABASE IF NOT EXISTS concurrency;'
46
50
pg: - psql -c ' CREATE DATABASE "concurrency";' -U postgres
47
- py. test tests -rw --create-db {posargs}
48
-
51
+ pip install -e .[ test] -q --log ={envlogdir}/pip-extra-install.log
52
+ py.test tests -v -rw --create-db {posargs}
49
53
50
54
[testenv:clean]
51
55
commands =
You can’t perform that action at this time.
0 commit comments