Port to pyproject-rpm-macros
This commit is contained in:
parent
f6c7f9721b
commit
0afd0f29cb
@ -19,12 +19,6 @@ BuildArch: noarch
|
||||
BuildRequires: help2man
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-sqlalchemy >= 1.1
|
||||
BuildRequires: python3-mako
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-dateutil
|
||||
BuildRequires: python3-pytest
|
||||
|
||||
|
||||
%global _description %{expand:
|
||||
Alembic is a new database migrations tool, written by the author of
|
||||
@ -49,7 +43,7 @@ Summary: %summary
|
||||
%description -n python3-alembic %_description
|
||||
|
||||
|
||||
%python_extras_subpkg -n python3-alembic -i %{python3_sitelib}/*.egg-info tz
|
||||
%pyproject_extras_subpkg -n python3-alembic tz
|
||||
|
||||
|
||||
%prep
|
||||
@ -57,10 +51,16 @@ Summary: %summary
|
||||
# HTML documentation has bundled and pre-compiled/pre-minified JavaScript; see
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/JavaScript/.
|
||||
rm -rvf docs/_static
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
|
||||
sed -r -i 's/^([[:blank:]]*(black|zimports))\b/# &/' tox.ini
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -t -x tz
|
||||
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
%pyproject_wheel
|
||||
|
||||
mkdir -p bin
|
||||
echo '%{python3} -c "import alembic.config; alembic.config.main()" $*' > bin/alembic
|
||||
@ -69,10 +69,10 @@ help2man --version-string %{version} --no-info -s 1 bin/alembic > alembic.1
|
||||
|
||||
|
||||
%install
|
||||
|
||||
install -d -m 0755 %{buildroot}%{_mandir}/man1
|
||||
|
||||
%py3_install
|
||||
%pyproject_install
|
||||
%pyproject_save_files alembic
|
||||
mv %{buildroot}/%{_bindir}/%{modname} %{buildroot}/%{_bindir}/%{modname}-3
|
||||
ln -s %{modname}-3 %{buildroot}/%{_bindir}/%{modname}-%{python3_version}
|
||||
install -m 0644 alembic.1 %{buildroot}%{_mandir}/man1/alembic-3.1
|
||||
@ -83,13 +83,12 @@ ln -s alembic-%{python3_version}.1 %{buildroot}%{_mandir}/man1/alembic.1
|
||||
|
||||
|
||||
%check
|
||||
%pytest
|
||||
%tox
|
||||
|
||||
|
||||
%files -n python3-%{modname}
|
||||
%doc LICENSE README.rst CHANGES
|
||||
%{python3_sitelib}/%{modname}/
|
||||
%{python3_sitelib}/%{modname}-%{version}-*
|
||||
%files -n python3-%{modname} -f %{pyproject_files}
|
||||
# pyproject_files handles LICENSE; verify with rpm -qL -p ...
|
||||
%doc README.rst CHANGES
|
||||
%{_bindir}/%{modname}
|
||||
%{_mandir}/man1/alembic.1*
|
||||
%{_bindir}/%{modname}-3
|
||||
@ -106,6 +105,7 @@ ln -s alembic-%{python3_version}.1 %{buildroot}%{_mandir}/man1/alembic.1
|
||||
- Drop HTML documentation due to bundled/pre-minified JavaScript
|
||||
- Confirm License is SPDX MIT
|
||||
- Add metapackage for “tz” extra
|
||||
- Port to pyproject-rpm-macros
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
Loading…
Reference in New Issue
Block a user