]> git.pld-linux.org Git - packages/python-rjsmin.git/blame - python-rjsmin.spec
rebuild with python 3.10
[packages/python-rjsmin.git] / python-rjsmin.spec
CommitLineData
2f3fc4cd
ER
1#
2# Conditional build:
3%bcond_without doc # don't build doc
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module rjsmin
8%define egg_name rjsmin
9%define pypi_name rjsmin
10Summary: rJSmin is a JavaScript minifier written in Python
11Name: python-%{pypi_name}
12Version: 1.0.12
93c71614 13Release: 8
2f3fc4cd
ER
14License: Apache v2.0
15Group: Libraries/Python
16Source0: https://pypi.python.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
17# Source0-md5: 9f67e133c88df5497d3da847603da9bf
18URL: http://opensource.perlig.de/rjsmin/
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
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32The minifier is based on the semantics of jsmin.c by Douglas
33Crockford.
34
35The module is a re-implementation aiming for speed, so it can be used
36at runtime (rather than during a preprocessing step). Usually it
37produces the same results as the original jsmin.c.
38
39%package -n python3-%{pypi_name}
40Summary: rJSmin is a JavaScript minifier written in Python
41Group: Libraries/Python
42
43%description -n python3-%{pypi_name}
44The minifier is based on the semantics of jsmin.c by Douglas
45Crockford.
46
47The module is a re-implementation aiming for speed, so it can be used
48at runtime (rather than during a preprocessing step). Usually it
49produces the same results as the original jsmin.c.
50
51%package apidocs
52Summary: Javascript Minifier - docs
53Group: Documentation
2f3fc4cd 54BuildArch: noarch
2f3fc4cd
ER
55
56%description apidocs
57Docs for rJSmin
58
59%prep
60%setup -q -n %{pypi_name}-%{version}
61
62# strip bang path from rjsmin.py
63sed -i '1d' rjsmin.py
64
65%build
66%if %{with python2}
67%py_build
68%endif
69
70%if %{with python3}
71%py3_build
72%endif
73
74%install
75rm -rf $RPM_BUILD_ROOT
76%if %{with python2}
77%py_install
78%py_postclean
79%endif
80
81%if %{with python3}
82%py3_install
83%endif
84
85rm -r $RPM_BUILD_ROOT%{_docdir}/%{module}
86
87%clean
88rm -rf $RPM_BUILD_ROOT
89
90%if %{with python2}
91%files
92%defattr(644,root,root,755)
93%doc README.rst LICENSE
94%{py_sitedir}/%{module}.py[co]
95%attr(755,root,root) %{py_sitedir}/_%{module}.so
96%{py_sitedir}/%{pypi_name}-%{version}-py*.egg-info
97%endif
98
99%if %{with python3}
100%files -n python3-%{pypi_name}
101%defattr(644,root,root,755)
102%doc README.rst LICENSE
103%{py3_sitedir}/%{module}.py
104%{py3_sitedir}/__pycache__/%{module}.*.pyc
105%attr(755,root,root) %{py3_sitedir}/_%{module}.*.so
106%{py3_sitedir}/%{egg_name}-%{version}-py*.egg-info
107%endif
108
109%if %{with doc}
110%files apidocs
111%defattr(644,root,root,755)
112%doc README.rst docs
113%endif
This page took 0.109111 seconds and 4 git commands to generate.