python-testpath/python-testpath.spec

128 lines
3.0 KiB
RPMSpec
Raw Normal View History

2017-03-09 15:44:23 +00:00
%global pypi_name testpath
Name: python-%{pypi_name}
2017-05-31 18:23:43 +00:00
Version: 0.3.1
2018-06-19 09:21:52 +00:00
Release: 4%{?dist}
2017-03-09 15:44:23 +00:00
Summary: Test utilities for code working with files and commands
License: MIT
URL: https://github.com/jupyter/testpath
# There is no sdist on PyPI, download from GitHub
Source0: %url/archive/%{version}.tar.gz#/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-pip
BuildRequires: python2-devel
BuildRequires: python3-pip
BuildRequires: python3-devel
BuildRequires: python3-flit
BuildRequires: python3-sphinx
BuildRequires: python3-sphinx_rtd_theme
# Tests:
BuildRequires: python2-pytest
2017-05-31 18:23:43 +00:00
BuildRequires: python2-pathlib2
BuildRequires: python3-pathlib2
2017-03-09 15:44:23 +00:00
BuildRequires: python3-pytest
%global _description \
Testpath is a collection of utilities for Python code working with files and \
commands. \
\
It contains functions to check things on the filesystem, and tools for \
mocking system commands and recording calls to those.
%description %_description
%package -n python2-%{pypi_name}
Summary: %summary
%{?python_provide:%python_provide python2-%{pypi_name}}
%description -n python2-%{pypi_name}
%_description
%package -n python3-%{pypi_name}
Summary: %summary
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name}
%_description
%package doc
Summary: %{name} documentation
%description doc
Documentation for %{name}.
%prep
%autosetup -n %{pypi_name}-%{version}
# The exe files are only needed on Microsoft Windows
rm -f %{pypi_name}/*.exe
%build
# this package has no setup.py
# and upstream does not want one
# https://github.com/takluyver/flit/issues/74
# we use flit to create a wheel from sources
2018-06-20 08:54:54 +00:00
flit build --format wheel
2017-03-09 15:44:23 +00:00
# generate html docs
sphinx-build-3 doc html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
# We install the wheel created at %%build
%py2_install_wheel %{pypi_name}-%{version}-py2.py3-none-any.whl
%py3_install_wheel %{pypi_name}-%{version}-py2.py3-none-any.whl
%check
%{__python2} -m pytest -v
%{__python3} -m pytest -v
%files -n python2-%{pypi_name}
%doc README.rst
%license LICENSE
%{python2_sitelib}/%{pypi_name}-%{version}.dist-info/
%{python2_sitelib}/%{pypi_name}/
%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/
%{python3_sitelib}/%{pypi_name}/
%files doc
%doc html
%changelog
2018-06-19 09:21:52 +00:00
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.3.1-4
- Rebuilt for Python 3.7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
2017-05-31 18:23:43 +00:00
* Wed May 31 2017 Miro Hrončok <mhroncok@redhat.com> - 0.3.1-1
- New version 0.3.1 (#1455375)
- Uses pathlib2 instead of pathlib
2017-03-09 15:44:23 +00:00
* Wed Mar 08 2017 Miro Hrončok <mhroncok@redhat.com> - 0.3-1
- initial package