2020-12-31 15:11:05 +08:00
|
|
|
%bcond_with tests
|
|
|
|
|
|
|
|
|
|
%global modname py
|
|
|
|
|
%global modnameversion %{modname}-%{version}
|
|
|
|
|
%global p2builddir python2tmp
|
|
|
|
|
%global p3builddir python3tmp
|
|
|
|
|
|
|
|
|
|
Name: python-%{modname}
|
2021-12-15 14:03:26 +08:00
|
|
|
Version: 1.11.0
|
2022-07-21 15:42:45 +08:00
|
|
|
Release: 2
|
2020-12-31 15:11:05 +08:00
|
|
|
Summary: Library with cross-python path, ini-parsing, io, code, log facilities
|
|
|
|
|
License: MIT and Public Domain
|
|
|
|
|
URL: http://pylib.readthedocs.io/en/stable/
|
2021-12-15 14:03:26 +08:00
|
|
|
Source0: https://files.pythonhosted.org/packages/98/ff/fec109ceb715d2a6b4c4a85a61af3b40c723a961e8828319fbcb15b868dc/py-1.11.0.tar.gz
|
2020-12-31 15:11:05 +08:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
BuildRequires: subversion
|
|
|
|
|
%endif
|
2019-12-17 09:58:46 +08:00
|
|
|
|
|
|
|
|
%global _description \
|
|
|
|
|
The py lib is a Python development support library featuring the\
|
|
|
|
|
following tools and modules:\
|
|
|
|
|
\
|
|
|
|
|
* py.path: uniform local and svn path objects\
|
|
|
|
|
* py.apipkg: explicit API control and lazy-importing\
|
|
|
|
|
* py.iniconfig: easy parsing of .ini files\
|
|
|
|
|
* py.code: dynamic code generation and introspection
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
%{_description}
|
|
|
|
|
|
2020-12-31 15:11:05 +08:00
|
|
|
%package -n python3-%{modname}
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
BuildRequires: python3-devel python3-setuptools python3-setuptools_scm
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
BuildRequires: python3-pytest >= 2.9.0, python3-pytest < 2.10
|
|
|
|
|
%endif
|
|
|
|
|
Requires: python3-setuptools
|
|
|
|
|
%{?python_provide:%python_provide python3-%{modname}}
|
|
|
|
|
Provides: bundled(python3-apipkg) = 1.4 bundled(python3-iniconfig) = 1.0.0
|
|
|
|
|
Obsoletes: platform-python-%{modname} < %{version}-%{release}
|
2019-12-17 09:58:46 +08:00
|
|
|
|
2020-12-31 15:11:05 +08:00
|
|
|
%description -n python3-%{modname}
|
2020-12-09 16:22:31 +08:00
|
|
|
%{_description}
|
2019-12-17 09:58:46 +08:00
|
|
|
|
2020-12-31 15:11:05 +08:00
|
|
|
%package_help
|
|
|
|
|
|
2019-12-17 09:58:46 +08:00
|
|
|
%prep
|
2020-12-31 15:11:05 +08:00
|
|
|
%autosetup -c -n %{modnameversion}
|
|
|
|
|
|
|
|
|
|
find %{modnameversion} \
|
|
|
|
|
-type f -a \( -name '*.py' -o -name 'py.*' \) \
|
|
|
|
|
-exec sed -i '1{/^#!/d}' {} \; \
|
|
|
|
|
-exec chmod u=rw,go=r {} \;
|
|
|
|
|
|
|
|
|
|
mv %{modnameversion} %{p3builddir}
|
2019-12-17 09:58:46 +08:00
|
|
|
|
|
|
|
|
%build
|
2020-12-31 15:11:05 +08:00
|
|
|
pushd %{p3builddir}
|
2019-12-17 09:58:46 +08:00
|
|
|
%py3_build
|
2020-12-31 15:11:05 +08:00
|
|
|
popd
|
2019-12-17 09:58:46 +08:00
|
|
|
|
|
|
|
|
%install
|
2020-12-31 15:11:05 +08:00
|
|
|
pushd %{p3builddir}
|
2019-12-17 09:58:46 +08:00
|
|
|
%py3_install
|
|
|
|
|
popd
|
|
|
|
|
|
2020-12-31 15:11:05 +08:00
|
|
|
%check
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
pushd %{p3builddir}
|
|
|
|
|
PYTHONPATH=%{buildroot}%{python3_sitelib} LC_ALL="en_US.UTF-8" \
|
|
|
|
|
py.test-%{python3_version} -r s -k"-TestWCSvnCommandPath" testing
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
2019-12-17 09:58:46 +08:00
|
|
|
|
2020-12-31 15:11:05 +08:00
|
|
|
%files -n python3-%{modname}
|
|
|
|
|
%license %{p3builddir}/LICENSE
|
|
|
|
|
%{python3_sitelib}/py-*.egg-info/
|
|
|
|
|
%{python3_sitelib}/py/
|
2019-12-17 09:58:46 +08:00
|
|
|
|
2020-12-31 15:11:05 +08:00
|
|
|
%files help
|
2021-08-10 20:56:52 +08:00
|
|
|
%doc %{p3builddir}/CHANGELOG.rst
|
2020-12-31 15:11:05 +08:00
|
|
|
%doc %{p3builddir}/README.rst
|
2020-12-09 16:22:31 +08:00
|
|
|
|
2020-12-31 15:11:05 +08:00
|
|
|
%changelog
|
2022-07-21 15:42:45 +08:00
|
|
|
* Thu Jul 21 2022 wulei <wulei80@h-partners.com> - 1.11.0-2
|
|
|
|
|
- Sphinx 4.4.x causes python-py to fail to be compiled, so remove doc from python-py
|
|
|
|
|
|
2021-12-15 14:03:26 +08:00
|
|
|
* Wed Dec 15 2021 shixuantong <shixuantong@huawei.com> - 1.11.0-1
|
|
|
|
|
- update version to 1.11.0
|
|
|
|
|
|
2021-08-10 20:56:52 +08:00
|
|
|
* Thu Jul 15 2021 OpenStack_SIG <openstack@openeuler.org> - 1.10.0-1
|
|
|
|
|
- Update version to 1.10.0
|
|
|
|
|
|
|
|
|
|
* Mon Aug 10 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 1.5.4-5
|
2020-08-11 10:14:36 +08:00
|
|
|
- Remove python2
|
|
|
|
|
|
2019-12-17 09:58:46 +08:00
|
|
|
* Tue Dec 10 2019 mengxian <mengxian@huawei.com> - 1.5.4-4
|
|
|
|
|
- Package init
|