python-linecache2/python-linecache2.spec

53 lines
1.4 KiB
RPMSpec
Raw Normal View History

2019-11-28 11:22:16 +08:00
%global package_description\
The linecache module allows one to get any line from any file, while \
attempting to optimize internally, using a cache, the common case where many \
lines are read from a single file. This package provides a backport of \
linecache to older supported Python versions.
Name: python-linecache2
Version: 1.0.0
2020-09-29 11:01:14 +08:00
Release: 20
2019-11-28 11:22:16 +08:00
Summary: A backport of linecache to older supported Python versions
License: Python
URL: https://github.com/testing-cabal/linecache2
2020-09-29 11:01:14 +08:00
Source0: https://pypi.python.org/packages/source/l/linecache2/linecache2-%{version}.tar.gz
2019-11-28 11:22:16 +08:00
BuildArch: noarch
2020-08-10 15:41:33 +08:00
BuildRequires: python3-devel python3-pbr python3-fixtures python3-unittest2
2019-11-28 11:22:16 +08:00
%description
%{package_description}
%package -n python3-linecache2
Summary: A backport of linecache to older supported Python versions
%description -n python3-linecache2
%{package_description}
%prep
2020-08-10 15:41:33 +08:00
%autosetup -n linecache2-%{version}
mv linecache2/tests .
2019-11-28 11:22:16 +08:00
%build
2020-08-10 15:41:33 +08:00
%py3_build
2019-11-28 11:22:16 +08:00
%install
2020-08-10 15:41:33 +08:00
%py3_install
2019-11-28 11:22:16 +08:00
2020-08-10 15:41:33 +08:00
mv tests linecache2/
2019-11-28 11:22:16 +08:00
%{__python3} -m unittest2 -v
2020-08-10 15:41:33 +08:00
mv linecache2/tests .
2019-11-28 11:22:16 +08:00
%files -n python3-linecache2
2020-08-10 15:41:33 +08:00
%doc AUTHORS ChangeLog README.rst
2019-11-28 11:22:16 +08:00
%{python3_sitelib}/*
%changelog
2020-09-29 11:01:14 +08:00
* Tue Sep 29 2020 liuweibo <liuweibo10@huawei.com> - 1.0.0-20
- Fix Source0
2020-08-10 15:41:33 +08:00
* Mon Aug 10 2020 lingsheng <lingsheng@huawei.com> - 1.0.0-19
- Remove python2-linecache2 subpackage
2019-11-28 11:22:16 +08:00
* Tue Nov 26 2019 lihao <lihao129@huawei.com> - 1.0.0-18
- Package Init