Blob Blame History Raw
%global pkgname martian
Name:          python-%{pkgname}
Version:       0.15
Release:       2%{?dist}
Summary:       A library to grok configuration from Python code
License:       ZPLv2.1
URL:           https://pypi.python.org/pypi/%{pkgname}
Source0:       https://files.pythonhosted.org/packages/source/m/%{pkgname}/%{pkgname}-%{version}.zip
BuildArch:     noarch 

%global _description\
A library that allows the embedding of configuration information in\
Python code. Martian can then grok the system and do the appropriate\
configuration registrations. One example of a system that uses Martian\
is the system where it originated: Grok

%description %_description

%package -n python2-%{pkgname}
Summary:       %{summary}

BuildRequires: python2-devel
BuildRequires: python2-zope-interface
BuildRequires: python2-setuptools
Requires:      python2-zope-interface

%{?python_provide:%python_provide python2-%{pkgname}}

%description -n python2-%{pkgname} %_description

%package -n python3-%{pkgname}
Summary:       %{summary}

BuildRequires: python3-devel
BuildRequires: python3-zope-interface
BuildRequires: python3-setuptools
Requires:      python3-zope-interface

%{?python_provide:%python_provide python3-%{pkgname}}

%description -n python3-%{pkgname} %_description

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

rm -rf %{py3dir}
cp -a . %{py3dir}
rm src/%{pkgname}/testing_compat3.py

%build
%py2_build

pushd %{py3dir}
%py3_build
popd

%install
%py2_install

pushd %{py3dir}
%py3_install
popd

%check
# This test fails:
# Traceback (most recent call last):
#  File "test_all.py", line 3, in <module>
#    from martian.testing import FakeModule
#ImportError: No module named martian.testing

%files -n python2-%{pkgname}
%license LICENSE.txt
%doc CHANGES.txt COPYRIGHT.txt CREDITS.txt README.txt PKG-INFO
%{python2_sitelib}/%{pkgname}
%{python2_sitelib}/%{pkgname}-*.egg-info

%files -n python3-%{pkgname}
%license LICENSE.txt
%doc CHANGES.txt COPYRIGHT.txt CREDITS.txt README.txt PKG-INFO
%{python3_sitelib}/%{pkgname}
%{python3_sitelib}/%{pkgname}-*.egg-info

%changelog
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Mon Sep 18 2017 Jan Beran <jberan@redhat.com> - 0.15-1
- New version including Python 3 subpackage 

* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.14-9
- Python 2 binary package renamed to python2-martian
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14-6
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Tue Jun 11 2013 Marcelo Barbosa <mr.marcelo.barbosa@gmail.com> - 0.14-1
- Initial package