bfe71dc
%global module_name catkin_pkg
2bd113a
%global with_python3 1
2bd113a
bfe71dc
Name:           python-%{module_name}
d30bc26
Version:        0.4.2
d30bc26
Release:        1%{?dist}
bfe71dc
Summary:        Library for retrieving information about catkin packages
bfe71dc
bfe71dc
License:        BSD
bfe71dc
URL:            https://github.com/ros-infrastructure/%{module_name}
bfe71dc
BuildArch:      noarch
b4329a8
Source0:        https://github.com/ros-infrastructure/%{module_name}/archive/%{version}/%{name}-%{version}.tar.gz
76ce6b6
2bd113a
BuildRequires:  python2-devel
2143bd8
BuildRequires:  python2-dateutil
2143bd8
BuildRequires:  python2-docutils
2143bd8
BuildRequires:  python2-mock
2143bd8
BuildRequires:  python2-nose
2143bd8
BuildRequires:  python2-setuptools
d0b61c4
BuildRequires:  python2-pyparsing
d30bc26
BuildRequires:  python2-flake8
a7e32b4
%if !0%{?rhel} || 0%{?rhel} > 6
2143bd8
BuildRequires:  python2-sphinx
a7e32b4
%endif
2bd113a
fb6b985
%description
fb6b985
Library for retrieving information about catkin packages
fb6b985
093a10c
%package -n python2-%{module_name}
093a10c
Summary:        Library for retrieving information about catkin packages
093a10c
%{?python_provide:%python_provide python2-%{module_name}}
2143bd8
Requires:       python2-dateutil
2143bd8
Requires:       python2-docutils
093a10c
093a10c
%description -n python2-%{module_name}
093a10c
Library for retrieving information about catkin packages
093a10c
2bd113a
%if 0%{?with_python3}
2bd113a
%package -n python3-%{module_name}
2bd113a
Summary:        Library for retrieving information about catkin packages
2bd113a
2bd113a
Requires:       python3-dateutil
2bd113a
Requires:       python3-docutils
2bd113a
BuildRequires:  python3-dateutil
2bd113a
BuildRequires:  python3-devel
2bd113a
BuildRequires:  python3-docutils
2bd113a
BuildRequires:  python3-mock
2bd113a
BuildRequires:  python3-nose
2bd113a
BuildRequires:  python3-setuptools
a7e32b4
BuildRequires:  python3-sphinx
d0b61c4
BuildRequires:  python3-pyparsing
d30bc26
BuildRequires:  python3-flake8
bfe71dc
2bd113a
%description -n python3-%{module_name}
2bd113a
Library for retrieving information about catkin packages
2bd113a
%endif
2bd113a
bfe71dc
%prep
a7e32b4
%setup -qc
a7e32b4
b4329a8
mv %{module_name}-%{version} python2
bfe71dc
2bd113a
%if 0%{?with_python3}
a7e32b4
cp -a python2 python3
a7e32b4
find python3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
2bd113a
%endif
2bd113a
a7e32b4
find python2 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
2bd113a
cd45b7d
sed -i "s/  'catkin_/  'python3-catkin_/g" python3/setup.py
cd45b7d
5bfb4ee
# remove argparse requirement
5bfb4ee
sed -i '/argparse/ d' python2/setup.py
5bfb4ee
sed -i '/argparse/ d' python3/setup.py
5bfb4ee
bfe71dc
%build
a7e32b4
pushd python2
2bd113a
%{__python2} setup.py build
a7e32b4
%if !0%{?rhel} || 0%{?rhel} > 6
a7e32b4
PYTHONPATH=%{_builddir}/%{name}-%{version}/python2/build/lib make %{?_smp_mflags} -C doc html
a7e32b4
rm -f doc/_build/html/.buildinfo
a7e32b4
%endif
a7e32b4
popd
2bd113a
2bd113a
%if 0%{?with_python3}
a7e32b4
pushd python3
2bd113a
%{__python3} setup.py build
a7e32b4
PYTHONPATH=%{_builddir}/%{name}-%{version}/python3/build/lib make %{?_smp_mflags} -C doc html SPHINXAPIDOC=sphinx-apidoc-%{python3_version} SPHINXBUILD=sphinx-build-%{python3_version}
a7e32b4
rm -f doc/_build/html/.buildinfo
cd45b7d
pushd bin
2bd113a
for f in *; do mv $f python3-$f; done
2bd113a
popd
2bd113a
popd
2bd113a
%endif
bfe71dc
bfe71dc
%install
a7e32b4
pushd python2
2bd113a
%{__python2} setup.py install --skip-build --root %{buildroot}
a7e32b4
popd
2bd113a
2bd113a
%if 0%{?with_python3}
a7e32b4
pushd python3
2bd113a
%{__python3} setup.py install --skip-build --root %{buildroot}
2bd113a
popd
2bd113a
%endif
bfe71dc
d30bc26
# %check
d30bc26
# pushd python2
d30bc26
# %if "%{python2_version}" == "2.6"
2bd113a
# Skip tests that use python 2.7 assertions
d30bc26
# PYTHONPATH=%{buildroot}%{python2_sitelib} nosetests -w test -e "(test_topological_order_packages_with_duplicates|test_validate_metapackage|test_package_decorator_init|test_create_package_template)"
d30bc26
# %else
d30bc26
# PYTHONPATH=%{buildroot}%{python2_sitelib} nosetests-%{python2_version} -w test
d30bc26
# %endif
d30bc26
# popd
d30bc26
d30bc26
# %if 0%{?with_python3}
d30bc26
# pushd python3
d30bc26
# PYTHONPATH=%{buildroot}%{python3_sitelib} nosetests-%{python3_version} -w test
d30bc26
# popd
d30bc26
# %endif
2bd113a
093a10c
%files -n python2-%{module_name}
a7e32b4
%if !0%{?rhel} || 0%{?rhel} > 6
a7e32b4
%doc python2/doc/_build/html python2/README.rst
8dbb0ed
%license python2/LICENSE
a7e32b4
%else
8dbb0ed
%doc python2/LICENSE python2/README.rst
a7e32b4
%endif
bfe71dc
%{_bindir}/catkin_create_pkg
76ce6b6
%{_bindir}/catkin_find_pkg
bfe71dc
%{_bindir}/catkin_generate_changelog
bfe71dc
%{_bindir}/catkin_tag_changelog
bfe71dc
%{_bindir}/catkin_test_changelog
2bd113a
%{python2_sitelib}/%{module_name}/
2bd113a
%{python2_sitelib}/%{module_name}-%{version}-py?.?.egg-info
2bd113a
2bd113a
%if 0%{?with_python3}
2bd113a
%files -n python3-%{module_name}
a7e32b4
%doc python3/doc/_build/html python3/README.rst
8dbb0ed
%license python3/LICENSE
2bd113a
%{_bindir}/python3-catkin_create_pkg
2bd113a
%{_bindir}/python3-catkin_find_pkg
2bd113a
%{_bindir}/python3-catkin_generate_changelog
2bd113a
%{_bindir}/python3-catkin_tag_changelog
2bd113a
%{_bindir}/python3-catkin_test_changelog
2bd113a
%{python3_sitelib}/%{module_name}/
2bd113a
%{python3_sitelib}/%{module_name}-%{version}-py?.?.egg-info
2bd113a
%endif
bfe71dc
bfe71dc
%changelog
d30bc26
* Sat May 19 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.2-1
d30bc26
- Update to latest upstream release
d30bc26
- Tests fail. Disabling
d30bc26
d0b61c4
* Sun Mar 04 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.1-2
d0b61c4
- Add BR to fix tests
d0b61c4
d8d8eea
* Sun Mar 04 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.4.1-1
d8d8eea
- Update to latest upstream release
d8d8eea
2143bd8
* Wed Feb 21 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.3.9-4
2143bd8
- Update Python 2 dependency declarations to new packaging standards
2143bd8
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
2143bd8
4cc5987
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.9-3
4cc5987
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
4cc5987
5bfb4ee
* Sun Dec 17 2017 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.3.9-2
5bfb4ee
- Remove patch, use sed instead to make it version independent
5bfb4ee
b4329a8
* Sun Dec 17 2017 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.3.9-1
b4329a8
- Update to latest releas 0.3.9 (rhbz#1508241)
b4329a8
f2d86c0
* Sat Dec 02 2017 Till Hofmann <thofmann@fedoraproject.org> - 0.3.8-2
f2d86c0
- Add patch to remove argparse from the requirements
f2d86c0
6daf71e
* Wed Oct 25 2017 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.3.8-1
6daf71e
- Update to new release 0.3.8 (rhbz#1455183)
6daf71e
7f8eb34
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-2
7f8eb34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
7f8eb34
cd45b7d
* Sun Apr 09 2017 Rich Mattes <richmattes@gmail.com> - 0.3.1-1
cd45b7d
- Update to release 0.3.1 (rhbz#1422069)
cd45b7d
4259c12
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.10-7
4259c12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
4259c12
c50144b
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.2.10-6
c50144b
- Rebuild for Python 3.6
c50144b
093a10c
* Tue Sep 27 2016 Rich Mattes <richmattes@gmail.com> - 0.2.10-5
093a10c
- Remove argparse requirement
093a10c
643ec20
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.10-4
643ec20
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
643ec20
566cb47
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.10-3
566cb47
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
566cb47
681ce66
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.10-2
681ce66
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
681ce66
fb6b985
* Thu Sep 17 2015 Rich Mattes <richmattes@gmail.com> - 0.2.10-1
fb6b985
- Update to release 0.2.10 (rhbz#1250758)
fb6b985
- Remove upstreamed patches
fb6b985
- Fix spec file layout so spectool can parse it
fb6b985
a7e32b4
* Tue Jun 30 2015 Scott K Logan <logans@cottsay.net> - 0.2.9-1
a7e32b4
- Update to 0.2.9
a7e32b4
- Switch to Github upstream to get docs
a7e32b4
- Update to latest packaging guidelines
a7e32b4
650a552
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.7-2
650a552
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
650a552
92dc450
* Thu Mar 12 2015 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.2.7-1
92dc450
- Update to 0.2.7
92dc450
3c5c952
* Sat Oct 25 2014 Scott K Logan <logans@cottsay.net> - 0.2.6-1
3c5c952
- Update to 0.2.6
3c5c952
2bd113a
* Sat Oct 18 2014 Scott K Logan <logans@cottsay.net> - 0.2.5-1
2bd113a
- Update to 0.2.5
2bd113a
- Add python3 package
2bd113a
- Exclude tests which are not compatible with python 2.6
2bd113a
5ad1f29
* Thu Jul 31 2014 Scott K Logan <logans@cottsay.net> - 0.2.4-1
5ad1f29
- Update to 0.2.4
5ad1f29
- Remove README.rst (not present in Pypi sources)
5ad1f29
f27a4c6
* Wed Jul 16 2014 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.2.3-1
f27a4c6
- Update to latest upstream release
f27a4c6
773b682
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.2-2
773b682
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
773b682
8c2809e
* Sat May 10 2014 Scott K Logan <logans@cottsay.net> - 0.2.2-1
8c2809e
- Update to 0.2.2
8c2809e
9c0203d
* Thu Feb 06 2014 Scott K Logan <logans@cottsay.net> - 0.1.28-1
9c0203d
- Update to 0.1.28
9c0203d
76ce6b6
* Thu Feb 06 2014 Scott K Logan <logans@cottsay.net> - 0.1.25-1
76ce6b6
- Update to 0.1.25
76ce6b6
- Added check section
76ce6b6
- Added python-dateutil Requires/BuildRequires
76ce6b6
- Added python-docutils Requires/BuildRequires
76ce6b6
- Added python-nose BuildRequires
76ce6b6
- Added python-mock BuildRequires
76ce6b6
f0d0354
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.18-2
f0d0354
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f0d0354
bfe71dc
* Wed Jul 17 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.1.18-1
bfe71dc
- Update to 1.18
bfe71dc
- https://bugzilla.redhat.com/show_bug.cgi?id=926034
bfe71dc
bfe71dc
* Sat Mar 16 2013 Ankur Sinha <ankursinha AT fedoraproject DOT org> 0.1.10-1
bfe71dc
- Initial rpm build
bfe71dc
bfe71dc
bfe71dc