Blob Blame History Raw
%global srcname py2pack

Name:           python-%{srcname}
Version:        0.8.4
Release:        1%{?dist}
Url:            https://github.com/openSUSE/py2pack
Summary:        Generate distribution packages from Python packages on PyPI

License:        GPLv2
Source0:        %{pypi_source}
Patch0:         skip_tests_which_require_internet.patch
BuildArch:      noarch

%{?python_enable_dependency_generator}

%description
This script allows to generate RPM spec or DEB dsc files from Python modules. It
allows to list Python modules or search for them on the Python Package Index
(PyPI). Conveniently, it can fetch tarballs and changelogs making it an
universal tool to package Python modules.

%package -n python3-%{srcname}
Summary:        %{summary}
BuildRequires:  python3-devel

BuildRequires:  %{py3_dist Jinja2}
BuildRequires:  %{py3_dist setuptools}
BuildRequires:  %{py3_dist six}
BuildRequires:  %{py3_dist metaextract}
BuildRequires:  %{py3_dist pbr}

# tests
BuildRequires:  %{py3_dist coverage}
BuildRequires:  %{py3_dist ddt}
BuildRequires:  %{py3_dist nose}
BuildRequires:  %{py3_dist flake8}
BuildRequires:  %{py3_dist nose}

%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
%{description}

%package -n %{name}-doc
Summary:        Documentation for %{name}
BuildRequires:  %{py3_dist sphinx} >= 1.2.1
BuildRequires:  %{py3_dist sphinxcontrib-programoutput}

%description -n %{name}-doc
Documentation and help files for %{name}.


%prep
%autosetup -n %{srcname}-%{version} -p1
sed -i "s|sphinxcontrib.programoutput|sphinxcontrib-programoutput|" test-requirements.txt


%build
%py3_build
python3 setup.py build_sphinx
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}


%install
%py3_install


%check
# remove this test as it tries to build python packages and starts downloading
# tarballs from PyPI, which fails in mock
rm test/test_template.py
nosetests-3 -v --with-xunit


%files -n python3-%{srcname}
%license LICENSE
%doc AUTHORS README.rst
%{python3_sitelib}/%{srcname}*
%{_bindir}/%{srcname}

%files -n %{name}-doc
%license LICENSE
%doc doc/build/html/


%changelog
* Sat Jun 29 2019 Dan Čermák <dan.cermak@cgc-instruments.com> - 0.8.4-1
- Update to new upstream version

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.3-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Thu Oct 11 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.6.3-10
- Python2 binary package has been removed
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.6.3-8
- Rebuilt for Python 3.7

* Tue Mar 13 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.6.3-7
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.6.3-3
- Rebuild for Python 3.6

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.3-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Mon Jul 11 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 0.6.3-1
- Upstream 0.6.3

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Haïkel Guémar <hguemar@fedoraproject.org> - 0.4.4-1
- upstream 0.4.4

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

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.17-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.17-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.17-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Fri May 20 2011 Jerome Soyer <saispo@gmail.com> - 0.3.17-1
- Update to upstream release

* Mon May  9 2011 Jerome Soyer <saispo@gmail.com> - 0.3.15-2
- Fix inconsistent use of macros
- Set properly permission for chmod and install
- Totaly commented out the check section
- Disable python3 build since it's not fixed upstream
- Convert tab into spaces
- Use macro buildroot instead of $RPM_BUILD_ROOT

* Mon May  2 2011 Jerome Soyer <saispo@gmail.com> - 0.3.15-1
- Initial build