]> git.pld-linux.org Git - packages/python-railroad.git/blob - python-railroad.spec
679b65ecad766f06d7828cbcc46ed49690d18e33
[packages/python-railroad.git] / python-railroad.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:        Functional library for data processing
8 Summary(pl.UTF-8):      Biblioteka funkcyjna do przetwarzania danych
9 Name:           python-railroad
10 Version:        0.5.0
11 Release:        2
12 License:        MIT
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/railroad/
15 Source0:        https://files.pythonhosted.org/packages/source/r/railroad/railroad-%{version}.tar.gz
16 # Source0-md5:  861f7b6c59eb087a5f3fbfd1fee2c805
17 Patch0:         %{name}-py3-requires.patch
18 URL:            https://pypi.org/project/railroad/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-boltons >= 16.5.0
24 BuildRequires:  python-funcsigs >= 1.0.2
25 BuildRequires:  python-mock
26 BuildRequires:  python-pytest
27 BuildRequires:  python-six >= 1.7.3
28 BuildRequires:  python-toolz >= 0.7.4
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-modules >= 1:3.3
33 BuildRequires:  python3-setuptools
34 %if %{with tests}
35 BuildRequires:  python3-boltons >= 16.5.0
36 BuildRequires:  python3-pytest
37 BuildRequires:  python3-six >= 1.7.3
38 BuildRequires:  python3-toolz >= 0.7.4
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 Functional library for data processing.
49
50 %description -l pl.UTF-8
51 Biblioteka funkcyjna do przetwarzania danych.
52
53 %package -n python3-railroad
54 Summary:        Functional library for data processing
55 Summary(pl.UTF-8):      Biblioteka funkcyjna do przetwarzania danych
56 Group:          Libraries/Python
57 Requires:       python3-modules >= 1:3.3
58
59 %description -n python3-railroad
60 Functional library for data processing.
61
62 %description -n python3-railroad -l pl.UTF-8
63 Biblioteka funkcyjna do przetwarzania danych.
64
65 %prep
66 %setup -q -n railroad-%{version}
67 %patch0 -p1
68
69 %build
70 %if %{with python2}
71 %py_build
72
73 %if %{with tests}
74 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
75 %{__python} -m pytest test
76 %endif
77 %endif
78
79 %if %{with python3}
80 %py3_build
81
82 %if %{with tests}
83 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
84 %{__python3} -m pytest test
85 %endif
86 %endif
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with python2}
92 %py_install
93
94 %py_postclean
95 %endif
96
97 %if %{with python3}
98 %py3_install
99 %endif
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %if %{with python2}
105 %files
106 %defattr(644,root,root,755)
107 %doc AUTHORS.rst HISTORY.rst LICENSE README.rst
108 %{py_sitescriptdir}/railroad
109 %{py_sitescriptdir}/railroad-%{version}-py*.egg-info
110 %endif
111
112 %if %{with python3}
113 %files -n python3-railroad
114 %defattr(644,root,root,755)
115 %doc AUTHORS.rst HISTORY.rst LICENSE README.rst
116 %{py3_sitescriptdir}/railroad
117 %{py3_sitescriptdir}/railroad-%{version}-py*.egg-info
118 %endif
This page took 0.044543 seconds and 2 git commands to generate.