Permalink
Browse files

Changed how we install python dependencies for development.

Now to install thumbor locally for development, one should use `make
setup` or `pip install -e .[tests]`.

All the test requirements have been moved to setup.py extras.
  • Loading branch information...
1 parent c9d9100 commit fbc24863f08e1175ba303a186382e9fc47975494 @heynemann heynemann committed Sep 25, 2013
Showing with 32 additions and 7 deletions.
  1. +1 −1 .travis.yml
  2. +9 −6 Makefile
  3. +22 −0 setup.py
View
@@ -26,7 +26,7 @@ install:
- INSTALLDIR=$(python -c "import os; import numpy; print(os.path.dirname(numpy.__file__))")
# install python requirements
- - pip install -U -r test_requirements.txt --use-mirrors
+ - make setup
script:
# finally run tests
View
@@ -1,22 +1,25 @@
run: compile_ext
- PYTHONPATH=.:$$PYTHONPATH python thumbor/server.py -l debug
+ @thumbor -l debug
+
+setup:
+ @pip install -e .[tests]
compile_ext:
- python setup.py build_ext -i
+ @python setup.py build_ext -i
f ?= "vows/"
test pyvows: compile_ext redis mongo
- PYTHONPATH=.:$$PYTHONPATH pyvows -vv --profile --cover --cover-package=thumbor --cover-threshold=90 $f
- PYTHONPATH=.:$$PYTHONPATH nosetests -sv integration_tests/
+ @pyvows -vv --profile --cover --cover-package=thumbor --cover-threshold=90 $f
+ @nosetests -sv integration_tests/
$(MAKE) kill_mongo kill_redis
ci_test: compile_ext
@echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
@echo "TORNADO IS `python -c 'import tornado; import inspect; print(inspect.getfile(tornado))'`"
@echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
$(MAKE) mongo redis
- PYTHONPATH=.:$$PYTHONPATH pyvows -vvv --profile --cover --cover-package=thumbor --cover-threshold=90 vows/
- PYTHONPATH=.:$$PYTHONPATH nosetests -sv integration_tests/
+ @pyvows -vvv --profile --cover --cover-package=thumbor --cover-threshold=90 vows/
+ @nosetests -sv integration_tests/
$(MAKE) kill_mongo kill_redis
mysql_test: pretest
View
@@ -15,6 +15,24 @@
import os
+tests_require = [
+ "simplejson>=2.1.6,<2.2.0",
+ "pymongo==2.1.1",
+ "redis==2.4.9",
+ "gevent",
+ "pyvows==2.0.4",
+ "preggy==0.6.2",
+ "tornado-pyvows==0.5.2",
+ "coverage",
+ "mock==1.0.1",
+ "pgmagick>=0.5.6",
+ "raven",
+ "nose",
+ "colorama",
+ "numpy",
+]
+
+
def filter_extension_module(name, lib_objs, lib_headers):
return Extension(
'thumbor.ext.filters.%s' % name,
@@ -82,6 +100,10 @@ def run_setup(extension_modules=[]):
"python-magic>=0.4.3"
],
+ extras_require={
+ 'tests': tests_require,
+ },
+
entry_points={
'console_scripts': [
'thumbor=thumbor.server:main',

0 comments on commit fbc2486

Please sign in to comment.