From 6d49fdff45ca927db5d7e4fc2704ebfabfa7df47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 9 Mar 2017 16:44:23 +0100 Subject: [PATCH] Initial import (#1430481) --- .gitignore | 1 + python-testpath.spec | 113 +++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 115 insertions(+) create mode 100644 python-testpath.spec diff --git a/.gitignore b/.gitignore index e69de29..587ae71 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/testpath-0.3.tar.gz diff --git a/python-testpath.spec b/python-testpath.spec new file mode 100644 index 0000000..5e2fa40 --- /dev/null +++ b/python-testpath.spec @@ -0,0 +1,113 @@ +%global pypi_name testpath + +Name: python-%{pypi_name} +Version: 0.3 +Release: 1%{?dist} +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 +BuildRequires: python-pathlib +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 +flit wheel + +# 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 +* Wed Mar 08 2017 Miro HronĨok - 0.3-1 +- initial package + diff --git a/sources b/sources index e69de29..467b8d9 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (testpath-0.3.tar.gz) = 71a3266e17616c4df4a4c465151e9d48b89f573e4562132e85982b62446396884a270a32b5d4956aac1f0be1a00096cab9d0dc1718ae8b6312b0436eca683bdf