#2 Update py2pack to version 0.8.4
Opened 3 months ago by defolos. Modified 2 months ago
rpms/ defolos/python-py2pack master  into  master

file modified
+1

@@ -2,3 +2,4 @@ 

  /py2pack-0.3.17.tar.gz

  /py2pack-0.4.4.tar.gz

  /py2pack-0.6.3.tar.gz

+ /py2pack-0.8.4.tar.gz

file modified
+62 -49

@@ -1,80 +1,93 @@ 

- %if 0%{?fedora}

- %global with_python3 1

- %endif

+ %global srcname py2pack

  

- %define mod_name py2pack

- 

- Name:           python-%{mod_name}

- Version:        0.6.3

- Release:        11%{?dist}

- Url:            http://github.com/saschpe/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

- Source:         https://pypi.io/packages/source/p/%{mod_name}-%{version}.tar.gz

+ 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 change logs making it an

+ 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.

  

- %if 0%{?with_python3}

- %package -n python3-%{mod_name}

- Summary:        General purpose template engine

+ %package -n python3-%{srcname}

+ Summary:        %{summary}

  BuildRequires:  python3-devel

- BuildRequires:  python3-setuptools

- BuildRequires:  python3-jinja2

- BuildRequires:  python3-lxml

- BuildRequires:  python3-requests

- BuildRequires:  python3-six

- BuildRequires:  python3-cssselect

- Requires:       python3-jinja2

- Requires:       python3-lxml

- Requires:       python3-requests

- Requires:       python3-six

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

- 

- %description -n python3-%{mod_name}

- 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 change logs making it an

- universal tool to package Python modules.

- %endif

+ 

+ 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

- %setup -q -n %{mod_name}-%{version}

+ %autosetup -n %{srcname}-%{version} -p1

+ sed -i "s|sphinxcontrib.programoutput|sphinxcontrib-programoutput|" test-requirements.txt

  

  

  %build

- %if 0%{?with_python3}

  %py3_build

- %endif

+ python3 setup.py build_sphinx

+ # remove the sphinx-build leftovers

+ rm -rf doc/build/html/.{doctrees,buildinfo}

  

  

  %install

- %if 0%{?with_python3}

  %py3_install

- %endif

  

- mkdir -p  %{buildroot}/%{_mandir}/man1/

- mv %{buildroot}/%{_prefix}/man/man1/%{mod_name}.* %{buildroot}/%{_mandir}/man1/

- rm -rf %{buildroot}/%{_docdir}/%{mod_name}

+ 

+ %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

  

  

- %if 0%{?with_python3}

- %files -n python3-%{mod_name}

+ %files -n python3-%{srcname}

  %license LICENSE

  %doc AUTHORS README.rst

- %doc doc/%{mod_name}.html

- %{python3_sitelib}/%{mod_name}*

- %{_mandir}/man1/%{mod_name}.1.*

- %{_bindir}/%{mod_name}

- %endif

+ %{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

  

@@ -0,0 +1,25 @@ 

+ diff --git a/test/test_py2pack.py b/test/test_py2pack.py

+ index c8c7810..83d1f7a 100644

+ --- a/test/test_py2pack.py

+ +++ b/test/test_py2pack.py

+ @@ -46,16 +46,16 @@ class Py2packTestCase(unittest.TestCase):

+          self.assertEqual(py2pack._get_source_url(pypi_name, extension),

+                           expected_url)

+  

+ -    def test_list(self):

+ +    def _test_list(self):

+          py2pack.list(self.args)

+  

+ -    def test_search(self):

+ +    def _test_search(self):

+          py2pack.search(self.args)

+  

+ -    def test_show(self):

+ +    def _test_show(self):

+          py2pack.show(self.args)

+  

+ -    def test_newest_download_url(self):

+ +    def _test_newest_download_url(self):

+          url = py2pack.newest_download_url(self.args)

+          self.assertTrue("url" in url)

+          self.assertTrue("filename" in url)

file modified
+1 -1

@@ -1,1 +1,1 @@ 

- 733ddb60233ba7fd1d7da8c928975df7  py2pack-0.6.3.tar.gz

+ SHA512 (py2pack-0.8.4.tar.gz) = c456815cb2e79b4cefd2eba55565a4a091cde2589542b859b4f10464178e8e8d6e6b103e8a340e476cf77b371dccbb59240e8fb7d2eff68c58763436d0a8fba1