Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

Makefile 2.4KB

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