File: rules

package info (click to toggle)
isort 7.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,548 kB
  • sloc: python: 15,337; javascript: 42; makefile: 28; sh: 22
file content (44 lines) | stat: -rwxr-xr-x 1,905 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export PYBUILD_NAME := isort
export PYBUILD_TEST_ARGS :=

# This test clones other projects from the internet.
PYBUILD_TEST_ARGS += --ignore=tests/integration/test_projects_using_isort.py

# These tests need example-isort-sorting-plugin and/or
# example-shared-isort-profile to be installed, and we haven't yet worked
# out how to install those for tests.
PYBUILD_TEST_ARGS += \
	--deselect=tests/integration/test_setting_combinations.py::test_isort_is_idempotent \
	--deselect=tests/integration/test_setting_combinations.py::test_isort_doesnt_lose_imports_or_comments \
	--deselect=tests/unit/test_ticketed_features.py::test_isort_supports_shared_profiles_issue_970 \
	--deselect=tests/unit/test_ticketed_features.py::test_sort_configurable_sort_issue_1732

# These tests don't seem to work in a packaged context, for unclear reasons.
PYBUILD_TEST_ARGS += \
	--deselect=tests/unit/test_deprecated_finders.py::TestRequirementsFinder::test_requirements_dir \
	--deselect=tests/unit/test_deprecated_finders.py::test_requirements_finder \
	--deselect=tests/unit/test_deprecated_finders.py::test_path_finder

ifeq (,$(PYBUILD_AUTOPKGTEST))
# These tests need isort to be installed on $PATH.
PYBUILD_TEST_ARGS += \
	--deselect=tests/unit/test_isort.py::test_settings_path_skip_issue_909 \
	--deselect=tests/unit/test_isort.py::test_skip_paths_issue_938
else
# These tests only work when running against isort from the source
# directory, rather than the version installed on the system.
PYBUILD_TEST_ARGS += \
	--deselect=tests/unit/test_hooks.py::test_git_hook \
	--deselect=tests/unit/test_place.py::test_module
endif

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_auto_install:
	mkdir -p debian/isort/usr/bin
	mv debian/python3-isort/usr/bin/isort* debian/isort/usr/bin/
	rmdir debian/python3-isort/usr/bin
	rm -rf debian/python3-isort/usr/lib/python3*/dist-packages/isort/_vendored