Blob Blame Raw
Name:           python-nose-testconfig
Version:        0.9
Release:        3%{?dist}
Summary:        Test configuration plugin for nosetests

License:        ASL 2.0
URL:            https://bitbucket.org/jnoller/nose-testconfig/
Source0:        https://pypi.python.org/packages/source/n/nose-testconfig/nose-testconfig-%{version}.tar.gz

# Upstream does not include the license, which is required for redistribution
# See https://bitbucket.org/jnoller/nose-testconfig/issue/10/
Source1:        LICENSE-2.0

BuildArch:      noarch

BuildRequires:  python2-devel, python3-devel
BuildRequires:  python-setuptools, python3-setuptools

Requires:       python-nose
Requires:       PyYAML

%description
nose-testconfig is a plugin to the nose test framework which provides a
faculty for passing test-specific (or test-run specific) configuration data
to the tests being executed.

Currently configuration files in the following formats are supported:

- YAML (via PyYAML <http://pypi.python.org/pypi/PyYAML/>)
- INI (via ConfigParser <http://docs.python.org/lib/module-ConfigParser.html>)
- Pure Python (via Exec)
- JSON (via JSON <http://docs.python.org/library/json.html>)

%package -n python3-nose-testconfig
Summary:        Test configuration plugin for nosetests for Python3
Requires:       python3-nose
Requires:       python3-PyYAML

%description -n python3-nose-testconfig
nose-testconfig is a plugin to the nose test framework which provides a
faculty for passing test-specific (or test-run specific) configuration data
to the tests being executed.

Currently configuration files in the following formats are supported:

- YAML (via PyYAML <http://pypi.python.org/pypi/PyYAML/>)
- INI (via ConfigParser <http://docs.python.org/lib/module-ConfigParser.html>)
- Pure Python (via Exec)
- JSON (via JSON <http://docs.python.org/library/json.html>)

%prep
%setup -q -n nose-testconfig-%{version}
rm -rf nose_testconfig.egg-info
cp %{SOURCE1} .

rm -rf %{py3dir}
cp -a . %{py3dir}

%build
%{__python2} setup.py build

( cd %{py3dir} && %{__python3} setup.py build )

%install
%{__python2} setup.py install --skip-build --root %{buildroot}
( cd %{py3dir} && %{__python3} setup.py install --skip-build --root %{buildroot} )

%files
%doc ACKS TODO docs/index.txt LICENSE-2.0
%{python2_sitelib}/testconfig.py*
%{python2_sitelib}/nose_testconfig-%{version}-*.egg-info

%files -n python3-nose-testconfig
%doc ACKS TODO docs/index.txt LICENSE-2.0
%{python3_sitelib}/testconfig.py*
%{python3_sitelib}/__pycache__/testconfig.*
%{python3_sitelib}/nose_testconfig-%{version}-*.egg-info

%changelog
* Tue Aug 12 2014 David Shea <dshea@redhat.com> - 0.9-3
- Added a comment about the inclusion of an external copy of the ASL

* Mon Aug 11 2014 David Shea <dshea@redhat.com> - 0.9-2
- Include a copy of the Apache Software License, 2.0.

* Thu Apr 10 2014 David Shea <dshea@redhat.com> - 0.9-1
- Initial package