Orion Poplawski 919d9b
%global srcname traitlets
Orion Poplawski 919d9b
%if 0%{?fedora}
Orion Poplawski 919d9b
%global with_python3 1
Orion Poplawski 919d9b
%endif
Orion Poplawski 919d9b
Orion Poplawski 919d9b
Name:           python-%{srcname}
Orion Poplawski 919d9b
Version:        4.0.0
bfd8df
Release:        2%{?dist}
Orion Poplawski 919d9b
Summary:        A lightweight derivative of Enthought Traits for configuring Python objects
Orion Poplawski 919d9b
Orion Poplawski 919d9b
License:        BSD
Orion Poplawski 919d9b
URL:            https://github.com/ipython/traitlets
Orion Poplawski 919d9b
Source0:        https://github.com/ipython/traitlets/archive/%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
Orion Poplawski 919d9b
Orion Poplawski 919d9b
BuildArch:      noarch
Orion Poplawski 919d9b
BuildRequires:  python2-devel
Orion Poplawski 919d9b
# For tests
Orion Poplawski 919d9b
BuildRequires:  pytest
Orion Poplawski 919d9b
BuildRequires:  python-nose
Orion Poplawski 919d9b
BuildRequires:  python-decorator
Orion Poplawski 919d9b
BuildRequires:  python-ipython_genutils
Orion Poplawski 919d9b
Requires:       python-decorator
Orion Poplawski 919d9b
Requires:       python-ipython_genutils
Orion Poplawski 919d9b
Provides:       python2-%{srcname} = %{version}-%{release}
Orion Poplawski 919d9b
Orion Poplawski 919d9b
%description
Orion Poplawski 919d9b
A lightweight pure-Python derivative of Enthought Traits, used for
Orion Poplawski 919d9b
configuring Python objects.
Orion Poplawski 919d9b
Orion Poplawski 919d9b
This package powers the config system of IPython and Jupyter.
Orion Poplawski 919d9b
Orion Poplawski 919d9b
Orion Poplawski 919d9b
%if 0%{?with_python3}
Orion Poplawski 919d9b
%package -n python3-%{srcname}
Orion Poplawski 919d9b
Summary:        A lightweight derivative of Enthought Traits for configuring Python objects
Orion Poplawski 919d9b
BuildRequires:  python3-devel
Orion Poplawski 919d9b
# For tests
Orion Poplawski 919d9b
BuildRequires:  python3-pytest
Orion Poplawski 919d9b
BuildRequires:  python3-nose
Orion Poplawski 919d9b
BuildRequires:  python3-decorator
Orion Poplawski 919d9b
BuildRequires:  python3-ipython_genutils
Orion Poplawski 919d9b
Requires:       python3-decorator
Orion Poplawski 919d9b
Requires:       python3-ipython_genutils
Orion Poplawski 919d9b
Orion Poplawski 919d9b
%description -n python3-%{srcname}
Orion Poplawski 919d9b
A lightweight pure-Python derivative of Enthought Traits, used for
Orion Poplawski 919d9b
configuring Python objects.
Orion Poplawski 919d9b
Orion Poplawski 919d9b
This package powers the config system of IPython and Jupyter.
Orion Poplawski 919d9b
%endif
Orion Poplawski 919d9b
Orion Poplawski 919d9b
Orion Poplawski 919d9b
%prep
Orion Poplawski 919d9b
%setup -q -n %{srcname}-%{version}
Orion Poplawski 919d9b
Orion Poplawski 919d9b
Orion Poplawski 919d9b
%build
Orion Poplawski 919d9b
%{__python2} setup.py build
Orion Poplawski 919d9b
%if 0%{?with_python3}
Orion Poplawski 919d9b
%{__python3} setup.py build
Orion Poplawski 919d9b
%endif
Orion Poplawski 919d9b
Orion Poplawski 919d9b
Orion Poplawski 919d9b
%install
Orion Poplawski 919d9b
%{__python2} setup.py install --skip-build --root %{buildroot}
Orion Poplawski 919d9b
%if 0%{?with_python3}
Orion Poplawski 919d9b
%{__python3} setup.py install --skip-build --root %{buildroot}
Orion Poplawski 919d9b
%endif
Orion Poplawski 919d9b
Orion Poplawski 919d9b
Orion Poplawski 919d9b
%check
Orion Poplawski 919d9b
py.test-%{python2_version} -v %{srcname}/tests/
Orion Poplawski 919d9b
%if 0%{?with_python3}
Orion Poplawski 919d9b
py.test-%{python3_version} -v %{srcname}/tests/
Orion Poplawski 919d9b
%endif
Orion Poplawski 919d9b
Orion Poplawski 919d9b
 
Orion Poplawski 919d9b
%files
Orion Poplawski 919d9b
%doc README.md
Orion Poplawski 919d9b
%license COPYING.md
Orion Poplawski 919d9b
%{python2_sitelib}/*
Orion Poplawski 919d9b
Orion Poplawski 919d9b
%if 0%{?with_python3}
Orion Poplawski 919d9b
%files -n python3-%{srcname}
Orion Poplawski 919d9b
%doc README.md
Orion Poplawski 919d9b
%license COPYING.md
Orion Poplawski 919d9b
%{python3_sitelib}/*
Orion Poplawski 919d9b
%endif
Orion Poplawski 919d9b
Orion Poplawski 919d9b
Orion Poplawski 919d9b
%changelog
bfd8df
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.0-2
bfd8df
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
bfd8df
Orion Poplawski 919d9b
* Fri Jul 10 2015 Orion Poplawski <orion@cora.nwra.com> - 4.0.0-1
Orion Poplawski 919d9b
- Initial package