source: projects/specs/trunk/p/python-cssutils/python-cssutils-vl.spec @ 10601

Revision 10601, 5.6 KB checked in by tomop, 8 years ago (diff)

python-cssutils-1.0.1-1

Line 
1%define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
2
3%{!?python3:%global __python3 /usr/bin/python3}
4%{!?python3_inc:%global python3_inc %(%{__python3} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc(1))")}
5%{!?python3_sitearch: %global python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")}
6%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
7%{!?python3_version: %global python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
8
9
10%global srcname cssutils
11
12Summary: CSS Cascading Style Sheets library for Python
13Summary(ja): Python 用 CSS カスケーディング・スタイル・シート ライブラリ
14Name: python-cssutils
15Version: 1.0.1
16Release: 1%{?_dist_release}
17License: LGPLv3+
18Group: Development/Libraries
19URL: http://cthedot.de/cssutils/
20Source0: https://pypi.python.org/packages/source/c/cssutils/cssutils-1.0.1.tar.gz
21Provides: python3-%{srcname} = %{version}
22BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
23# Required at runtime for the css* executables
24Requires: python-setuptools
25BuildRequires: python-devel
26BuildRequires: python-setuptools
27BuildRequires: python3-devel
28BuildRequires: python3-setuptools
29BuildRequires: dos2unix
30BuildArch: noarch
31
32Vendor: Project Vine
33Distribution: Vine Linux
34
35%description
36A Python package to parse and build CSS Cascading Style Sheets. DOM only, not
37any rendering facilities.
38
39%description -l ja
40CSS カスケーディング・スタイル・シートの作成と構文解析用の Pythonパッケージ
41です。ただし DOM にのみ対応しており、レンダリングには対応していません。
42
43
44%package doc
45Summary: Documentation for the CSS Cascading Style Sheets library for Python
46Summary(ja): Python 用 CSS カスケーディング・スタイル・シート ライブラリのドキュメント
47Group: Applications/Documentation
48
49%description doc
50This is the documentation for python-cssutils, a Python package to parse and
51build CSS Cascading Style Sheets.
52
53%description doc -l ja
54CSS カスケーディング・スタイル・シートの作成と構文解析用の Pythonパッケージ
55である、python-cssutils のドキュメントです。
56
57
58%package -n python3-%{srcname}
59Summary:        %{sum}
60Summary(ja):    Python3 用 CSS カスケーディング・スタイル・シート ライブラリ
61%{?python_provide:%python_provide python3-%{srcname}}
62
63%description -n python3-%{srcname}
64A Python package to parse and build CSS Cascading Style Sheets. DOM only, not
65any rendering facilities.
66
67%description -n python3-%{srcname} -l ja
68CSS カスケーディング・スタイル・シートの作成と構文解析用の Python3パッケージ
69です。ただし DOM にのみ対応しており、レンダリングには対応していません。
70
71
72%prep
73%setup -qc
74# Convert all CRLF files, keeping original timestamps
75find . -type f -exec dos2unix -k {} \;
76cp -pr %{srcname}-%{version}/examples .
77cp -pr %{srcname}-%{version}/README.txt .
78cp -pr %{srcname}-%{version}/COPYING .
79mv %{srcname}-%{version} python2
80cp -a python2 python3
81find python3 -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python3}|'
82find python2 -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python}|'
83
84
85%build
86pushd python2
87%{__python} setup.py build
88popd
89pushd python3
90%{__python3} setup.py build
91popd
92
93
94%install
95%{__rm} -rf ${RPM_BUILD_ROOT}
96
97pushd python2
98%{__python} setup.py install \
99    --single-version-externally-managed \
100    -O1 \
101    --skip-build \
102    --root ${RPM_BUILD_ROOT}
103popd
104
105pushd python3
106%{__python3} setup.py install \
107    --single-version-externally-managed \
108    -O1 \
109    --skip-build \
110    --root ${RPM_BUILD_ROOT}
111popd
112
113
114%clean
115%{__rm} -rf ${RPM_BUILD_ROOT}
116
117%files
118%license COPYING
119%doc README.txt
120%{python_sitelib}/*
121
122%files -n python3-%{srcname}
123%license COPYING
124%doc README.txt
125%{python3_sitelib}/*
126%{_bindir}/csscapture
127%{_bindir}/csscombine
128%{_bindir}/cssparse
129
130%files doc
131%defattr(-,root,root,-)
132%doc docs/* examples/
133
134
135%changelog
136* Tue Jul 12 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.1-1
137- new upstream release.
138
139* Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.7-3.b3
140- rebuild with VineSeed environment
141
142* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.7-2.b3
143- rebuild with python-2.7.2
144
145* Thu Aug 26 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.9.7-1.b3
146- new upstream release
147
148* Tue Aug 24 2010 Munehiro Yamamoto <munepi@vinelinux.org> 0.9.6-1
149- new upstream release
150
151* Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.9.5.1-2
152- rebuild with python-2.6
153
154* Sun Dec 14 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.9.5.1-1
155- initial build for Vine Linux based on fedora package
156
157* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.9.5.1-4
158- Rebuild for Python 2.6
159
160* Fri Oct 10 2008 Matthias Saou <http://freshrpms.net/> 0.9.5.1-3
161- Add missing python-setuptools BR, split off doc sub-package (mschwendt).
162
163* Thu Oct  9 2008 Matthias Saou <http://freshrpms.net/> 0.9.5.1-2
164- Update license, group, add python-setuptools requirement (mschwendt).
165
166* Tue Aug 19 2008 Matthias Saou <http://freshrpms.net/> 0.9.5.1-1
167- Update to 0.9.5.1.
168
169* Fri Aug  8 2008 Matthias Saou <http://freshrpms.net/> 0.9.5-1
170- Update to 0.9.5 final.
171
172* Tue Jul 15 2008 Matthias Saou <http://freshrpms.net/> 0.9.5b2-0.2.rc2
173- Convert CRLF end of lines.
174- Patch out #!/... magic from python files meant to be included and not run.
175
176* Tue Jul 15 2008 Matthias Saou <http://freshrpms.net/> 0.9.5b2-0.1.rc2
177- Initial RPM release.
178
Note: See TracBrowser for help on using the repository browser.