Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37542143
en ru br
Репозитории ALT
S:2021.1-alt2
5.1: 2009j-alt4
4.1: 2006p-alt1.1
4.0: 2006p-alt1
www.altlinux.org/Changes

Группа :: Разработка/Python
Пакет: python-module-pytz

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define _unpackaged_files_terminate_build 1
%define oname pytz

%def_with python3

Name: python-module-%oname
Epoch: 1
Version: 2021.1
Release: alt1

%setup_python_module %oname

Summary: World timezone definitions, modern and historical
Source0: https://files.pythonhosted.org/packages/70/44/404ec10dca553032900a65bcded8b8280cf7c64cc3b723324e2181bf93c9/pytz-%{version}.tar.gz
License: MIT
Group: Development/Python
BuildArch: noarch
Url: http://pytz.sourceforge.net

%if_with python3
BuildRequires(pre): rpm-build-python3 python3-module-setuptools
%endif

%description
pytz brings the Olson tz database into Python. This library allows
accurate and cross platform timezone calculations using Python 2.3
or higher. It also solves the issue of ambiguous times at the end
of daylight savings, which you can read more about in the Python
Library Reference (datetime.tzinfo).

%if_with python3
%package -n python3-module-%oname
Summary: World timezone definitions, modern and historical (Python 3)
Group: Development/Python3

%description -n python3-module-%oname
pytz brings the Olson tz database into Python. This library allows
accurate and cross platform timezone calculations using Python 2.3
or higher. It also solves the issue of ambiguous times at the end
of daylight savings, which you can read more about in the Python
Library Reference (datetime.tzinfo).

%package -n python3-module-%oname-tests
Summary: Tests for pytz (Python 3)
Group: Development/Python3
Requires: python3-module-%oname = %EVR

%description -n python3-module-%oname-tests
pytz brings the Olson tz database into Python. This library allows
accurate and cross platform timezone calculations using Python 2.3
or higher. It also solves the issue of ambiguous times at the end
of daylight savings, which you can read more about in the Python
Library Reference (datetime.tzinfo).

This package contains tests for pytz.
%endif

%package tests
Summary: Tests for pytz
Group: Development/Python
Requires: %name = %EVR

%description tests
pytz brings the Olson tz database into Python. This library allows
accurate and cross platform timezone calculations using Python 2.3
or higher. It also solves the issue of ambiguous times at the end
of daylight savings, which you can read more about in the Python
Library Reference (datetime.tzinfo).

This package contains tests for pytz.

%package -n %oname-zoneinfo
Summary: Archive with zoneinfo
Group: Development/Python

%description -n %oname-zoneinfo
Archive with zoneinfo.

%prep
%setup -q -n %{oname}-%{version}
%if_with python3
rm -rf ../python3
cp -a . ../python3
%endif

%build
%python_build
%if_with python3
pushd ../python3
%python3_build
popd
%endif

%install
%python_install --optimize=2 --record=INSTALLED_FILES
install -d %buildroot%python_sitelibdir/%modulename/tests
install -p -m644 %modulename/tests/* \
%buildroot%python_sitelibdir/%modulename/tests
touch %buildroot%python_sitelibdir/%modulename/tests/__init__.py

%if_with python3
pushd ../python3
%python3_install
install -d %buildroot%python3_sitelibdir/%oname/tests
install -p -m644 %oname/tests/* \
%buildroot%python3_sitelibdir/%oname/tests
touch %buildroot%python3_sitelibdir/%oname/tests/__init__.py
popd
%endif

install -d %buildroot%_datadir/%modulename
pushd %buildroot%python_sitelibdir/%modulename/zoneinfo
tar -czf %buildroot%_datadir/%modulename/zoneinfo.tar.gz *
popd

%files -f INSTALLED_FILES
%python_sitelibdir/%modulename
%exclude %python_sitelibdir/%modulename/tests
%doc *.txt

%files tests
%python_sitelibdir/%modulename/tests

%files -n %oname-zoneinfo
%_datadir/%modulename

%if_with python3
%files -n python3-module-%oname
%doc *.txt
%python3_sitelibdir/*
%exclude %python3_sitelibdir/%oname/tests

%files -n python3-module-%oname-tests
%python3_sitelibdir/%oname/tests
%endif

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin