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.

Makefile 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. coverage:
  33. py.test --cov=oscar --cov-report=term-missing
  34. lint:
  35. flake8 src/oscar/
  36. isort -q --recursive --diff src/
  37. testmigrations:
  38. pip install -r requirements_migrations.txt
  39. cd sandbox && ./test_migrations.sh
  40. messages:
  41. # Create the .po files used for i18n
  42. cd src/oscar; django-admin.py makemessages -a
  43. compiledmessages:
  44. # Compile the gettext files
  45. cd src/oscar; django-admin.py compilemessages
  46. css:
  47. npm install
  48. npm run build
  49. clean:
  50. # Remove files not in source control
  51. find . -type f -name "*.pyc" -delete
  52. rm -rf nosetests.xml coverage.xml htmlcov *.egg-info *.pdf dist violations.txt
  53. todo:
  54. # Look for areas of the code that need updating when some event has taken place (like
  55. # Oscar dropping support for a Django version)
  56. -grep -rnH TODO *.txt
  57. -grep -rnH TODO src/oscar/apps/
  58. -grep -rnH "django.VERSION" src/oscar/apps
  59. release: clean
  60. pip install twine wheel
  61. rm -rf dist/*
  62. python setup.py sdist bdist_wheel
  63. twine upload -s dist/*