commit 6190475b0510d3198d164b5d5177cfc3006534e8 Author: sigui Date: Thu Nov 28 16:04:59 2019 +0800 init python-atomicwrites diff --git a/python-atomicwrites-1.1.5.tar.gz b/python-atomicwrites-1.1.5.tar.gz new file mode 100644 index 0000000..a1c86f3 Binary files /dev/null and b/python-atomicwrites-1.1.5.tar.gz differ diff --git a/python-atomicwrites.spec b/python-atomicwrites.spec new file mode 100644 index 0000000..421d7b7 --- /dev/null +++ b/python-atomicwrites.spec @@ -0,0 +1,77 @@ +%global _description\ +This Python module provides atomic file writes on POSIX operating systems.\ +It sports:\ +* Race-free assertion that the target file doesn't yet exist\ +* Windows support\ +* Simple high-level API that wraps a very flexible class-based API\ +* Consistent error handling across platforms. + +Name: python-atomicwrites +Version: 1.1.5 +Release: 13 +Summary: Python Atomic file writes on POSIX +License: MIT +URL: https://github.com/untitaker/%{name} +Source0: https://github.com/untitaker/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python2-devel python2-setuptools python3-devel python3-setuptools +BuildRequires: python2-sphinx python3-sphinx python2-pytest python3-pytest + +%description %_description + +%package -n python2-atomicwrites +Summary: %summary +%{?python_provide:%python_provide python2-atomicwrites} + +%description -n python2-atomicwrites %_description + +%package -n python3-atomicwrites +Summary: %summary + +%description -n python3-atomicwrites %_description + +%package -n python-atomicwrites-help +Summary: %summary + +%description -n python-atomicwrites-help +This package conatins manual pages for python2-atomicwrites and python3-atomicwrites + +%prep +%autosetup -n %{name}-%{version} -p1 + +%build +%{__python2} setup.py --quiet build + +%py3_build +export PYTHONPATH=`pwd` +cd docs +%make_build SPHINXBUILD=sphinx-build-3 man +cd .. +unset PYTHONPATH + +%install +%{__python2} setup.py --quiet install -O1 --skip-build --root $RPM_BUILD_ROOT +%py3_install + +install -d "$RPM_BUILD_ROOT%{_mandir}/man1" +cp -r docs/_build/man/*.1 "$RPM_BUILD_ROOT%{_mandir}/man1" + +%check +%{__python2} -m pytest -v +%{__python3} -m pytest -v + +%files -n python2-atomicwrites +%doc LICENSE README.rst +%{python2_sitelib}/* + +%files -n python3-atomicwrites +%doc README.rst LICENSE +%{python3_sitelib}/* + +%files -n python-atomicwrites-help +%{_mandir}/man1/atomicwrites.1.* + +%changelog +* Fri Nov 15 2019 sunguoshuai - 1.1.5-13 +- Package init