- Remove real directory of %{python_sitelib}/pytz/zoneinfo when

upgrading, before it is replaced by a symlink (bsc#1185748).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=98
This commit is contained in:
Matej Cepl 2021-06-24 21:48:23 +00:00 committed by Git OBS Bridge
parent 052278c779
commit e029153846
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jun 24 21:46:08 UTC 2021 - Matej Cepl <mcepl@suse.com>
- Remove real directory of %{python_sitelib}/pytz/zoneinfo when
upgrading, before it is replaced by a symlink (bsc#1185748).
-------------------------------------------------------------------
Fri May 28 09:56:44 UTC 2021 - pgajdos@suse.com

View File

@ -82,6 +82,11 @@ ln -s %{_datadir}/zoneinfo %{buildroot}%{$python_sitelib}/pytz/zoneinfo
%check
%pyunittest discover -v
%pre
if [ $1 -gt 1 ] ; then
[ "$(readlink -e %{python_sitelib}/pytz/zoneinfo)" == "%{python_sitelib}/pytz/zoneinfo" ] && rm -rf %{python_sitelib}/pytz/zoneinfo
fi || :
%files %{python_files}
%license LICENSE.txt
%doc README.rst