mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
python-selenium: import build fixes from AUR
This commit is contained in:
parent
f323d97993
commit
cee4dc75d0
2 changed files with 36 additions and 17 deletions
|
@ -4,14 +4,16 @@
|
|||
# Contributor: Aaron DeVore <aaron.devore@gmail.com>
|
||||
|
||||
pkgname=python-selenium
|
||||
_pkgname=${pkgname#python-}
|
||||
pkgver=4.22.0
|
||||
pkgrel=2
|
||||
pkgver=4.24.0
|
||||
pkgrel=1
|
||||
pkgdesc="Python language bindings for Selenium WebDriver"
|
||||
arch=(any)
|
||||
arch=(x86_64)
|
||||
url="https://github.com/SeleniumHQ/selenium"
|
||||
license=(Apache-2.0)
|
||||
depends=(
|
||||
bzip2
|
||||
gcc-libs
|
||||
glibc
|
||||
python
|
||||
python-certifi
|
||||
python-trio
|
||||
|
@ -19,41 +21,46 @@ depends=(
|
|||
python-typing_extensions
|
||||
python-urllib3
|
||||
python-websocket-client
|
||||
zlib
|
||||
)
|
||||
makedepends=(
|
||||
python-build
|
||||
python-installer
|
||||
python-setuptools
|
||||
python-setuptools-rust
|
||||
python-wheel
|
||||
)
|
||||
checkdepends=(python-pytest)
|
||||
source=("$pkgname-$pkgver.tar.gz::$url/archive/selenium-$pkgver.tar.gz")
|
||||
sha256sums=('196c7080449c48a46fab64dce0fb0085f7c2276d359d49ef1fad51203c853152')
|
||||
options=(!lto)
|
||||
source=(
|
||||
"$pkgname-$pkgver.tar.gz::$url/archive/selenium-$pkgver.tar.gz"
|
||||
"fix-selenium-manager-build.patch"
|
||||
)
|
||||
sha256sums=('981015b21a120072c20f87f2a0bd8a677d65cf98464657cb0cf96094b1dd44a4'
|
||||
'af031d7fd32bb4b8216d8b16957e2102b4f319ae22d94460636db90947d2d6ba')
|
||||
|
||||
_archive="$_pkgname-selenium-$pkgver/py"
|
||||
_archive="selenium-selenium-$pkgver"
|
||||
|
||||
prepare() {
|
||||
cd "$_archive"
|
||||
cd "$srcdir/$_archive"
|
||||
patch -Np1 -i "$srcdir/fix-selenium-manager-build.patch"
|
||||
|
||||
cp ../rb/lib/selenium/webdriver/atoms/* selenium/webdriver/remote
|
||||
echo '{"frozen":{},"mutable":{}}' > \
|
||||
selenium/webdriver/firefox/webdriver_prefs.json
|
||||
cd "$srcdir/$_archive/rust"
|
||||
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$_archive"
|
||||
|
||||
cd "$srcdir/$_archive/py"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
python -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$_archive"
|
||||
|
||||
cd "$srcdir/$_archive/py"
|
||||
pytest
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$_archive"
|
||||
|
||||
cd "$srcdir/$_archive/py"
|
||||
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/py/setup.py b/py/setup.py
|
||||
index ba78a9a66c..fc7c6cc2fd 100755
|
||||
--- a/py/setup.py
|
||||
+++ b/py/setup.py
|
||||
@@ -87,6 +87,7 @@ setup_args = {
|
||||
'rust_extensions': [
|
||||
RustExtension(
|
||||
{"selenium-manager": "selenium.webdriver.common.selenium-manager"},
|
||||
+ "../rust/Cargo.toml",
|
||||
binding=Binding.Exec
|
||||
)
|
||||
],
|
Loading…
Add table
Reference in a new issue