]> git.pld-linux.org Git - packages/python3-tomlkit.git/blame - python-tomlkit.spec
- new
[packages/python3-tomlkit.git] / python-tomlkit.spec
CommitLineData
decbe272
JB
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
7Summary: Style preserving TOML library
8Summary(pl.UTF-8): Biblioteka TOML zachowująca styl
9Name: python-tomlkit
10# keep 0.7.x here for python2 support
11Version: 0.7.2
12Release: 1
13License: MIT
14Group: Libraries/Python
15#Source0Download: https://pypi.org/simple/tomlkit/
16Source0: https://files.pythonhosted.org/packages/source/t/tomlkit/tomlkit-%{version}.tar.gz
17# Source0-md5: f754c55df5edfbb7395903061825e09e
18URL: https://pypi.org/project/tomlkit/
19%if %{with python2}
20BuildRequires: python-modules >= 1:2.7
21BuildRequires: python-setuptools
22%if %{with tests}
23BuildRequires: python-enum34 >= 1.1
24BuildRequires: python-enum34 < 2
25BuildRequires: python-functools32 >= 3.2.3
26BuildRequires: python-functools32 < 4
27BuildRequires: python-pytest
28BuildRequires: python-typing >= 3.6
29BuildRequires: python-typing < 4
30%endif
31%endif
32%if %{with python3}
33BuildRequires: python3-modules >= 1:3.6
34BuildRequires: python3-setuptools
35%if %{with tests}
36BuildRequires: python3-pytest
37%endif
38%endif
39BuildRequires: rpm-pythonprov
40BuildRequires: rpmbuild(macros) >= 1.714
41Requires: python-modules >= 1:2.7
42BuildArch: noarch
43BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45%description
46TOML Kit is a 1.0.0rc1-compliant TOML library.
47
48It includes a parser that preserves all comments, indentations,
49whitespace and internal element ordering, and makes them accessible
50and editable via an intuitive API.
51
52%description -l pl.UTF-8
53TOML Kit to biblioteka TOML zgodna z 1.0.0rc1.
54
55Zawiera parser zachowujący wszystkie komentarze, wcięcia, białe znaki
56oraz kolejność elementów wewnętrznych i pozwalający na dostęp oraz
57edycję poprzez intuicyjne API.
58
59%package -n python3-tomlkit
60Summary: Style preserving TOML library
61Summary(pl.UTF-8): Biblioteka TOML zachowująca styl
62Group: Libraries/Python
63Requires: python3-modules >= 1:3.6
64
65%description -n python3-tomlkit
66TOML Kit is a 1.0.0rc1-compliant TOML library.
67
68It includes a parser that preserves all comments, indentations,
69whitespace and internal element ordering, and makes them accessible
70and editable via an intuitive API.
71
72%description -n python3-tomlkit -l pl.UTF-8
73TOML Kit to biblioteka TOML zgodna z 1.0.0rc1.
74
75Zawiera parser zachowujący wszystkie komentarze, wcięcia, białe znaki
76oraz kolejność elementów wewnętrznych i pozwalający na dostęp oraz
77edycję 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}
87PYTEST_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}
96PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
97%{__python3} -m pytest tests
98%endif
99%endif
100
101%install
102rm -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
115rm -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.064695 seconds and 4 git commands to generate.