]> git.pld-linux.org Git - packages/python-django-compressor.git/blame - python-django-compressor.spec
rebuild with python 3.10
[packages/python-django-compressor.git] / python-django-compressor.spec
CommitLineData
0629bc99
ER
1#
2# Conditional build:
3%bcond_without doc # don't build doc
2d624667 4%bcond_with tests # do not perform "make test"
0629bc99
ER
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8%define pypi_name django_compressor
9%define module django-compressor
10Summary: Compresses linked and inline JavaScript or CSS into single cached files
11Name: python-%{module}
f9043881 12Version: 2.1.1
0fd60ad1 13Release: 6
0629bc99
ER
14License: MIT
15Group: Libraries/Python
fc9139c1 16Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
f9043881 17# Source0-md5: 5e74141076b70272149ed07e6ce0ea56
fc9139c1 18URL: http://django-compressor.readthedocs.io/
0629bc99
ER
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
22BuildRequires: python-modules
23BuildRequires: python-setuptools
24%endif
25%if %{with python3}
26BuildRequires: python3-modules
27BuildRequires: python3-setuptools
28%endif
0629bc99
ER
29BuildArch: noarch
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
9e40f158 33Django Compressor combines and compresses linked and inline JavaScript
0629bc99
ER
34or CSS in a Django templates into cacheable static files.
35
36%package -n python3-django-compressor
37Summary: Compresses linked and inline JavaScript or CSS into single cached files
38Group: Libraries/Python
0629bc99
ER
39
40%description -n python3-django-compressor
9e40f158 41Django Compressor combines and compresses linked and inline JavaScript
0629bc99
ER
42or CSS in a Django templates into cacheable static files.
43
44%prep
45%setup -q -n %{pypi_name}-%{version}
46
47%build
48%if %{with python2}
49%py_build %{?with_tests:test}
50%endif
51
52%if %{with python3}
53%py3_build %{?with_tests:test}
54%endif
55
56%install
57rm -rf $RPM_BUILD_ROOT
58%if %{with python2}
59%py_install
9c25fb59
ER
60%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/compressor/tests
61%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/compressor/test_*.py*
0629bc99
ER
62%py_postclean
63%endif
64
65%if %{with python3}
66%py3_install
9c25fb59
ER
67%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/compressor/tests
68%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/compressor/__pycache__/test_*.pyc
69%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/compressor/test_*.py
0629bc99
ER
70%endif
71
72%clean
73rm -rf $RPM_BUILD_ROOT
74
75%files
76%defattr(644,root,root,755)
77%doc README.rst LICENSE
78%{py_sitescriptdir}/compressor
79%{py_sitescriptdir}/%{pypi_name}-%{version}-py*.egg-info
80
81%if %{with python3}
82%files -n python3-django-compressor
83%defattr(644,root,root,755)
84%doc README.rst LICENSE
85%{py3_sitescriptdir}/compressor
86%{py3_sitescriptdir}/%{pypi_name}-%{version}-py*.egg-info
87%endif
This page took 0.083613 seconds and 4 git commands to generate.