]> git.pld-linux.org Git - packages/python-selenium.git/blob - python-selenium.spec
- python2 note
[packages/python-selenium.git] / python-selenium.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 %define         module  selenium
7 Summary:        Python bindings for Selenium
8 Summary(pl.UTF-8):      Wiązania Pythona do Selenium
9 Name:           python-%{module}
10 # keep 3.x here for python2 support
11 Version:        3.141.0
12 Release:        7
13 License:        Apache v2.0
14 Group:          Development/Languages/Python
15 #Source0Download: https://pypi.org/simple/selenium/
16 Source0:        https://files.pythonhosted.org/packages/source/s/selenium/%{module}-%{version}.tar.gz
17 # Source0-md5:  274693e383ff507df7ee190359828c84
18 Patch0:         xpi-path.patch
19 Patch1:         0002-Pick-debian-location-of-chromedriver-from-chromium-d.patch
20 URL:            https://pypi.org/project/selenium/
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.7
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules >= 1:3.4
27 BuildRequires:  python3-setuptools
28 %endif
29 BuildRequires:  rpm-pythonprov
30 BuildRequires:  rpmbuild(macros) >= 1.714
31 BuildRequires:  unzip
32 Suggests:       chromedriver
33 Suggests:       selenium-firefoxdriver
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 Python language bindings for Selenium WebDriver.
39
40 The selenium package is used to automate web browser interaction from
41 Python.
42
43 %description -l pl.UTF-8
44 Wiązania Pythona do sterownika Selenium WebDriver.
45
46 Pakiet selenium służy automatyzacji interakcji z przeglądarką WWW z
47 poziomu Pythona.
48
49 %package -n python3-%{module}
50 Summary:        Python bindings for Selenium
51 Summary(pl.UTF-8):      Wiązania Pythona do Selenium
52 Group:          Development/Languages/Python
53 Suggests:       chromedriver
54 Suggests:       selenium-firefoxdriver
55
56 %description -n python3-%{module}
57 Python language bindings for Selenium WebDriver.
58
59 The selenium package is used to automate web browser interaction from
60 Python.
61
62 %description -n python3-%{module} -l pl.UTF-8
63 Wiązania Pythona do sterownika Selenium WebDriver.
64
65 Pakiet selenium służy automatyzacji interakcji z przeglądarką WWW z
66 poziomu Pythona.
67
68 %prep
69 %setup -q -n %{module}-%{version}
70 %patch0 -p1
71 %patch1 -p1
72
73 %build
74 %if %{with python2}
75 %py_build
76 %endif
77
78 %if %{with python3}
79 %py3_build
80 %endif
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84
85 %if %{with python2}
86 %py_install
87
88 %py_postclean
89 %endif
90
91 %if %{with python3}
92 %py3_install
93 %endif
94
95 # driver is in selenium-firefoxdriver.spec
96 %if %{with python2}
97 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/webdriver.xpi
98 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/amd64
99 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/webdriver/firefox/x86
100 %endif
101
102 %if %{with python3}
103 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/webdriver.xpi
104 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/amd64
105 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/webdriver/firefox/x86
106 %endif
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %if %{with python2}
112 %files
113 %defattr(644,root,root,755)
114 %doc CHANGES README.rst
115 %{py_sitescriptdir}/%{module}
116 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
117 %endif
118
119 %if %{with python3}
120 %files -n python3-%{module}
121 %defattr(644,root,root,755)
122 %doc CHANGES README.rst
123 %{py3_sitescriptdir}/%{module}
124 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
125 %endif
This page took 0.12351 seconds and 4 git commands to generate.