1 # Maintainer: Caleb Maclennan <caleb@alerque.com>
2 # Contributor: Felix Yan <felixonmars@archlinux.org>
3 # Contributor: Yaron de Leeuw <me@jarondl.net>
6 pkgname=python-$_pyname
9 pkgdesc='A Python utility / library to sort Python imports'
11 url="https://github.com/PyCQA/$_pyname"
16 "${_pydeps[@]/#/python-}")
17 makedepends=(python-{build,installer,wheel}
25 ## deps that make it harder not easier to tell if things work
32 # Besides the overflowing plethora of specific test problems as noted in the
33 # check() function --dselects, the switch from dephell to poetry broke a whole
34 # batch more tests related to output formatting. There are a bunch of lines where
35 # the expected output has whitespace and the actual output does not any more.
38 # "${_pycheckdeps[@]/#/python-}")
39 _archive="$_pyname-$pkgver"
40 source=("$url/archive/$pkgver/$_archive.tar.gz")
41 sha256sums=('00eef77c312dc08606d72b6c38a5330632caca4f9bf8e86b7b373ed760ae29b8')
48 sed -i 's/from ._vendored //' isort/settings.py
50 ## Skipping example integration tests
51 # for _plugin in example_*; do
53 # dephell deps convert --from pyproject.toml --to setup.py
65 # ## Skipping example integration tests
66 # # python setup.py install --root="$PWD/tmp_install" --optimize=1
67 # # for _plugin in example_*; do
69 # # python setup.py install --root="$srcdir/isort-$pkgver/tmp_install" --optimize=1
72 # # PYTHONPATH="$PWD/example_isort_formatting_plugin:$PWD/example_shared_isort_profile:$PWD/tmp_install/usr/lib/python3.11/site-packages" PATH="$PWD/tmp_install/usr/bin:$PATH" \
73 # python -m pytest -p no:warnings \
74 # --deselect tests/unit/test_deprecated_finders.py::TestRequirementsFinder::test_requirements_dir $(: having pip in ruins other tests ) \
75 # --deselect tests/unit/test_deprecated_finders.py::test_requirements_finder $(: having pip in ruins other tests ) \
76 # --deselect tests/unit/test_deprecated_finders.py::test_pipfile_finder $(: having pip in ruins other tests ) \
77 # --deselect tests/unit/test_isort.py::test_settings_path_skip_issue_909 $(: example integrations ) \
78 # --deselect tests/unit/test_isort.py::test_skip_paths_issue_938 $(: example integrations ) \
79 # --deselect tests/unit/test_ticketed_features.py::test_isort_supports_shared_profiles_issue_970 $(: example integrations ) \
80 # --deselect tests/unit/test_literal.py::test_value_assignment_list $(: unknown) \
81 # --deselect tests/unit/test_ticketed_features.py::test_isort_supports_formatting_plugins_issue_1353 $(: unknown) \
82 # --deselect tests/unit/test_ticketed_features.py::test_isort_literals_issue_1358 $(: unknown ) \
83 # --deselect tests/unit/test_ticketed_features.py::test_sort_configurable_sort_issue_1732 $(: unknown ) \
84 # --deselect tests/integration/test_setting_combinations.py $(: unknown ) \
85 # --deselect tests/integration/test_projects_using_isort.py::test_typeshed $(: requires network ) \
86 # --deselect tests/test_importable.py::test_importable $(: just weird ) \
87 # --deselect tests/benchmark/test_api.py $(: no benchmarks thanks )
92 python -m installer -d "$pkgdir" dist/*.whl
93 rm -f "$pkgdir"/usr/lib/python*/site-packages/{LICENSE,CHANGELOG.md}
94 install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE