]> git.pld-linux.org Git - packages/python-toml.git/blame - python-toml.spec
rebuild with tests and docs
[packages/python-toml.git] / python-toml.spec
CommitLineData
e1b15806 1#
4f993e53 2# Conditional build:
e1b15806 3%bcond_without tests # unit tests
4f993e53
JP
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module toml
8Summary: Python Library for Tom's Obvious, Minimal Language
e1b15806 9Summary(pl.UTF-8): Pythonowa biblioteka do formatu TOML (Tom's Obvious, Minimal Language)
4f993e53
JP
10Name: python-%{module}
11Version: 0.10.2
08198dff 12Release: 4
4f993e53
JP
13License: MIT
14Group: Libraries/Python
15#Source0Download: https://pypi.org/simple/toml/
16Source0: https://files.pythonhosted.org/packages/source/t/toml/%{module}-%{version}.tar.gz
17# Source0-md5: 59bce5d8d67e858735ec3f399ec90253
18URL: https://github.com/uiri/toml
19%if %{with python2}
20BuildRequires: python-modules >= 1:2.6
21BuildRequires: python-setuptools
e1b15806
JB
22%if %{with tests}
23BuildRequires: python-pytest
24%endif
4f993e53
JP
25%endif
26%if %{with python3}
27BuildRequires: python3-modules >= 1:3.3
28BuildRequires: python3-setuptools
e1b15806
JB
29%if %{with tests}
30BuildRequires: python3-pytest
31%endif
4f993e53
JP
32%endif
33BuildRequires: rpm-pythonprov
34BuildRequires: rpmbuild(macros) >= 1.714
35Requires: python-modules >= 1:2.6
36BuildArch: noarch
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%description
40A Python library for parsing and creating TOML.
41
e1b15806
JB
42%description -l pl.UTF-8
43Pythonowa biblioteka do analizy i tworzenia plików TOML.
44
4f993e53
JP
45%package -n python3-%{module}
46Summary: Python Library for Tom's Obvious, Minimal Language
e1b15806 47Summary(pl.UTF-8): Pythonowa biblioteka do formatu TOML (Tom's Obvious, Minimal Language)
4f993e53
JP
48Group: Libraries/Python
49Requires: python3-modules >= 1:3.3
50
51%description -n python3-%{module}
52A Python library for parsing and creating TOML.
53
e1b15806
JB
54%description -n python3-%{module} -l pl.UTF-8
55Pythonowa biblioteka do analizy i tworzenia plików TOML.
56
4f993e53
JP
57%prep
58%setup -q -n %{module}-%{version}
59
60%build
61%if %{with python2}
62%py_build
e1b15806
JB
63
64%if %{with tests}
65# disable test_{valid,invalid}_tests: no toml-test/tests/{valid,invalid} data
66PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
67%{__python} -m pytest tests -k 'not (test_invalid_tests or test_valid_tests)'
68%endif
4f993e53
JP
69%endif
70
71%if %{with python3}
72%py3_build
e1b15806
JB
73
74%if %{with tests}
75# disable test_{valid,invalid}_tests: no toml-test/tests/{valid,invalid} data
76PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
77%{__python3} -m pytest tests -k 'not (test_invalid_tests or test_valid_tests)'
78%endif
4f993e53
JP
79%endif
80
81%install
82rm -rf $RPM_BUILD_ROOT
83
84%if %{with python2}
85%py_install
86
87%py_postclean
88%endif
89
90%if %{with python3}
91%py3_install
92%endif
93
94%clean
95rm -rf $RPM_BUILD_ROOT
96
97%if %{with python2}
98%files
99%defattr(644,root,root,755)
e1b15806 100%doc LICENSE README.rst test.toml
4f993e53
JP
101%{py_sitescriptdir}/%{module}
102%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
103%endif
104
105%if %{with python3}
106%files -n python3-%{module}
107%defattr(644,root,root,755)
e1b15806 108%doc LICENSE README.rst test.toml
4f993e53
JP
109%{py3_sitescriptdir}/%{module}
110%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
111%endif
This page took 0.073356 seconds and 4 git commands to generate.