]> git.pld-linux.org Git - packages/python3-tomlkit.git/blob - python-tomlkit.spec
- new
[packages/python3-tomlkit.git] / python-tomlkit.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Style preserving TOML library
8 Summary(pl.UTF-8):      Biblioteka TOML zachowująca styl
9 Name:           python-tomlkit
10 # keep 0.7.x here for python2 support
11 Version:        0.7.2
12 Release:        1
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/tomlkit/
16 Source0:        https://files.pythonhosted.org/packages/source/t/tomlkit/tomlkit-%{version}.tar.gz
17 # Source0-md5:  f754c55df5edfbb7395903061825e09e
18 URL:            https://pypi.org/project/tomlkit/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-enum34 >= 1.1
24 BuildRequires:  python-enum34 < 2
25 BuildRequires:  python-functools32 >= 3.2.3
26 BuildRequires:  python-functools32 < 4
27 BuildRequires:  python-pytest
28 BuildRequires:  python-typing >= 3.6
29 BuildRequires:  python-typing < 4
30 %endif
31 %endif
32 %if %{with python3}
33 BuildRequires:  python3-modules >= 1:3.6
34 BuildRequires:  python3-setuptools
35 %if %{with tests}
36 BuildRequires:  python3-pytest
37 %endif
38 %endif
39 BuildRequires:  rpm-pythonprov
40 BuildRequires:  rpmbuild(macros) >= 1.714
41 Requires:       python-modules >= 1:2.7
42 BuildArch:      noarch
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 TOML Kit is a 1.0.0rc1-compliant TOML library.
47
48 It includes a parser that preserves all comments, indentations,
49 whitespace and internal element ordering, and makes them accessible
50 and editable via an intuitive API.
51
52 %description -l pl.UTF-8
53 TOML Kit to biblioteka TOML zgodna z 1.0.0rc1.
54
55 Zawiera parser zachowujący wszystkie komentarze, wcięcia, białe znaki
56 oraz kolejność elementów wewnętrznych i pozwalający na dostęp oraz
57 edycję poprzez intuicyjne API.
58
59 %package -n python3-tomlkit
60 Summary:        Style preserving TOML library
61 Summary(pl.UTF-8):      Biblioteka TOML zachowująca styl
62 Group:          Libraries/Python
63 Requires:       python3-modules >= 1:3.6
64
65 %description -n python3-tomlkit
66 TOML Kit is a 1.0.0rc1-compliant TOML library.
67
68 It includes a parser that preserves all comments, indentations,
69 whitespace and internal element ordering, and makes them accessible
70 and editable via an intuitive API.
71
72 %description -n python3-tomlkit -l pl.UTF-8
73 TOML Kit to biblioteka TOML zgodna z 1.0.0rc1.
74
75 Zawiera parser zachowujący wszystkie komentarze, wcięcia, białe znaki
76 oraz kolejność elementów wewnętrznych i pozwalający na dostęp oraz
77 edycję poprzez intuicyjne API.
78
79 %prep
80 %setup -q -n tomlkit-%{version}
81
82 %build
83 %if %{with python2}
84 %py_build
85
86 %if %{with tests}
87 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
88 %{__python} -m pytest tests
89 %endif
90 %endif
91
92 %if %{with python3}
93 %py3_build
94
95 %if %{with tests}
96 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
97 %{__python3} -m pytest tests
98 %endif
99 %endif
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103
104 %if %{with python2}
105 %py_install
106
107 %py_postclean
108 %endif
109
110 %if %{with python3}
111 %py3_install
112 %endif
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %if %{with python2}
118 %files
119 %defattr(644,root,root,755)
120 %doc LICENSE README.md
121 %{py_sitescriptdir}/tomlkit
122 %{py_sitescriptdir}/tomlkit-%{version}-py*.egg-info
123 %endif
124
125 %if %{with python3}
126 %files -n python3-tomlkit
127 %defattr(644,root,root,755)
128 %doc LICENSE README.md
129 %{py3_sitescriptdir}/tomlkit
130 %{py3_sitescriptdir}/tomlkit-%{version}-py*.egg-info
131 %endif
This page took 0.059024 seconds and 3 git commands to generate.