## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %bcond_without docs # Created by pyp2rpm-3.3.5 %global pypi_name usort %global common_description %{expand: μsort is a safe, minimal import sorter. Its primary goal is to make no "dangerous" changes to code, and to make no changes on code style. This is achieved by detecting distinct "blocks" of imports that are the most likely to be safely interchangeable, and only reordering imports within these blocks without altering formatting. Code style is left as an exercise for linters and formatters.} Name: python-%{pypi_name} Version: 1.0.8.post1 Release: %autorelease Summary: A small, safe import sorter License: MIT URL: https://github.com/facebookexperimental/usort Source: %{pypi_source} BuildArch: noarch BuildRequires: make BuildRequires: sed BuildRequires: python3-devel BuildRequires: python3dist(pytest) %if %{with docs} BuildRequires: python3-docs # upstream bundles this with unrelated dependencies in # requirements-dev.txt; manually declare the docs deps BuildRequires: python3dist(sphinx) >= 5.3.0 BuildRequires: python3dist(sphinx-mdinclude) >= 0.5.3 %endif %description %{common_description} %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %{common_description} %if %{with docs} %package doc Summary: Documentation for %{name} Requires: python3-docs %description doc Documentation for %{name}. %endif %prep %autosetup -n %{pypi_name}-%{version} sed -e 's/python/python3/g' -i Makefile # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %if %{with docs} # Use local intersphinx inventory sed -r \ -e 's|https://docs.python.org/3|%{_docdir}/python3-docs/html|' \ -e 's|https://python-stdlib-list.readthedocs.io/en/latest|%{_docdir}/python-stdlib-list-doc/html|' \ -i docs/conf.py %endif %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %if %{with docs} # generate html docs PYTHONPATH=${PWD} sphinx-build-3 docs html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %endif %install %pyproject_install %pyproject_save_files -l %{pypi_name} %check %pyproject_check_import %pytest -v usort/tests/__init__.py -k 'not test_format_permission_error' %files -n python3-%{pypi_name} -f %{pyproject_files} %doc README.md CHANGELOG.md %{_bindir}/usort %if %{with docs} %files doc %doc html %license LICENSE %endif %changelog ## START: Generated by rpmautospec * Tue Aug 20 2024 Michel Lind - 1.0.8.post1-1 - Update to 1.0.8.post1 upstream release - Use dynamic build requirements * Fri Jul 19 2024 Fedora Release Engineering - 0.6.3-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sat Jun 08 2024 Python Maint - 0.6.3-13 - Rebuilt for Python 3.13 * Fri Jan 26 2024 Fedora Release Engineering - 0.6.3-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 0.6.3-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 0.6.3-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed Jul 12 2023 Python Maint - 0.6.3-9 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 0.6.3-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 0.6.3-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 20 2022 Python Maint - 0.6.3-6 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 0.6.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 0.6.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.6.3-3 - Rebuilt for Python 3.10 * Wed Mar 17 2021 Davide Cavalca - 0.6.3-2 - Build docs by default * Sun Mar 07 2021 Davide Cavalca - 0.6.3-1 - Initial package. ## END: Generated by rpmautospec