Skip to content
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.

Commit

Permalink
Add python-mock-services package
Browse files Browse the repository at this point in the history
  • Loading branch information
ganto committed Dec 18, 2016
1 parent c0c410c commit 705faaf
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 0 deletions.
1 change: 1 addition & 0 deletions python-mock-services/mock-services-0.3.tar.gz
108 changes: 108 additions & 0 deletions python-mock-services/python-mock-services.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
%global pkgname mock-services

%if 0%{?rhel} && 0%{?rhel} <= 7
%bcond_with python3
%else
%bcond_without python3
%endif

Name: python-%{pkgname}
Version: 0.3
Release: 1%{?dist}
Summary: Easy way of mocking API Services
License: MIT
URL: https://pypi.python.org/pypi/%{pkgname}
Source0: https://github.com/novafloss/%{pkgname}/archive/%{version}/%{pkgname}-%{version}.tar.gz
BuildArch: noarch

%description
%{summary}

%package -n python2-%{pkgname}
Summary: Easy way of mocking API Services for Python 2.x
%{?python_provide:%python_provide python2-%{pkgname}}
BuildRequires: python2-attrs
BuildRequires: python2-devel
BuildRequires: python2-flake8
BuildRequires: python2-funcsigs
BuildRequires: python2-nose
BuildRequires: python2-requests
BuildRequires: python-requests-mock
BuildRequires: python2-setuptools
BuildRequires: python-six

Requires: python2-attrs
Requires: python2-funcsigs
Requires: python2-requests-mock

%description -n python2-%{pkgname}
Aims to provide an easy way to mock an entire service
API based on requests-mock and a simple dict definition
of a service.

Python 2 version.

%if %{with python3}
%package -n python3-%{pkgname}
Summary: Easy way of mocking API Services for Python 3.x
%{?python_provide:%python_provide python3-%{pkgname}}
BuildRequires: python3-attrs
BuildRequires: python3-devel
BuildRequires: python3-flake8
BuildRequires: python3-funcsigs
BuildRequires: python3-nose
BuildRequires: python3-requests
BuildRequires: python3-requests-mock
BuildRequires: python3-setuptools
BuildRequires: python3-six

Requires: python3-attrs
Requires: python3-funcsigs
Requires: python3-requests-mock

%description -n python3-%{pkgname}
Aims to provide an easy way to mock an entire service
API based on requests-mock and a simple dict definition
of a service.

Python 3 version.
%endif

%prep
%autosetup -n %{pkgname}-%{version}

%build
%py2_build
%if %{with python3}
%py3_build
%endif

%install
%py2_install
%if %{with python3}
%py3_install
%endif

%check
PYTHONPATH=. nosetests-%{python2_version}
%if %{with python3}
PYTHONPATH=. nosetests-%{python3_version}
%endif

%files -n python2-%{pkgname}
%doc AUTHORS README.rst
%license LICENSE
%{python2_sitelib}/mock_services-%{version}-py%{python2_version}.egg-info
%{python2_sitelib}/mock_services

%if %{with python3}
%files -n python3-%{pkgname}
%doc AUTHORS README.rst
%license LICENSE
%{python3_sitelib}/mock_services-%{version}-py%{python3_version}.egg-info
%{python3_sitelib}/mock_services
%endif

%changelog
* Sun Dec 18 2016 Reto Gantenbein <[email protected]> - 0.3-1
- Initial packaging

0 comments on commit 705faaf

Please sign in to comment.