]> git.pld-linux.org Git - packages/python-blessings.git/blame - python-blessings.spec
rebuild with python 3.10
[packages/python-blessings.git] / python-blessings.spec
CommitLineData
3cc171a0
ER
1#
2# Conditional build:
3%bcond_without tests # unit tests
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module blessings
8%define egg_name blessings
9%define pypi_name blessings
10Summary: Python library for terminal coloring, styling, and positioning
11Name: python-%{module}
12Version: 1.7
3080a8de 13Release: 3
3cc171a0
ER
14License: MIT
15Group: Libraries/Python
16Source0: https://files.pythonhosted.org/packages/source/b/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
17# Source0-md5: 38555a2bba0ace706aec58444368e022
18Patch1: 0001-fix-tests-when-run-without-a-tty-fixes-25.patch
19Patch2: 0002-more-fixes-for-tests-without-a-tty.patch
20URL: https://github.com/erikrose/blessings
21%if %{with python2}
22BuildRequires: python-modules >= 1:2.5
23BuildRequires: python-nose
24BuildRequires: python-setuptools
25BuildRequires: python-six
26%endif
27%if %{with python3}
28BuildRequires: python3-modules >= 1:3.2
29BuildRequires: python3-nose
30BuildRequires: python3-setuptools
31BuildRequires: python3-six
32%endif
3cc171a0
ER
33BuildArch: noarch
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
37Blessings is a thin, practical wrapper around terminal coloring,
38styling, and positioning in Python.
39
40%package -n python3-%{module}
41Summary: Python 3 library for terminal coloring, styling, and positioning
42Group: Libraries/Python
3cc171a0
ER
43
44%description -n python3-%{module}
45Blessings is a thin, practical wrapper around terminal coloring,
46styling, and positioning in Python.
47
48%prep
49%setup -q -n %{pypi_name}-%{version}
50%patch1 -p1
51%patch2 -p1
52rm -r blessings.egg-info
53
54%build
55%if %{with python2}
56%py_build
57%if %{with tests}
58nosetests-%{py_ver} build-2/lib
59%endif
60%endif
61%if %{with python3}
62%py3_build
63%if %{with tests}
64nosetests-%{py3_ver} build-3/lib
65%endif
66%endif
67
68%install
69rm -rf $RPM_BUILD_ROOT
70%if %{with python2}
71%py_install
72%py_postclean
73%endif
74%if %{with python3}
75%py3_install
76%endif
77
78%clean
79rm -rf $RPM_BUILD_ROOT
80
81%if %{with python2}
82%files
83%defattr(644,root,root,755)
84%doc README.rst LICENSE
85%{py_sitescriptdir}/%{module}
86%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
87%endif
88
89%if %{with python3}
90%files -n python3-%{module}
91%defattr(644,root,root,755)
92%doc README.rst LICENSE
93%{py3_sitescriptdir}/%{module}
94%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
95%endif
This page took 0.150062 seconds and 4 git commands to generate.