You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # These targets are not files
  2. .PHONY: install sandbox docs coverage lint messages compiledmessages css clean sandbox_image
  3. install:
  4. pip install -r requirements.txt
  5. pip install -e .[test]
  6. build_sandbox:
  7. # Remove media
  8. -rm -rf sandbox/public/media/images
  9. -rm -rf sandbox/public/media/cache
  10. -rm -rf sandbox/public/static
  11. -rm -f sandbox/db.sqlite
  12. # Create database
  13. sandbox/manage.py migrate
  14. # Import some fixtures. Order is important as JSON fixtures include primary keys
  15. sandbox/manage.py loaddata sandbox/fixtures/child_products.json
  16. sandbox/manage.py oscar_import_catalogue sandbox/fixtures/*.csv
  17. sandbox/manage.py oscar_import_catalogue_images sandbox/fixtures/images.tar.gz
  18. sandbox/manage.py oscar_populate_countries --initial-only
  19. sandbox/manage.py loaddata sandbox/fixtures/pages.json sandbox/fixtures/auth.json sandbox/fixtures/ranges.json sandbox/fixtures/offers.json
  20. sandbox/manage.py loaddata sandbox/fixtures/orders.json
  21. sandbox/manage.py clear_index --noinput
  22. sandbox/manage.py update_index catalogue
  23. sandbox/manage.py thumbnail cleanup
  24. sandbox/manage.py collectstatic --noinput
  25. sandbox: install build_sandbox
  26. sandbox_image:
  27. docker build -t django-oscar-sandbox:latest .
  28. docs:
  29. cd docs && make html
  30. test:
  31. py.test
  32. retest:
  33. py.test --lf
  34. coverage:
  35. py.test --cov=oscar --cov-report=term-missing
  36. lint:
  37. flake8 src/oscar/
  38. isort -q --recursive --diff src/
  39. testmigrations:
  40. pip install -r requirements_migrations.txt
  41. cd sandbox && ./test_migrations.sh
  42. messages:
  43. # Create the .po files used for i18n
  44. cd src/oscar; django-admin.py makemessages -a
  45. compiledmessages:
  46. # Compile the gettext files
  47. cd src/oscar; django-admin.py compilemessages
  48. css:
  49. npm install
  50. npm run build
  51. clean:
  52. # Remove files not in source control
  53. find . -type f -name "*.pyc" -delete
  54. rm -rf nosetests.xml coverage.xml htmlcov *.egg-info *.pdf dist violations.txt
  55. todo:
  56. # Look for areas of the code that need updating when some event has taken place (like
  57. # Oscar dropping support for a Django version)
  58. -grep -rnH TODO *.txt
  59. -grep -rnH TODO src/oscar/apps/
  60. -grep -rnH "django.VERSION" src/oscar/apps
  61. release: clean
  62. pip install twine wheel
  63. rm -rf dist/*
  64. python setup.py sdist bdist_wheel
  65. twine upload -s dist/*