#!/usr/bin/make -f

export PYBUILD_NAME=tds
export PYBUILD_TEST_ARGS=-k '\
     not test_rollback_commit \
 and not test_integrity_error \
 and not test_bulk_insert \
 and not test_bug2 \
 and not test_stored_proc \
 and not test_table_selects \
 and not test_decimals \
 and not test_bulk_insert_with_special_chars_no_columns \
 and not test_bulk_insert_with_special_chars \
 and not test_bulk_insert_with_keyword_column_name \
 and not test_bulk_insert_with_direct_data \
 and not test_table_valued_type_autodetect \
 and not test_table_valued_type_explicit \
 and not test_minimal \
 and not test_empty_query \
 and not test_bulk_insert_type \
 and not test_streaming \
 and not test_fetch_on_empty_dataset \
 and not test_bad_collation \
 and not test_description \
 and not test_fetchone \
 and not test_fetchall \
 and not test_cursor_closing \
 and not test_multi_packet \
 and not test_big_request \
 and not test_row_count \
 and not test_no_rows \
 and not test_fixed_size_data \
 and not test_closing_cursor_in_context \
 and not test_cursor_connection_property \
 and not test_nvarchar_multiple_rows \
 and not test_no_metadata_request \
 and not test_alchemy \
 and not test_null_parameter \
 and not test_reading_values \
 and not test_money \
 and not test_strs \
 and not test_select_values \
 and not test_collations \
 and not test_date \
 and not test_time \
 and not test_datetime \
 and not test_sql_variant_round_trip \
  '

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

override_dh_auto_build: export http_proxy=127.0.0.1:9
override_dh_auto_build: export https_proxy=127.0.0.1:9
override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. python3 -m sphinx -N -bhtml docs/ build/html # HTML generator

override_dh_installdocs:
	dh_installdocs --doc-main-package=python-tds-doc -p python-tds-doc
	dh_installdocs --remaining-packages
