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