Skip to content

Commit c39d527

Browse files
committed
moves requirements into setup.py
1 parent 40f7d42 commit c39d527

File tree

6 files changed

+35
-29
lines changed

6 files changed

+35
-29
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ develop:
2020
@sh -c "if [ '${DJANGO}' = '1.9.x' ]; then pip install 'django>=1.9,<1.10'; fi"
2121
@sh -c "if [ '${DJANGO}' = 'last' ]; then pip install django; fi"
2222
@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]
2524
$(MAKE) .init-db
2625

2726

@@ -36,7 +35,7 @@ test:
3635
py.test -v
3736

3837
clean:
39-
rm -fr ${BUILDDIR} dist *.egg-info .coverage
38+
rm -fr ${BUILDDIR} dist *.egg-info .coverage coverage.xml
4039
find src -name __pycache__ -o -name "*.py?" -o -name "*.orig" -prune | xargs rm -rf
4140
find src/concurrency/locale -name django.mo | xargs rm -f
4241

requirements/develop.pip

Lines changed: 0 additions & 9 deletions
This file was deleted.

requirements/docs.pip

Lines changed: 0 additions & 2 deletions
This file was deleted.

requirements/tests.pip

Lines changed: 0 additions & 11 deletions
This file was deleted.

setup.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818

1919
class PyTest(TestCommand):
20+
2021
def finalize_options(self):
2122
TestCommand.finalize_options(self)
2223
self.test_args = ['tests']
@@ -57,6 +58,27 @@ def run(self):
5758
remove_tree(self.build_help, dry_run=self.dry_run)
5859
CleanCommand.run(self)
5960

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+
6082
setup(
6183
name=app.NAME,
6284
version=app.get_version(),
@@ -71,6 +93,9 @@ def run(self):
7193
license='MIT License',
7294
keywords='django',
7395
install_requires=install_requires,
96+
tests_require=test_requires,
97+
extras_require={'test': test_requires,
98+
'dev': test_requires + dev_requires},
7499
cmdclass={'test': PyTest},
75100
classifiers=[
76101
'Development Status :: 5 - Production/Stable',

tox.ini

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ setenv =
2121
mysql: DBENGINE = mysql
2222
sqlite: DBENGINE = sqlite
2323

24+
envdir =
25+
py27: {toxworkdir}/27
26+
py33: {toxworkdir}/33
27+
py34: {toxworkdir}/34
28+
py35: {toxworkdir}/35
29+
2430
deps=
25-
-rrequirements/tests.pip
26-
; psycopg2>=2.6.1
2731
py{27,33,34,35}: psycopg2>=2.6.1
2832
py{py}-pg: psycopg2cffi
2933
mysql: MySQL-python
@@ -44,8 +48,8 @@ deps=
4448
commands =
4549
mysql: - mysql -u root -e 'CREATE DATABASE IF NOT EXISTS concurrency;'
4650
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}
4953

5054
[testenv:clean]
5155
commands =

0 commit comments

Comments
 (0)