]> git.pld-linux.org Git - packages/python-svgwrite.git/blob - python-svgwrite.spec
bf9829c90cfaa16208673b1fa32d4b1a863b40e0
[packages/python-svgwrite.git] / python-svgwrite.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # don't build doc
4 %bcond_without  tests   # do not perform "make test"
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         module          svgwrite
9 %define         egg_name        svgwrite
10 %define         pypi_name       svgwrite
11 Summary:        Python 2 library to create SVG drawings
12 Name:           python-%{pypi_name}
13 Version:        1.3.1
14 Release:        1
15 License:        MIT
16 Group:          Libraries/Python
17 Source0:        https://github.com/mozman/svgwrite/archive/v%{version}/%{module}-%{version}.tar.gz
18 # Source0-md5:  a3d9311578538ba5acd6bb98d14cae38
19 URL:            https://github.com/mozman/svgwrite
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.714
22 BuildArch:      noarch
23 %if %{with python2}
24 BuildRequires:  python-modules
25 BuildRequires:  python-pyparsing
26 BuildRequires:  python-setuptools
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-modules
30 BuildRequires:  python3-pyparsing
31 BuildRequires:  python3-setuptools
32 BuildRequires:  python3-setuptools
33 %endif
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 Python 2 library to create SVG drawings.
38
39 %package -n python3-%{pypi_name}
40 Summary:        Python 3 library to create SVG drawings
41 Requires:       python3-pyparsing
42 Requires:       python3-setuptools
43
44 %description -n python3-%{pypi_name}
45 Python 3 library to create SVG drawings.
46
47 %prep
48 %setup -q -n %{pypi_name}-%{version}
49
50 # test is hosed and fails on the order of attr in a tag
51 %{__rm} tests/test_pretty_xml.py
52
53 %build
54 %py3_build
55 %py_build
56
57 %if %{with tests}
58 %{__python3} -m unittest discover -s tests
59 %{__python} -m unittest discover -s tests
60 %endif
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64 %py3_install
65 %py_install
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %if %{with python2}
71 %files
72 %defattr(644,root,root,755)
73 %doc NEWS.rst README.rst LICENSE.TXT
74 %{py_sitescriptdir}/%{module}
75 %{py_sitescriptdir}/%{egg_name}-%{version}-py%{py_ver}.egg-info
76 %endif
77
78 %if %{with python3}
79 %files -n python3-%{pypi_name}
80 %defattr(644,root,root,755)
81 %doc NEWS.rst README.rst LICENSE.TXT
82 %{py3_sitescriptdir}/%{module}
83 %{py3_sitescriptdir}/%{pypi_name}-%{version}-py%{py3_ver}.egg-info
84 %endif
This page took 0.057056 seconds and 2 git commands to generate.