|
 |
2f749e |
%global pypi_name black
|
|
 |
2f749e |
%global base_version 20.8
|
|
 |
2f749e |
%global prerel b1
|
|
 |
2f749e |
%global upstream_version %{base_version}%{?prerel}
|
|
 |
2f749e |
Name: python-%{pypi_name}
|
|
 |
2f749e |
Version: %{base_version}%{?prerel:~%{prerel}}
|
|
 |
2f749e |
Release: 2%{?dist}
|
|
 |
2f749e |
Summary: The uncompromising code formatter
|
|
 |
2f749e |
License: MIT
|
|
 |
2f749e |
URL: https://github.com/psf/black
|
|
 |
2f749e |
Source0: %{pypi_source %{pypi_name} %{upstream_version}}
|
|
 |
2f749e |
Source1: black.1
|
|
 |
2f749e |
Source2: blackd.1
|
|
 |
2f749e |
|
|
 |
2f749e |
BuildArch: noarch
|
|
 |
2f749e |
|
|
 |
2f749e |
BuildRequires: python3-devel
|
|
 |
2f749e |
BuildRequires: pyproject-rpm-macros
|
|
 |
2f749e |
|
|
 |
2f749e |
%global _description %{expand:
|
|
 |
2f749e |
Black is the uncompromising Python code formatter. By using it, you agree to
|
|
 |
2f749e |
cease control over minutiae of hand-formatting. In return, Black gives you
|
|
 |
2f749e |
speed, determinism, and freedom from pycodestyle nagging about formatting.
|
|
 |
2f749e |
You will save time and mental energy for more important matters.}
|
|
 |
2f749e |
|
|
 |
2f749e |
%description %_description
|
|
 |
2f749e |
|
|
 |
2f749e |
|
|
 |
2f749e |
%package -n %{pypi_name}
|
|
 |
2f749e |
Summary: %{summary}
|
|
 |
2f749e |
|
|
 |
2f749e |
# extras_require "d"
|
|
 |
2f749e |
Recommends: python3-aiohttp >= 3.3.2
|
|
 |
2f749e |
Recommends: python3-aiohttp-cors
|
|
 |
2f749e |
|
|
 |
2f749e |
# Package was renamed when Fedora 31 was rawhide
|
|
 |
2f749e |
# Don't remove this before Fedora 33
|
|
 |
2f749e |
Provides: python3-%{pypi_name} = %{version}-%{release}
|
|
 |
2f749e |
Obsoletes: python3-%{pypi_name} < 19.4
|
|
 |
2f749e |
|
|
 |
2f749e |
%description -n %{pypi_name} %_description
|
|
 |
2f749e |
|
|
 |
2f749e |
|
|
 |
2f749e |
%prep
|
|
 |
2f749e |
%autosetup -n %{pypi_name}-%{upstream_version} -p1
|
|
 |
2f749e |
|
|
 |
2f749e |
%generate_buildrequires
|
|
 |
2f749e |
# d is a name of extras_require
|
|
 |
2f749e |
%pyproject_buildrequires -rx d
|
|
 |
2f749e |
|
|
 |
2f749e |
|
|
 |
2f749e |
%build
|
|
 |
2f749e |
%pyproject_wheel
|
|
 |
2f749e |
|
|
 |
2f749e |
|
|
 |
2f749e |
%install
|
|
 |
2f749e |
%pyproject_install
|
|
 |
2f749e |
%pyproject_save_files 'black*' '_black*' blib2to3
|
|
 |
2f749e |
|
|
 |
2f749e |
for exe in black blackd black-primer; do
|
|
 |
2f749e |
ln -sr %{buildroot}%{_bindir}/${exe}{,-%{python3_version}}
|
|
 |
2f749e |
done
|
|
 |
2f749e |
|
|
 |
2f749e |
install -D -m 644 %{SOURCE1} %{buildroot}%{_mandir}/man1/black.1
|
|
 |
2f749e |
install -D -m 644 %{SOURCE2} %{buildroot}%{_mandir}/man1/blackd.1
|
|
 |
2f749e |
|
|
 |
2f749e |
|
|
 |
2f749e |
%check
|
|
 |
2f749e |
export PIP_INDEX_URL=http://host.invalid./
|
|
 |
2f749e |
export PIP_NO_DEPS=yes
|
|
 |
2f749e |
export PYTHONPATH=%{buildroot}%{python3_sitelib}
|
|
 |
2f749e |
export PATH=%{buildroot}%{_bindir}:$PATH
|
|
 |
2f749e |
%{python3} setup.py test
|
|
 |
2f749e |
|
|
 |
2f749e |
|
|
 |
2f749e |
%files -n %{pypi_name} -f %{pyproject_files}
|
|
 |
2f749e |
%license LICENSE
|
|
 |
2f749e |
%doc README.md
|
|
 |
2f749e |
%{_bindir}/black
|
|
 |
2f749e |
%{_bindir}/black-%{python3_version}
|
|
 |
2f749e |
%{_mandir}/man1/black.1*
|
|
 |
2f749e |
%{_bindir}/blackd
|
|
 |
2f749e |
%{_bindir}/blackd-%{python3_version}
|
|
 |
2f749e |
%{_mandir}/man1/blackd.1*
|
|
 |
2f749e |
%{_bindir}/black-primer
|
|
 |
2f749e |
%{_bindir}/black-primer-%{python3_version}
|
|
 |
