File: rules

package info (click to toggle)
thumbor 7.7.7-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 40,528 kB
  • sloc: xml: 295,435; python: 18,668; ansic: 1,479; makefile: 360; sh: 27
file content (60 lines) | stat: -rwxr-xr-x 4,353 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export PYBUILD_NAME=thumbor
export PYBUILD_TEST_PYTEST = 1
export PYBUILD_BEFORE_TEST = cp -R tests integration_tests {build_dir}; \
	mkdir -p {build_dir}/thumbor/fixtures/filters; \
	cp -R thumbor/fixtures/filters/* {build_dir}/thumbor/fixtures/filters; \
	redis-server --port 6668 --requirepass hey_you > /dev/null &
export PYBUILD_AFTER_TEST = redis-cli -p 6668 -a hey_you shutdown; \
	rm -rf {build_dir}/tests {build_dir}/integration_tests
export PYBUILD_TEST_ARGS = \
	--ignore=tests/detectors/test_queued_detector.py \
	--ignore=tests/error_handlers/test_sentry.py \
	--ignore=tests/handlers/test_base_handler_with_auto_avif.py \
	--ignore=tests/handlers/test_base_handler_with_auto_heif.py \
	--ignore=tests/integration_tests/pil_test.py \
	--ignore=tests/optimizers/test_gifv.py \
	--deselect=integration_tests/pil_test.py::PILTest::test_single_params \
	--deselect=tests/handlers/test_base_handler.py::ImagingOperationsTestCase::test_can_read_heif \
	--deselect=tests/handlers/test_base_handler_with_auto_jpg.py::ImageOperationsWithAutoJpgTestCase::test_can_auto_convert_avif_to_jpg_with_accept_all \
	--deselect=tests/handlers/test_base_handler_with_auto_jpg.py::ImageOperationsWithAutoJpgTestCase::test_can_auto_convert_avif_to_jpg_with_accept_jpeg \
	--deselect=tests/handlers/test_base_handler_with_auto_jpg.py::ImageOperationsWithAutoJpgTestCase::test_can_auto_convert_avif_to_jpg_with_accept_jpg \
	--deselect=tests/handlers/test_base_handler_with_auto_jpg.py::ImageOperationsWithAutoJpgTestCase::test_can_auto_convert_heic_to_jpg_with_accept_all \
	--deselect=tests/handlers/test_base_handler_with_auto_jpg.py::ImageOperationsWithAutoJpgTestCase::test_can_auto_convert_heic_to_jpg_with_accept_jpeg \
	--deselect=tests/handlers/test_base_handler_with_auto_jpg.py::ImageOperationsWithAutoJpgTestCase::test_can_auto_convert_heic_to_jpg_with_accept_jpg \
	--deselect=tests/handlers/test_base_handler_with_auto_png.py::ImageOperationsWithAutoPngTestCase::test_can_auto_convert_heic_to_png \
	--deselect=tests/handlers/test_base_handler_with_gifv.py::ImageOperationsWithGifVTestCase::test_should_convert_animated_gif_to_mp4_when_filter_without_params \
	--deselect=tests/handlers/test_base_handler_with_gifv.py::ImageOperationsWithGifVTestCase::test_should_convert_animated_gif_to_mp4_with_filter_without_params \
	--deselect=tests/handlers/test_base_handler_with_result_storage.py::ImageOperationsResultStorageOnlyTestCase::test_loads_image_from_result_storage \
	--deselect=tests/handlers/test_base_handler_with_result_storage.py::ImageOperationsResultStorageOnlyTestCase::test_loads_image_from_result_storage_fails_on_exception \
	--deselect=tests/handlers/test_base_handler_with_result_storage.py::ImageOperationsWithResultStorageTestCase::test_saves_image_to_result_storage \
	--deselect=tests/handlers/test_base_handler_with_result_storage.py::ImageOperationsWithResultStorageTestCase::test_saves_meta_to_result_storage \
	--deselect=tests/loaders/test_http_loader.py::HttpCurlNotFoundLoaderTestCase::test_load_not_found \
	--deselect=tests/loaders/test_http_loader.py::HttpLoaderTestCase::test_load_with_curl \
	--deselect=tests/loaders/test_https_loader.py::HttpLoaderWithUserAgentForwardingTestCase::test_load_with_default_user_agent \
	--deselect=tests/loaders/test_https_loader.py::HttpLoaderWithUserAgentForwardingTestCase::test_load_with_user_agent \
	--deselect=tests/metrics/test_default_metrics.py::DefaultMetricsTestCase::test_can_initizalize_when_request_comes \
	--deselect=tests/test_config.py::ConfigValuesTestCase::test_default_values \
	integration_tests/ tests/

export PYBUILD_AFTER_INSTALL = mkdir -p {destdir}/etc/thumbor.d; \
	HOME=/var/lib/thumbor PYTHONPATH={destdir}/usr/lib/python{version}/dist-packages/ \
	python{version} {destdir}/usr/bin/thumbor-config > {destdir}/etc/thumbor.d/10-default.conf; \
	find {destdir}/usr/lib/python{version}/dist-packages/ -name '*.c' -delete; \
	rm -rf '{destdir}/{install_dir}/thumbor/fixtures'
export LC_ALL=C.UTF-8
export ASYNC_TEST_TIMEOUT=30

%:
	dh $@ --with python3 --buildsystem=pybuild

override_dh_clean:
	rm -rf thumbor.egg-info .pytest_cache
	redis-cli -p 6668 -a hey_you shutdown || true
	find . -name \*.so -delete
	dh_clean

override_dh_installinit:
	dh_installinit --name=thumbor --noscripts