]> git.pld-linux.org Git - SPECS.git/blob - python-flask_cors.spec
SPECS updated Mon 29 Apr 22:05:02 CEST 2024
[SPECS.git] / python-flask_cors.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_with     python3 # CPython 3.x module (built from python3-flask_cors.spec)
7
8 Summary:        Flask extension adding a decorator for CORS support
9 Summary(pl.UTF-8):      Rozszerzenie Flaska dodające dekorator do obsługi CORS
10 Name:           python-flask_cors
11 # keep 3.x here for python2/Flask 1 support
12 Version:        3.0.10
13 Release:        1
14 License:        MIT
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.org/simple/Flask-Cors/
17 Source0:        https://files.pythonhosted.org/packages/source/F/Flask-Cors/Flask-Cors-%{version}.tar.gz
18 # Source0-md5:  647ff0632b960ba063a077fb4063077e
19 URL:            https://pypi.org/project/Flask-Cors/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-flask >= 0.9
25 BuildRequires:  python-nose
26 BuildRequires:  python-packaging
27 BuildRequires:  python-six
28 %endif
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3-modules >= 1:3.4
32 BuildRequires:  python3-setuptools
33 %if %{with tests}
34 BuildRequires:  python3-flask >= 0.9
35 BuildRequires:  python3-nose
36 BuildRequires:  python3-packaging
37 BuildRequires:  python3-six
38 %endif
39 %endif
40 BuildRequires:  rpm-pythonprov
41 BuildRequires:  rpmbuild(macros) >= 1.714
42 %if %{with doc}
43 BuildRequires:  python-sphinx_rtd_theme
44 BuildRequires:  python-sphinxcontrib-httpdomain >= 1.7.0
45 BuildRequires:  sphinx-pdg-2
46 %endif
47 Requires:       python-modules >= 1:2.7
48 BuildArch:      noarch
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 A Flask extension for handling Cross Origin Resource Sharing (CORS),
53 making cross-origin AJAX possible.
54
55 %description -l pl.UTF-8
56 Rozszerzenie Flaska do obsługi CORS (Cross Origin Resource Sharing),
57 umożliwiającego działanie AJAX-a między domenami.
58
59 %package -n python3-flask_cors
60 Summary:        Flask extension adding a decorator for CORS support
61 Summary(pl.UTF-8):      Rozszerzenie Flaska dodające dekorator do obsługi CORS
62 Group:          Libraries/Python
63 Requires:       python3-modules >= 1:3.4
64
65 %description -n python3-flask_cors
66 A Flask extension for handling Cross Origin Resource Sharing (CORS),
67 making cross-origin AJAX possible.
68
69 %description -n python3-flask_cors -l pl.UTF-8
70 Rozszerzenie Flaska do obsługi CORS (Cross Origin Resource Sharing),
71 umożliwiającego działanie AJAX-a między domenami.
72
73 %package apidocs
74 Summary:        API documentation for Python Flask-Cors module
75 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona Flask-Cors
76 Group:          Documentation
77
78 %description apidocs
79 API documentation for Python Flask-Cors module.
80
81 %description apidocs -l pl.UTF-8
82 Dokumentacja API modułu Pythona Flask-Cors.
83
84 %prep
85 %setup -q -n Flask-Cors-%{version}
86
87 %build
88 %if %{with python2}
89 %py_build
90
91 %if %{with tests}
92 nosetests-%{py_ver} tests
93 %endif
94 %endif
95
96 %if %{with python3}
97 %py3_build
98
99 %if %{with tests}
100 nosetests-%{py3_ver} tests
101 %endif
102 %endif
103
104 %if %{with doc}
105 %{__make} -C docs html \
106         SPHINXBUILD=sphinx-build-2
107 %endif
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111
112 %if %{with python2}
113 %py_install
114
115 %py_postclean
116 %endif
117
118 %if %{with python3}
119 %py3_install
120 %endif
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %if %{with python2}
126 %files
127 %defattr(644,root,root,755)
128 %doc LICENSE README.rst
129 %{py_sitescriptdir}/flask_cors
130 %{py_sitescriptdir}/Flask_Cors-%{version}-py*.egg-info
131 %endif
132
133 %if %{with python3}
134 %files -n python3-flask_cors
135 %defattr(644,root,root,755)
136 %doc LICENSE README.rst
137 %{py3_sitescriptdir}/flask_cors
138 %{py3_sitescriptdir}/Flask_Cors-%{version}-py*.egg-info
139 %endif
140
141 %if %{with doc}
142 %files apidocs
143 %defattr(644,root,root,755)
144 %doc docs/_build/html/{_static,*.html,*.js}
145 %endif
This page took 0.427661 seconds and 3 git commands to generate.