%global srcname Traits %global modname traits %global commit ac5d0296def6a389f932add5fbcab2eef6e7334e %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: python-%{srcname} Version: 4.5.0 Release: 11.git%{shortcommit}%{?dist} Summary: Explicitly typed attributes for Python Group: Development/Libraries # Images have different licenses. For image license breakdown check # image_LICENSE.txt file. License: BSD and EPL and LGPLv2+ URL: http://code.enthought.com/projects/traits/ #Source0: https://pypi.python.org/packages/source/t/traits/%{modname}-%{version}.tar.gz Source0: https://github.com/enthought/traits/archive/%{commit}/%{modname}-%{shortcommit}.tar.gz # we don't want to provide private python extension libs %global __provides_exclude_from ^(%{python2_sitearch}|%{python3_sitearch})/.*\\.so$ %description The traits package developed by Enthought provides a special type definition called a trait. Although they can be used as normal Python object attributes, traits also have several additional characteristics: * Initialization: A trait can be assigned a default value. * Validation: A trait attribute's type can be explicitly declared. * Delegation: The value of a trait attribute can be contained either in another object. * Notification: Setting the value of a trait attribute can trigger notification of other parts of the program. * Visualization: User interfaces that permit the interactive modification of a trait's value can be automatically constructed using the trait's definition. %package -n python2-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python2-%{srcname}} %{?python_provide:%python_provide python2-%{modname}} BuildRequires: python2-devel python2-setuptools BuildRequires: python2-nose Requires: numpy Provides: python2-%{modname} = %{version}-%{release} %description -n python2-%{srcname} The traits package developed by Enthought provides a special type definition called a trait. Although they can be used as normal Python object attributes, traits also have several additional characteristics: * Initialization: A trait can be assigned a default value. * Validation: A trait attribute's type can be explicitly declared. * Delegation: The value of a trait attribute can be contained either in another object. * Notification: Setting the value of a trait attribute can trigger notification of other parts of the program. * Visualization: User interfaces that permit the interactive modification of a trait's value can be automatically constructed using the trait's definition. Python 2 version. %package -n python3-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python3-%{srcname}} %{?python_provide:%python_provide python3-%{modname}} BuildRequires: python3-devel python3-setuptools BuildRequires: python3-nose Requires: python3-numpy Provides: python3-%{modname} = %{version}-%{release} %description -n python3-%{srcname} The traits package developed by Enthought provides a special type definition called a trait. Although they can be used as normal Python object attributes, traits also have several additional characteristics: * Initialization: A trait can be assigned a default value. * Validation: A trait attribute's type can be explicitly declared. * Delegation: The value of a trait attribute can be contained either in another object. * Notification: Setting the value of a trait attribute can trigger notification of other parts of the program. * Visualization: User interfaces that permit the interactive modification of a trait's value can be automatically constructed using the trait's definition. Python 3 version. %prep %autosetup -n %{modname}-%{commit} # we already have a bit another flags sed -i -e '/extra_compile_args=/d' setup.py %build %py2_build %py3_build %install %py2_install %py3_install %check pushd build/lib.*-%{python2_version} nosetests-%{python2_version} -v popd pushd build/lib.*-%{python3_version} nosetests-%{python3_version} -v popd %files -n python2-%{srcname} %license LICENSE.txt %doc CHANGES.txt examples/tutorials README.rst %{python2_sitearch}/%{modname}* %files -n python3-%{srcname} %license LICENSE.txt %doc CHANGES.txt examples/tutorials README.rst %{python3_sitearch}/%{modname}* %changelog * Tue Jul 19 2016 Fedora Release Engineering - 4.5.0-11.gitac5d029 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Wed Mar 2 2016 Orion Poplawski - 4.5.0-10.gitac5d029 - Provide python2/3-traits * Thu Feb 04 2016 Fedora Release Engineering - 4.5.0-9.gitac5d029 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Nov 11 2015 Fedora Release Engineering 4.5.0-8.gitac5d029 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Fri Nov 06 2015 Igor Gnatenko - 4.5.0-7.gitac5d029 - Update to snapshot - Add python3 subpackage * Mon Aug 10 2015 Orion Poplawski - 4.5.0-5 - Modernize spec * Thu Jun 18 2015 Fedora Release Engineering - 4.5.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun Aug 17 2014 Fedora Release Engineering - 4.5.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 4.5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed May 14 2014 Orion Poplawski - 4.5.0-1 - Update to 4.5.0 * Thu Jan 30 2014 Orion Poplawski - 4.4.0-1 - Update to 4.4.0 * Tue Aug 06 2013 Orion Poplawski - 4.3.0-3 - Drop BR on python-setupdocs, no longer used * Sun Aug 04 2013 Fedora Release Engineering - 4.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Tue Apr 23 2013 Orion Poplawski - 4.3.0-1 - Update to 4.3.0 - Add python lib provides filter - Add Provides: python-traits - Drop line-ending fix, no longer needed - Add %%check - Drop %%defattr * Thu Feb 14 2013 Fedora Release Engineering - 4.2.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Jul 21 2012 Fedora Release Engineering - 4.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Wed Jun 6 2012 Orion Poplawski - 4.2.0-1 - Update to 4.2.0 * Sat Jan 14 2012 Fedora Release Engineering - 3.5.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Feb 08 2011 Fedora Release Engineering - 3.5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Jan 05 2011 Rakesh Pandit 3.5.0-1 - Updated to 3.5.0 * Fri Aug 13 2010 Chen Lei 3.4.0-1 - Update spec to match latest guidelines w.r.t %%clean - Fix timestamps for example files - Remove BR:numpy * Wed Jul 21 2010 David Malcolm - 3.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Sun Jan 31 2010 Rakesh Pandit 3.2.0-1 - Updated to 3.2.0 * Sun Jul 26 2009 Fedora Release Engineering - 3.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Fri Jun 12 2009 Rakesh Pandit 3.1.0-2 - Fixed missing setupdocs BR * Fri Jun 12 2009 Rakesh Pandit 3.1.0-1 - Updated * Tue Jan 27 2009 Rakesh Pandit 3.0.2-2 - Fixed permissions for ctraits.so and _speedups.so - Fixed license after confirming from upstream * Sun Dec 07 2008 Rakesh Pandit 3.0.2-1 - Initial package