3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Simplify building parse types based on the parse module
8 Summary(pl.UTF-8): Uproszczenie tworzenia typów do analizy w oparciu o moduł parse
9 Name: python-parse_type
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/parse-type/
15 Source0: https://files.pythonhosted.org/packages/source/p/parse-type/parse_type-%{version}.tar.gz
16 # Source0-md5: b954062f14ab723a91fe1e2be15e859d
17 URL: https://pypi.org/project/parse-type/
19 BuildRequires: python-modules >= 1:2.7
20 BuildRequires: python-setuptools
22 BuildRequires: python-enum34
23 BuildRequires: python-parse >= 1.8.4
24 BuildRequires: python-pytest >= 3.2
25 BuildRequires: python-six >= 1.11
29 BuildRequires: python3-2to3 >= 1:3.2
30 BuildRequires: python3-modules >= 1:3.2
31 BuildRequires: python3-setuptools
33 BuildRequires: python3-parse >= 1.8.4
34 BuildRequires: python3-pytest >= 3.2
35 BuildRequires: python3-six >= 1.11
36 %if "%{py3_ver}" < "3.4"
37 BuildRequires: python3-enum34
41 BuildRequires: rpm-pythonprov
42 BuildRequires: rpmbuild(macros) >= 1.714
43 Requires: python-modules >= 1:2.7
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 parse_type extends the parse module (opposite of "string.format()").
50 %description -l pl.UTF-8
51 parse_type rozszerza moduł parse (odwrotność "string.format()").
53 %package -n python3-parse_type
54 Summary: Simplify building parse types based on the parse module
55 Summary(pl.UTF-8): Uproszczenie tworzenia typów do analizy w oparciu o moduł parse
56 Group: Libraries/Python
57 Requires: python3-modules >= 1:3.2
59 %description -n python3-parse_type
60 parse_type rozszerza moduł parse (odwrotność "string.format()").
62 %description -n python3-parse_type -l pl.UTF-8
63 parse_type rozszerza moduł parse (odwrotność "string.format()").
66 %setup -q -n parse_type-%{version}
73 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
74 %{__python} -m pytest tests
82 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
83 %{__python3} -m pytest tests
88 rm -rf $RPM_BUILD_ROOT
101 rm -rf $RPM_BUILD_ROOT
105 %defattr(644,root,root,755)
106 %doc CHANGES.txt LICENSE README.rst
107 %{py_sitescriptdir}/parse_type
108 %{py_sitescriptdir}/parse_type-%{version}-py*.egg-info
112 %files -n python3-parse_type
113 %defattr(644,root,root,755)
114 %doc CHANGES.txt LICENSE README.rst
115 %{py3_sitescriptdir}/parse_type
116 %{py3_sitescriptdir}/parse_type-%{version}-py*.egg-info