]>
Commit | Line | Data |
---|---|---|
64806f20 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
276af189 | 5 | %bcond_without tests # unit tests |
64806f20 | 6 | |
6be0d297 | 7 | %define module PasteDeploy |
66ad93f9 | 8 | Summary: Load, configure, and compose WSGI applications and servers |
90b9ebca | 9 | Summary(pl.UTF-8): Wczytywanie, konfiguracja i łączenie aplikacji i serwerów WSGI |
6be0d297 | 10 | Name: python-%{module} |
276af189 JB |
11 | # keep 2.x here for python2 support |
12 | Version: 2.1.1 | |
13 | Release: 1 | |
64806f20 | 14 | License: MIT |
6be0d297 | 15 | Group: Libraries/Python |
64806f20 JB |
16 | #Source0Download: https://pypi.org/simple/pastedeploy/ |
17 | Source0: https://files.pythonhosted.org/packages/source/P/PasteDeploy/%{module}-%{version}.tar.gz | |
276af189 | 18 | # Source0-md5: bc13219866a524626aee97127afa0348 |
64806f20 JB |
19 | URL: https://pypi.org/project/PasteDeploy/ |
20 | %if %{with python2} | |
276af189 | 21 | BuildRequires: python-devel >= 1:2.7 |
a470b79b | 22 | BuildRequires: python-setuptools >= 0.6-0.a9.1 |
64806f20 | 23 | %if %{with tests} |
276af189 | 24 | BuildRequires: python-pytest |
64806f20 JB |
25 | %endif |
26 | %endif | |
27 | %if %{with python3} | |
276af189 | 28 | BuildRequires: python3-devel >= 1:3.4 |
64806f20 JB |
29 | BuildRequires: python3-setuptools >= 0.6-0.a9.1 |
30 | %if %{with tests} | |
276af189 | 31 | BuildRequires: python3-pytest |
64806f20 JB |
32 | %endif |
33 | %endif | |
f876f2dd | 34 | BuildRequires: rpm-pythonprov |
64806f20 JB |
35 | BuildRequires: rpmbuild(macros) >= 1.714 |
36 | Requires: python-Paste | |
276af189 | 37 | Requires: python-modules >= 1:2.7 |
66ad93f9 | 38 | BuildArch: noarch |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
40 | ||
41 | %description | |
62439de5 JB |
42 | This tool provides code to load WSGI applications and servers from |
43 | URIs; these URIs can refer to Python Eggs for INI-style configuration | |
44 | files. Paste Script provides commands to serve applications based on | |
45 | this configuration file. | |
46 | ||
a3388fb6 JR |
47 | %description -l pl.UTF-8 |
48 | To narzędzie zawiera kod do wczytywania aplikacji i serwerów WSGI z | |
49 | URI; URI te mogą odnosić się do pakietów Python Egg dla plików | |
50 | konfiguracyjnych w stylu INI. Paste Script udostępnia polecenia do | |
51 | obsługi aplikacji w oparciu o ten plik konfiguracyjny. | |
66ad93f9 | 52 | |
64806f20 JB |
53 | %package -n python3-%{module} |
54 | Summary: Load, configure, and compose WSGI applications and servers | |
55 | Summary(pl.UTF-8): Wczytywanie, konfiguracja i łączenie aplikacji i serwerów WSGI | |
56 | Group: Libraries/Python | |
57 | Requires: python3-Paste | |
276af189 | 58 | Requires: python3-modules >= 1:3.4 |
64806f20 JB |
59 | |
60 | %description -n python3-%{module} | |
61 | This tool provides code to load WSGI applications and servers from | |
62 | URIs; these URIs can refer to Python Eggs for INI-style configuration | |
63 | files. Paste Script provides commands to serve applications based on | |
64 | this configuration file. | |
65 | ||
66 | %description -n python3-%{module} -l pl.UTF-8 | |
67 | To narzędzie zawiera kod do wczytywania aplikacji i serwerów WSGI z | |
68 | URI; URI te mogą odnosić się do pakietów Python Egg dla plików | |
69 | konfiguracyjnych w stylu INI. Paste Script udostępnia polecenia do | |
70 | obsługi aplikacji w oparciu o ten plik konfiguracyjny. | |
71 | ||
66ad93f9 | 72 | %prep |
73 | %setup -q -n PasteDeploy-%{version} | |
74 | ||
75 | %build | |
64806f20 | 76 | %if %{with python2} |
276af189 JB |
77 | %py_build |
78 | ||
79 | %if %{with tests} | |
80 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
81 | PYTHONPATH=$(pwd) \ | |
82 | %{__python} -m pytest tests | |
83 | %endif | |
64806f20 JB |
84 | %endif |
85 | ||
86 | %if %{with python3} | |
276af189 JB |
87 | %py3_build |
88 | ||
89 | %if %{with tests} | |
90 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
91 | PYTHONPATH=$(pwd) \ | |
92 | %{__python3} -m pytest tests | |
93 | %endif | |
64806f20 | 94 | %endif |
66ad93f9 | 95 | |
96 | %install | |
97 | rm -rf $RPM_BUILD_ROOT | |
64806f20 JB |
98 | |
99 | %if %{with python2} | |
100 | %py_install | |
66ad93f9 | 101 | |
7b815568 | 102 | %py_postclean |
64806f20 JB |
103 | %endif |
104 | ||
105 | %if %{with python3} | |
106 | %py3_install | |
107 | %endif | |
66ad93f9 | 108 | |
109 | %clean | |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
64806f20 | 112 | %if %{with python2} |
66ad93f9 | 113 | %files |
114 | %defattr(644,root,root,755) | |
276af189 | 115 | %doc README.rst license.txt |
64806f20 | 116 | %{py_sitescriptdir}/paste/deploy |
6be0d297 ER |
117 | %{py_sitescriptdir}/PasteDeploy-%{version}-py*.egg-info |
118 | %{py_sitescriptdir}/PasteDeploy-%{version}-py*-nspkg.pth | |
64806f20 JB |
119 | %endif |
120 | ||
121 | %if %{with python3} | |
122 | %files -n python3-%{module} | |
123 | %defattr(644,root,root,755) | |
276af189 | 124 | %doc README.rst license.txt |
64806f20 JB |
125 | %{py3_sitescriptdir}/paste/deploy |
126 | %{py3_sitescriptdir}/PasteDeploy-%{version}-py*.egg-info | |
127 | %{py3_sitescriptdir}/PasteDeploy-%{version}-py*-nspkg.pth | |
128 | %endif |