Blob Blame History Raw
Name:           python-doit
Version:        0.25.0
Release:        1%{?dist}
Summary:        Automation Tool

License:        MIT
URL:            http://python-doit.sourceforge.net/
Source0:        http://pypi.python.org/packages/source/d/doit/doit-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python-inotify
BuildRequires:  python-six

# python-sphinx is needed for documentation
BuildRequires:  python-sphinx

# python-mock and strace are needed to run the tests
BuildRequires:  python-mock
BuildRequires:  strace

Requires:       python-inotify

%description
python-doit is a build tool (in the same class as make, cmake, scons,
ant and others)

python-doit can be used as:
  * a build tool (generic and flexible)
  * home of your management scripts (it helps you organize and combine
   shell scripts and python scripts)
  * a functional tests runner (combine together different tools)
  * a configuration management system
  * manage computational pipelines


%package -n python3-doit
Summary:        Automation Tool
Requires:       python3-inotify

%description -n python3-doit
python-doit is a build tool (in the same class as make, cmake, scons,
ant and others)

python-doit can be used as:
  * a build tool (generic and flexible)
  * home of your management scripts (it helps you organize and combine
   shell scripts and python scripts)
  * a functional tests runner (combine together different tools)
  * a configuration management system
  * manage computational pipelines


%package doc
Summary:        Documentation for %{name}
Requires:       %{name} = %{version}-%{release}


%description doc
%{name} documentation


%prep
%setup -q -n doit-%{version}

#force python3 to use python3-setuptools instead of distribute
rm -rf distribute_setup.py

rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'


%build
%{__python} setup.py build
pushd %{py3dir}
%{__python3} setup.py build
popd

cd doc
make html
rm -rf _build/html/_sources/ _build/html/.buildinfo
cd -


%install
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
rm %{buildroot}%{_bindir}/doit

%{__python} setup.py install --skip-build --root %{buildroot}

install -p -D -m 0644 bash_completion_doit %{buildroot}%{_sysconfdir}/bash_completion.d/doit


%check
# There is a race condition where sometimes there is none, one or two errors
# The error will be reported upstream
#%{__python} runtests.py

#pushd %{py3dir}
#%{__python3} runtests.py
#popd


%files
%{_bindir}/doit
%doc LICENSE
%doc README
%{python_sitelib}/doit
%{python_sitelib}/doit-%{version}-py*.egg-info
%{_sysconfdir}/bash_completion.d

%files -n python3-doit
%doc LICENSE
%doc README.rst
%{python3_sitelib}/doit
%{python3_sitelib}/doit-%{version}-py*.egg-info

%files doc
%doc doc/tutorial
%doc doc/_build/html
%doc CHANGES
%doc TODO.txt


%changelog
* Thu Mar 27 2014 José Matos <jamatos@fedoraproject.org> - 0.25.0-1
- update to 0.25

* Fri Nov 29 2013 José Matos <jamatos@fedoraproject.org> - 0.24.0-1
- update to 0.24

* Thu Nov  7 2013 José Matos <jamatos@fedoraproject.org> - 0.23.0-1
- update to 0.23
- patch that removed distribute bootstrapping during installation is
  gone since this change was incorporated upstream

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

* Sat Jul 13 2013 José Matos <jamatos@fedoraproject.org> - 0.22.0-1
- update to 0.22
- force removal of the distrute_setup.py to use the system version

* Mon Jun  3 2013 José Matos <jamatos@fedoraproject.org> - 0.21.0-2
- Add license and readme to python3 versions since the package can be
  installed separately

* Fri May  3 2013 José Matos <jamatos@fedoraproject.org> - 0.21.0-1
- update to 0.21.0

* Mon Apr 22 2013 José Matos <jamatos@fedoraproject.org> - 0.20.0-1
- New stable release

* Mon Dec  3 2012 José Matos <jamatos@fedoraproject.org> - 0.18.1-1
- New stable release

* Mon Dec  3 2012 José Matos <jamatos@fedoraproject.org> - 0.18.0-5
- remove python3 doit to allow for the python2 doit so stay in bin

* Sun Dec  2 2012 José Matos <jamatos@fedoraproject.org> - 0.18.0-4
- Remove updated version of distribute_setup

* Sun Dec  2 2012 José Matos <jamatos@fedoraproject.org> - 0.18.0-3
- Require python3-setuptools for the package building

* Sun Dec  2 2012 José Matos <jamatos@fedoraproject.org> - 0.18.0-2
- Add python3 subpackage

* Fri Nov 30 2012 José Matos <jamatos@fedoraproject.org> - 0.18.0-1
- Latest stable release