]> git.pld-linux.org Git - packages/python-parse_type.git/blob - python-parse_type.spec
- new
[packages/python-parse_type.git] / python-parse_type.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:        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
10 Version:        0.5.2
11 Release:        1
12 License:        BSD
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/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.7
20 BuildRequires:  python-setuptools
21 %if %{with tests}
22 BuildRequires:  python-enum34
23 BuildRequires:  python-parse >= 1.8.4
24 BuildRequires:  python-pytest >= 3.2
25 BuildRequires:  python-six >= 1.11
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-2to3 >= 1:3.2
30 BuildRequires:  python3-modules >= 1:3.2
31 BuildRequires:  python3-setuptools
32 %if %{with tests}
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
38 %endif
39 %endif
40 %endif
41 BuildRequires:  rpm-pythonprov
42 BuildRequires:  rpmbuild(macros) >= 1.714
43 Requires:       python-modules >= 1:2.7
44 BuildArch:      noarch
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 parse_type extends the parse module (opposite of "string.format()").
49
50 %description -l pl.UTF-8
51 parse_type rozszerza moduł parse (odwrotność "string.format()").
52
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
58
59 %description -n python3-parse_type
60 parse_type rozszerza moduł parse (odwrotność "string.format()").
61
62 %description -n python3-parse_type -l pl.UTF-8
63 parse_type rozszerza moduł parse (odwrotność "string.format()").
64
65 %prep
66 %setup -q -n parse_type-%{version}
67
68 %build
69 %if %{with python2}
70 %py_build
71
72 %if %{with tests}
73 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
74 %{__python} -m pytest tests
75 %endif
76 %endif
77
78 %if %{with python3}
79 %py3_build
80
81 %if %{with tests}
82 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
83 %{__python3} -m pytest tests
84 %endif
85 %endif
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89
90 %if %{with python2}
91 %py_install
92
93 %py_postclean
94 %endif
95
96 %if %{with python3}
97 %py3_install
98 %endif
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with python2}
104 %files
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
109 %endif
110
111 %if %{with python3}
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
117 %endif
This page took 0.038205 seconds and 3 git commands to generate.