]>
Commit | Line | Data |
---|---|---|
2fc397ca | 1 | %define module webcolors |
2 | Summary: A library for working with color names and color value formats defined by the HTML and CSS specifications for use in documents on the Web. | |
3 | Name: python-%module | |
4 | Version: 1.3.1 | |
5 | Release: 0.1 | |
6 | License: BSD License | |
7 | Group: Development/Languages | |
8 | URL: http://www.bitbucket.org/ubernostrum/webcolors/overview/ | |
9 | Source0: http://bitbucket.org/ubernostrum/%{module}/downloads/%{module}-%{version}.tar.gz | |
10 | # Source0-md5: aeb4f33be6c26ec7f76a78c2d88cfb0c | |
11 | BuildRequires: python-funcparserlib >= 0.3.4 | |
12 | BuildRequires: rpmbuild(macros) >= 1.219 | |
13 | BuildRequires: sed >= 4.0 | |
14 | BuildArch: noarch | |
15 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
16 | ||
17 | %description | |
18 | A library for working with color names and color value formats defined by the HTML and CSS specifications for use in documents on the Web. | |
19 | ||
20 | Support is included for the following formats (RGB colorspace only; conversion to/from HSL can be handled by the colorsys module in the Python standard library): | |
21 | ||
22 | - Specification-defined color names | |
23 | - Six-digit hexadecimal | |
24 | - Three-digit hexadecimal | |
25 | - Integer rgb() triplet | |
26 | - Percentage rgb() triple | |
27 | ||
28 | %prep | |
29 | %setup -q -n %{module}-%{version} | |
30 | %{__sed} -i -e 's/^from ez_setup/#from ez_setup/' setup.py | |
31 | %{__sed} -i -e 's/^use_setuptools()/#use_setuptools()/' setup.py | |
32 | ||
33 | %build | |
34 | %{__python} setup.py build | |
35 | ||
36 | %install | |
37 | rm -rf $RPM_BUILD_ROOT | |
38 | %{__python} setup.py install \ | |
39 | --optimize=2 \ | |
40 | --skip-build \ | |
41 | --root $RPM_BUILD_ROOT | |
42 | ||
43 | %clean | |
44 | rm -rf $RPM_BUILD_ROOT | |
45 | ||
46 | %files | |
47 | %defattr(644,root,root,755) | |
48 | %{py_sitescriptdir}/%{module}.* | |
49 | %if "%{py_ver}" > "2.4" | |
50 | %{py_sitescriptdir}/%{module}-%{version}-*.egg-info | |
51 | %endif |