Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 export PYBUILD_NAME := isort
4 export PYBUILD_TEST_ARGS :=
5
6 # This test clones other projects from the internet.
7 PYBUILD_TEST_ARGS += --ignore=tests/integration/test_projects_using_isort.py
8
9 # These tests need example-isort-sorting-plugin and/or
10 # example-shared-isort-profile to be installed, and we haven't yet worked
11 # out how to install those for tests.
12 PYBUILD_TEST_ARGS += \
13 --deselect=tests/integration/test_setting_combinations.py::test_isort_is_idempotent \
14 --deselect=tests/integration/test_setting_combinations.py::test_isort_doesnt_lose_imports_or_comments \
15 --deselect=tests/unit/test_ticketed_features.py::test_isort_supports_shared_profiles_issue_970 \
16 --deselect=tests/unit/test_ticketed_features.py::test_sort_configurable_sort_issue_1732
17
18 # These tests don't seem to work in a packaged context, for unclear reasons.
19 PYBUILD_TEST_ARGS += \
20 --deselect=tests/unit/test_deprecated_finders.py::TestRequirementsFinder::test_requirements_dir \
21 --deselect=tests/unit/test_deprecated_finders.py::test_requirements_finder \
22 --deselect=tests/unit/test_deprecated_finders.py::test_path_finder
23
24 ifeq (,$(PYBUILD_AUTOPKGTEST))
25 # These tests need isort to be installed on $PATH.
26 PYBUILD_TEST_ARGS += \
27 --deselect=tests/unit/test_isort.py::test_settings_path_skip_issue_909 \
28 --deselect=tests/unit/test_isort.py::test_skip_paths_issue_938
29 else
30 # These tests only work when running against isort from the source
31 # directory, rather than the version installed on the system.
32 PYBUILD_TEST_ARGS += \
33 --deselect=tests/unit/test_hooks.py::test_git_hook \
34 --deselect=tests/unit/test_place.py::test_module
35 endif
36
37 %:
38 dh $@ --buildsystem=pybuild
39
40 execute_after_dh_auto_install:
41 mkdir -p debian/isort/usr/bin
42 mv debian/python3-isort/usr/bin/isort* debian/isort/usr/bin/
43 rmdir debian/python3-isort/usr/bin
44 rm -rf debian/python3-isort/usr/lib/python3*/dist-packages/isort/_vendored