2f749e |
|
|
 |
2f749e |
|
|
 |
2f749e |
%changelog
|
|
 |
2f749e |
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 20.8~b1-2
|
|
 |
2f749e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
 |
2f749e |
|
|
 |
2f749e |
* Wed Aug 26 2020 Miro Hrončok <mhroncok@redhat.com> - 20.8~b1-1
|
|
 |
2f749e |
- Update to 20.8b1
|
|
 |
2f749e |
- Fixes rhbz#1872790
|
|
 |
2f749e |
|
|
 |
2f749e |
* Wed Aug 26 2020 Miro Hrončok <mhroncok@redhat.com> - 20.8~b0-1
|
|
 |
2f749e |
- Update to 20.8b0
|
|
 |
2f749e |
- Fixes rhbz#1872743
|
|
 |
2f749e |
|
|
 |
2f749e |
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 19.10~b0-4
|
|
 |
2f749e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
 |
2f749e |
|
|
 |
2f749e |
* Wed Jun 03 2020 Adam Williamson <awilliam@redhat.com> - 19.10~b0-3
|
|
 |
2f749e |
- Rebuilt for Python 3.9
|
|
 |
2f749e |
- Fix one test and hack up another one for Python 3.9 parser issues
|
|
 |
2f749e |
|
|
 |
2f749e |
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 19.10~b0-2
|
|
 |
2f749e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
 |
2f749e |
|
|
 |
2f749e |
* Tue Oct 29 2019 Miro Hrončok <mhroncok@redhat.com> - 19.10~b0-1
|
|
 |
2f749e |
- Update to 19.10b0
|
|
 |
2f749e |
|
|
 |
2f749e |
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 19.3b0-5
|
|
 |
2f749e |
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
|
 |
2f749e |
|
|
 |
2f749e |
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 19.3b0-4
|
|
 |
2f749e |
- Rebuilt for Python 3.8
|
|
 |
2f749e |
|
|
 |
2f749e |
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 19.3b0-3
|
|
 |
2f749e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
 |
2f749e |
|
|
 |
2f749e |
* Wed Apr 03 2019 Miro Hrončok <mhroncok@redhat.com> - 19.3b0-2
|
|
 |
2f749e |
- Rename the binary package to black, rhbz#1692117
|
|
 |
2f749e |
|
|
 |
2f749e |
* Thu Mar 21 2019 Christian Heimes <cheimes@redhat.com> - 19.3b0-1
|
|
 |
2f749e |
- New upstream release 19.3b0, rhbz#1688957
|
|
 |
2f749e |
|
|
 |
2f749e |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 18.9b0-2
|
|
 |
2f749e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
 |
2f749e |
|
|
 |
2f749e |
* Thu Sep 27 2018 Christian Heimes <cheimes@redhat.com> - 18.9b0-1
|
|
 |
2f749e |
- New upstream version 18.9b0
|
|
 |
2f749e |
- Include blackd daemon
|
|
 |
2f749e |
|
|
 |
2f749e |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 18.6b4-3
|
|
 |
2f749e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
 |
2f749e |
|
|
 |
2f749e |
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 18.6b4-2
|
|
 |
2f749e |
- Rebuilt for Python 3.7
|
|
 |
2f749e |
|
|
 |
2f749e |
* Fri Jun 22 2018 Christian Heimes <cheimes@redhat.com> - 18.6b4-1
|
|
 |
2f749e |
- New upstream release 18.6b4, rhbz#1593485
|
|
 |
2f749e |
- Remove workaround for missing empty_pyproject.toml
|
|
 |
2f749e |
|
|
 |
2f749e |
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 18.6b2-3
|
|
 |
2f749e |
- Rebuilt for Python 3.7
|
|
 |
2f749e |
|
|
 |
2f749e |
* Sat Jun 09 2018 Christian Heimes <cheimes@redhat.com> - 18.6b2-2
|
|
 |
2f749e |
- Add new build and runtime dependency python3-toml
|
|
 |
2f749e |
- Don't download external packages in tests
|
|
 |
2f749e |
- Create missing empty_pyproject.toml for tests
|
|
 |
2f749e |
|
|
 |
2f749e |
* Sat Jun 09 2018 Christian Heimes <cheimes@redhat.com> - 18.6b2-1
|
|
 |
2f749e |
- New upstream release 18.6b2, rhbz#1589399
|
|
 |
2f749e |
|
|
 |
2f749e |
* Wed Jun 06 2018 Christian Heimes <cheimes@redhat.com> - 18.6b1-1
|
|
 |
2f749e |
- New upstream release 18.6b1
|
|
 |
2f749e |
|
|
 |
2f749e |
* Tue May 29 2018 Christian Heimes <cheimes@redhat.com> - 18.5b1-1
|
|
 |
2f749e |
- New upstream release 18.5b0, rhbz#1579822
|
|
 |
2f749e |
|
|
 |
2f749e |
* Fri May 04 2018 Christian Heimes <cheimes@redhat.com> - 18.4a4-2
|
|
 |
2f749e |
- Add man page
|
|
 |
2f749e |
- Ignore false spelling warnings
|
|
 |
2f749e |
|
|
 |
2f749e |
* Wed May 02 2018 Christian Heimes <cheimes@redhat.com> - 18.4a4-1
|
|
 |
2f749e |
- Initial package.
|