Blob Blame History Raw
# Created by pyp2rpm-3.2.2
%global pypi_name black

Name:           python-%{pypi_name}
Version:        18.6b4
Release:        1%{?dist}
Summary:        The uncompromising code formatter

License:        MIT
URL:            https://github.com/ambv/black
Source0:        https://files.pythonhosted.org/packages/source/b/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
Source1:        black.1
BuildArch:      noarch
 
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-appdirs
BuildRequires:  python3-attrs >= 17.4.0
BuildRequires:  python3-click >= 6.5
BuildRequires:  python3-toml >= 0.9.4


%description
Black is the uncompromising Python code formatter. By using it, you agree to
cease control over minutiae of hand-formatting. In return, Black gives you
speed, determinism, and freedom from pycodestyle nagging about formatting.
You will save time and mental energy for more important matters.

%package -n     python3-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
 
Requires:       python3-appdirs
Requires:       python3-attrs >= 17.4.0
Requires:       python3-click >= 6.5
Requires:       python3-setuptools
Requires:       python3-toml >= 0.9.4
%description -n python3-%{pypi_name}
Black is the uncompromising Python code formatter. By using it, you agree to
cease control over minutiae of hand-formatting. In return, Black gives you
speed, determinism, and freedom from pycodestyle nagging about formatting.
You will save time and mental energy for more important matters.


%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%py3_build

%install
%py3_install
cp %{buildroot}/%{_bindir}/black %{buildroot}/%{_bindir}/black-%{python3_version}
# ln -s {_bindir}/black-{python3_version} {buildroot}/{_bindir}/black-3

install -D -m 644 %{SOURCE1} %{buildroot}%{_mandir}/man1/black.1

%check
export PIP_INDEX_URL=http://host.invalid./
export PIP_NO_DEPS=yes
%{__python3} setup.py test

%files -n python3-%{pypi_name}
%license LICENSE
%doc README.md
%{_bindir}/black
# {_bindir}/black-3
%{_bindir}/black-%{python3_version}
%{_mandir}/man1/black.1*

%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/%{pypi_name}.py
%{python3_sitelib}/blib2to3
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info

%changelog
* Fri Jun 22 2018 Christian Heimes <cheimes@redhat.com> - 18.6b4-1
- New upstream release 18.6b4, rhbz#1593485
- Remove workaround for missing empty_pyproject.toml

* Sat Jun 09 2018 Christian Heimes <cheimes@redhat.com> - 18.6b2-2
- Add new build and runtime dependency python3-toml
- Don't download external packages in tests
- Create missing empty_pyproject.toml for tests

* Sat Jun 09 2018 Christian Heimes <cheimes@redhat.com> - 18.6b2-1
- New upstream release 18.6b2, rhbz#1589399

* Wed Jun 06 2018 Christian Heimes <cheimes@redhat.com> - 18.6b1-1
- New upstream release 18.6b1

* Tue May 29 2018 Christian Heimes <cheimes@redhat.com> - 18.5b1-1
- New upstream release 18.5b0, rhbz#1579822

* Fri May 04 2018 Christian Heimes <cheimes@redhat.com> - 18.4a4-2
- Add man page
- Ignore false spelling warnings

* Wed May 02 2018 Christian Heimes <cheimes@redhat.com> - 18.4a4-1
- Initial package.