diff --git a/python-pendulum.spec b/python-pendulum.spec index 356b9b3fac4cbc7f3bb25102ea1bfa44561ea621..416da82313b19e59be865ac2fcf2e76506decf71 100644 --- a/python-pendulum.spec +++ b/python-pendulum.spec @@ -1,11 +1,12 @@ %global _empty_manifest_terminate_build 0 Name: python-pendulum Version: 3.0.0 -Release: 1 +Release: 2 Summary: Python datetimes made easy License: MIT URL: https://pendulum.eustace.io Source0: https://files.pythonhosted.org/packages/source/p/pendulum/pendulum-%{version}.tar.gz +Source1: vendor.tar.gz %description Python datetimes made easy. @@ -28,17 +29,22 @@ BuildRequires: gcc # General requires Requires: python3-dateutil Requires: python3-tzdata +Obsoletes: %{name}-help %description -n python3-pendulum Python datetimes made easy. -%package help -Summary: Python datetimes made easy -Provides: python3-pendulum-doc -%description help -Python datetimes made easy. %prep %autosetup -n pendulum-%{version} -p1 +tar -xf %{SOURCE1} +mkdir .cargo +cat << EOF > .cargo/config.toml +[source.crates-io] +replace-with = "vendored-sources" + +[source.vendored-sources] +directory = "vendor" +EOF %build %pyproject_build @@ -47,39 +53,17 @@ Python datetimes made easy. %pyproject_install install -d -m755 %{buildroot}/%{_pkgdocdir} -if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi -if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi -if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi -if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi -pushd %{buildroot} -if [ -d usr/lib ]; then - find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/lib64 ]; then - find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/bin ]; then - find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/sbin ]; then - find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst -fi -touch doclist.lst -if [ -d usr/share/man ]; then - find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst -fi -popd -mv %{buildroot}/filelist.lst . -mv %{buildroot}/doclist.lst . -%files -n python3-pendulum -f filelist.lst +%files -n python3-pendulum %dir %{python3_sitearch}/* %{python3_sitearch}/pendulum/* - -%files help -f doclist.lst -%{_docdir}/* +%{python3_sitearch}/pendulum-%{version}.dist-info/* %changelog +* Mon Jan 27 2025 wangkai <13474090681@163.com> - 3.0.0-2 +- Use vendor to fix build error +- Remove empty help subpackage + * Thu Aug 22 2024 yaoxin - 3.0.0-1 - Update to 3.0.0: * Relaxed dependency constraints. #760 diff --git a/vendor.tar.gz b/vendor.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..eb5aeb984e84c3f946b8bc720b66454dc847002e Binary files /dev/null and b/vendor.tar.gz differ