]>
Commit | Line | Data |
---|---|---|
9a6ffd3f JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # unit tests (not included in sdist) | |
4 | ||
5 | Summary: Composable complex class support for attrs | |
6 | Summary(pl.UTF-8): Obsługa składanych klas złożonych dla attrs | |
7 | Name: python3-cattrs | |
2342ac6f | 8 | Version: 1.10.0 |
33b33ec2 | 9 | Release: 2 |
9a6ffd3f JB |
10 | License: MIT |
11 | Group: Libraries/Python | |
12 | #Source0Download: https://pypi.org/simple/cattrs/ | |
13 | Source0: https://files.pythonhosted.org/packages/source/c/cattrs/cattrs-%{version}.tar.gz | |
2342ac6f | 14 | # Source0-md5: 693fc2033e09019103bf2a184ba027f9 |
9a6ffd3f JB |
15 | URL: https://pypi.org/project/cattrs/ |
16 | BuildRequires: python3-modules >= 1:3.7 | |
17 | BuildRequires: python3-setuptools | |
18 | %if %{with tests} | |
19 | BuildRequires: python3-attrs >= 20 | |
20 | BuildRequires: python3-pytest | |
21 | %if "%{py3_ver}" == "3.7" | |
22 | BuildRequires: python3-typing_extensions | |
23 | %endif | |
24 | %endif | |
25 | BuildRequires: rpm-pythonprov | |
26 | BuildRequires: rpmbuild(macros) >= 1.714 | |
27 | Requires: python3-modules >= 1:3.7 | |
28 | BuildArch: noarch | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | cattrs is an open source Python library for structuring and | |
33 | unstructuring data. cattrs works best with attrs classes and the usual | |
34 | Python collections, but other kinds of classes are supported by | |
35 | manually registering converters. | |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | cattrs to mająca otwarte źródła biblioteka Pythona do strukturyzacji i | |
39 | destrukturyzacji danych. Najlepiej działa z klasami attrs oraz | |
40 | zwykłymi kolekcjami Pythona, ale inne rodzaje klas są obsługiwane | |
41 | poprzez ręcznie rejestrowane konwertery. | |
42 | ||
43 | %prep | |
44 | %setup -q -n cattrs-%{version} | |
45 | ||
46 | %build | |
47 | %py3_build | |
48 | ||
49 | %if %{with tests} | |
50 | %{__python3} -m pytest tests | |
51 | %endif | |
52 | ||
53 | %install | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
56 | %py3_install | |
57 | ||
58 | %clean | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
61 | %files | |
62 | %defattr(644,root,root,755) | |
63 | %doc LICENSE README.rst | |
64 | %{py3_sitescriptdir}/cattr | |
2342ac6f | 65 | %{py3_sitescriptdir}/cattrs |
9a6ffd3f | 66 | %{py3_sitescriptdir}/cattrs-%{version}-py*.egg-info |