## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 7; 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 %global pypi_name yapf %global desc %{expand: \ YAPF Introduction Most of the current formatters for Python e.g., autopep8, and pep8ify are made to remove lint errors from code. This has some obvious limitations. For instance, code that conforms to the PEP 8 guidelines may not be} %global forgeurl https://github.com/google/yapf Name: python-%{pypi_name} Version: 0.40.2 Release: %autorelease Summary: A formatter for Python code # Automatically converted from old format: ASL 2.0 - review is highly recommended. License: Apache-2.0 %global tag v%{version} %forgemeta URL: %{forgeurl} Source0: %{forgesource} Patch: fix_installed_modules.patch Patch: fix_tox_requirements.patch BuildArch: noarch BuildRequires: python3-devel, git-core BuildRequires: python3dist(setuptools) # Required for running tests BuildRequires: python3-importlib-metadata BuildRequires: python3-platformdirs %description %{desc} %package -n python3-%{pypi_name} Summary: %{summary} Requires: python3dist(setuptools) # Upstream has forked lib2to3. From their README: # A fork of python's lib2to3 with select features backported from black's # blib2to3. # Reasons for forking: # - black's fork of lib2to3 already considers newer features like # Structured Pattern matching # - lib2to3 itself is deprecated and no longer getting support # Maintenance moving forward: # - Most changes moving forward should only have to be done to the # grammar files in this project. Provides: bundled(python3dist(lib2to3)) %description -n python3-%{pypi_name} %{desc} %prep %forgeautosetup -S git # Remove bundled egg-info rm -rf %{pypi_name}.egg-info cp plugins/README.md README-plugins.md # Remove shebang sed -i '/^#!/d' third_party/yapf_third_party/_ylib2to3/pgen2/token.py %generate_buildrequires %pyproject_buildrequires -t %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{pypi_name} yapf_third_party %check %tox %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README* %{_bindir}/yapf %{_bindir}/yapf-diff %changelog ## START: Generated by rpmautospec * Wed Jul 24 2024 Miroslav Suchý - 0.40.2-7 - convert ASL 2.0 license to SPDX * Fri Jul 19 2024 Fedora Release Engineering - 0.40.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sat Jun 08 2024 Python Maint - 0.40.2-5 - Rebuilt for Python 3.13 * Fri Jan 26 2024 Fedora Release Engineering - 0.40.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 0.40.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Oct 08 2023 Sandro - 0.40.2-2 - Add Packit config * Sun Sep 24 2023 Sandro - 0.40.2-1 - Update to 0.40.2 (RHBZ#2188066) - Switch to tox for testing - Fix tox requirements * Sun Sep 24 2023 Sandro - 0.40.1-3 - Convert tabs to spaces - Fix indentation * Thu Aug 31 2023 Sandro - 0.40.1-2 - Add comment regrding forked lib2to3 * Wed Aug 30 2023 Sandro - 0.40.1-1 - Update to 0.40.1 (RHBZ#2188066) - Use forge macros - Patch setup.py to exclude yaptests - Fix BRs for %%prep and %%check - Tidy up spec file - Make use of Python RPM macros * Fri Jul 21 2023 Fedora Release Engineering - 0.32.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jun 13 2023 Python Maint - 0.32.0-4 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 0.32.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 0.32.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 27 2022 Luis Bazan - 0.32.0-1 - New upstream version * Mon Jun 13 2022 Python Maint - 0.31.0-5 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 0.31.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 0.31.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.31.0-2 - Rebuilt for Python 3.10 * Wed Apr 07 2021 Luis Bazan - 0.31.0-1 - New upstream version * Wed Jan 27 2021 Fedora Release Engineering - 0.30.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 0.30.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 0.30.0-2 - Rebuilt for Python 3.9 * Fri Apr 24 2020 Luis Bazan - 0.30.0-1 - New upstream version * Thu Jan 30 2020 Fedora Release Engineering - 0.29.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Mon Dec 23 2019 Luis Bazan - 0.29.0-2 - Rebuild f32 * Mon Dec 23 2019 Luis Bazan - 0.29.0-1 - New upstream version * Thu Oct 03 2019 Miro Hrončok - 0.28.0-3 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 0.28.0-2 - Rebuilt for Python 3.8 * Fri Aug 16 2019 Luis Bazan - 0.28.0-1 - New upstream version * Fri Jul 26 2019 Fedora Release Engineering - 0.27.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Mon Apr 08 2019 Luis Bazan - 0.27.0-1 - New upstream version * Mon Apr 01 2019 Luis Bazan - 0.26.0-2 - Fix comment #7 BZ #1691609 * Fri Mar 22 2019 Luis Bazan - 0.26.0-1 - Initial package. ## END: Generated by rpmautospec