]> git.pld-linux.org Git - packages/python-cliff.git/blobdiff - python-cliff.spec
- updated to 2.18.0 with some backported fixes
[packages/python-cliff.git] / python-cliff.spec
index 69b4336d4be7a72f43a6fe45d91c84b978775d61..2a0ca8fcc5c01cc05f91c0027100881619bf7274 100644 (file)
@@ -1,69 +1,69 @@
 #
 # Conditional build:
-%bcond_with    tests   # do perform "make test"
+%bcond_without tests   # unit tests
 %bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
 
 Summary:       Command Line Interface Formulation Framework
+Summary(pl.UTF-8):     Command Line Interface Formulation Framework - szkielet formułowania linii poleceń
 Name:          python-cliff
-Version:       2.8.0
-Release:       7
+# keep 2.x here for python2 support
+Version:       2.18.0
+Release:       1
 License:       Apache
 Group:         Libraries/Python
-Source0:       https://pypi.python.org/packages/9e/26/7db86b6fb7bcf335e691a274b8f5141006ea87e7783e43d7ef5a498a09da/cliff-%{version}.tar.gz
-# Source0-md5: 6f1fcd6deb8068984f3f0e594f02f2b7
-URL:           https://pypi.python.org/pypi/cliff
+Source0:       https://files.pythonhosted.org/packages/source/c/cliff/cliff-%{version}.tar.gz
+# Source0-md5: 66490f2c437f543f32afe9e518e3c080
+Patch0:                %{name}-prettytable.patch
+Patch1:                %{name}-mock.patch
+Patch2:                %{name}-py310.patch
+Patch3:                %{name}-py2-test.patch
+URL:           https://pypi.org/project/cliff/
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.714
 %if %{with python2}
+BuildRequires: python-modules >= 1:2.7
 BuildRequires: python-pbr >= 2.0.0
 BuildRequires: python-setuptools
 %if %{with tests}
-BuildRequires: python-PyYAML >= 3.10.0
-BuildRequires: python-cmd2 >= 0.6.7
+BuildRequires: python-PyYAML >= 3.12
+BuildRequires: python-cmd2 >= 0.8.0
 BuildRequires: python-coverage >= 4.0
 BuildRequires: python-mock >= 2.0
 BuildRequires: python-openstackdocstheme >= 1.11.0
-BuildRequires: python-prettytable >= 0.7.1
+BuildRequires: python-prettytable >= 0.7.2
 BuildRequires: python-pyparsing >= 2.1.0
-BuildRequires: python-six >= 1.9.0
+BuildRequires: python-six >= 1.10.0
 BuildRequires: python-stevedore >= 1.20.0
-BuildRequires: python-subunit >= 0.0.18
+BuildRequires: python-subunit >= 1.0.0
 BuildRequires: python-testrepository >= 0.0.18
 BuildRequires: python-testscenarios >= 0.4
-BuildRequires: python-testtools >= 1.4.0
+BuildRequires: python-testtools >= 2.2.0
 BuildRequires: python-unicodecsv >= 0.8.0
-BuildRequires: sphinx-pdg-2 >= 1.6.2
+BuildRequires: sphinx-pdg-2 >= 1.7.0
 %endif
 %endif
 %if %{with python3}
-BuildRequires: python3-modules
+BuildRequires: python3-modules >= 1:3.6
 BuildRequires: python3-pbr >= 2.0.0
 %if %{with tests}
-BuildRequires: python3-PyYAML >= 3.10.0
-BuildRequires: python3-cmd2 >= 0.6.7
+BuildRequires: python3-PyYAML >= 3.12
+BuildRequires: python3-cmd2 >= 0.8.0
 BuildRequires: python3-coverage >= 4.0
-BuildRequires: python3-mock >= 2.0
 BuildRequires: python3-openstackdocstheme >= 1.11.0
-BuildRequires: python3-prettytable >= 0.7.1
+BuildRequires: python3-prettytable >= 0.7.2
 BuildRequires: python3-pyparsing >= 2.1.0
-BuildRequires: python3-six >= 1.9.0
+BuildRequires: python3-six >= 1.10.0
 BuildRequires: python3-stevedore >= 1.20.0
-BuildRequires: python3-subunit >= 0.0.18
+BuildRequires: python3-subunit >= 1.0.0
 BuildRequires: python3-testrepository >= 0.0.18
 BuildRequires: python3-testscenarios >= 0.4
-BuildRequires: python3-testtools >= 1.4.0
-BuildRequires: sphinx-pdg-3 >= 1.6.2
+BuildRequires: python3-testtools >= 2.2.0
+BuildRequires: sphinx-pdg-3 >= 1.7.0
 %endif
 %endif
 BuildRequires: sed >= 4.0
-Requires:      python-PyYAML >= 3.10.0
-Requires:      python-cmd2 >= 0.6.7
-Requires:      python-prettytable >= 0.7.1
-Requires:      python-pyparsing >= 2.1.0
-Requires:      python-six >= 1.9.0
-Requires:      python-stevedore >= 1.20.0
-Requires:      python-unicodecsv >= 0.8.0
+Requires:      python-modules >= 1:2.7
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -72,31 +72,51 @@ cliff is a framework for building command line programs. It uses
 setuptools entry points to provide subcommands, output formatters, and
 other extensions.
 
+%description -l pl.UTF-8
+cliff to szkielet do budowania programów działających z linii poleceń.
+Wykorzystuje punkty wejściowe setuptools do zapewnienia podpoleceń,
+funkcje formatujące wyjścia i inne rozszerzenia.
+
 %package -n python3-cliff
 Summary:       Command Line Interface Formulation Framework
+Summary(pl.UTF-8):     Command Line Interface Formulation Framework - szkielet formułowania linii poleceń
 Group:         Libraries/Python
-Requires:      python3-PyYAML >= 3.10.0
-Requires:      python3-cmd2 >= 0.6.7
-Requires:      python3-prettytable >= 0.7.1
-Requires:      python3-pyparsing >= 2.1.0
-Requires:      python3-six >= 1.9.0
-Requires:      python3-stevedore >= 1.20.0
+Requires:      python3-modules >= 1:3.6
 
 %description -n python3-cliff
 cliff is a framework for building command line programs. It uses
 setuptools entry points to provide subcommands, output formatters, and
 other extensions.
 
+%description -n python3-cliff -l pl.UTF-8
+cliff to szkielet do budowania programów działających z linii poleceń.
+Wykorzystuje punkty wejściowe setuptools do zapewnienia podpoleceń,
+funkcje formatujące wyjścia i inne rozszerzenia.
+
 %prep
 %setup -q -n cliff-%{version}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 %if %{with python2}
+export PYTHON="%{__python}"
 %py_build %{?with_tests:test}
+
+%if %{with tests}
+%{__rm} -r .testrepository
+%endif
 %endif
 
 %if %{with python3}
+export PYTHON="%{__python3}"
 %py3_build %{?with_tests:test}
+
+%if %{with tests}
+%{__rm} -r .testrepository
+%endif
 %endif
 
 %install
@@ -110,10 +130,6 @@ rm -rf $RPM_BUILD_ROOT
 
 %if %{with python3}
 %py3_install
-
-# python dependency generator does not support conditionals
-# remove python2-only dependencies here
-sed -i -e"/python_version<'3.0'/,+1 d" $RPM_BUILD_ROOT%{py3_sitescriptdir}/cliff-%{version}-py*.egg-info/requires.txt
 %endif
 
 %if %{with python2}
This page took 0.133292 seconds and 4 git commands to generate.