Mail archive
alpine-aports

[alpine-aports] [PATCH 5/7] testing/py3-cssselect2: new APKBUILD

From: Drew DeVault <sir_at_cmpwn.com>
Date: Wed, 3 Apr 2019 16:19:23 -0400

---
 testing/py3-cssselect2/APKBUILD    | 37 ++++++++++++++++++++++++++++++
 testing/py3-cssselect2/tests.patch | 24 +++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 testing/py3-cssselect2/APKBUILD
 create mode 100644 testing/py3-cssselect2/tests.patch
diff --git a/testing/py3-cssselect2/APKBUILD b/testing/py3-cssselect2/APKBUILD
new file mode 100644
index 0000000000..cff5c231cb
--- /dev/null
+++ b/testing/py3-cssselect2/APKBUILD
_at_@ -0,0 +1,37 @@
+# Contributor: Drew DeVault <sir_at_cmpwn.com>
+# Maintainer: Drew DeVault <sir_at_cmpwn.com>
+pkgname=py3-cssselect2
+_pyname=cssselect2
+pkgver=0.2.1
+pkgrel=0
+pkgdesc="CSS selectors for Python ElementTree"
+url="https://pypi.org/projects/cssselect2/"
+arch="noarch"
+license="BSD-3-Clause"
+depends="py3-tinycss2"
+makedepends="python3-dev py3-setuptools py3-tinycss2 py3-pytest py3-pytest-cov"
+_pypiprefix="${_pyname%${_pyname#?}}"
+source="
+	https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz
+	tests.patch
+"
+builddir="$srcdir"/$_pyname-$pkgver
+
+build() {
+	cd "$builddir"
+	python3 setup.py build
+}
+
+check() {
+	cd "$builddir"
+	python3 setup.py pytest
+}
+
+package() {
+	cd "$builddir"
+	mkdir -p "$pkgdir"
+	python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="88490de859175e1cba84257e8ebb6618b388f24f0e121195a013e74c783a5aef0c2aed002eb1a46512392e988b4014824f547bd3c55c645e8c30ad62dd8c1a14  cssselect2-0.2.1.tar.gz
+9300b2ed735ec35caec7c2330c7649527628c7bc894557b8c0d01c613a50cd846f7b186aff04a58d1ee720016aa605be17e9c1fec7801785972d9aa5f4604a5f  tests.patch"
diff --git a/testing/py3-cssselect2/tests.patch b/testing/py3-cssselect2/tests.patch
new file mode 100644
index 0000000000..cea4ca7c10
--- /dev/null
+++ b/testing/py3-cssselect2/tests.patch
_at_@ -0,0 +1,24 @@
+--- cssselect2-0.2.1-orig/setup.cfg
++++ cssselect2-0.2.1/setup.cfg
+_at_@ -5,7 +5,7 @@
+ universal = 1
+ 
+ [tool:pytest]
+-addopts = --cov=cssselect2 --flake8 --isort cssselect2
++addopts = --cov=cssselect2 cssselect2
+ norecursedirs = dist .cache .git build *.egg-info .eggs venv
+ 
+ [egg_info]
+--- cssselect2-0.2.1-orig/setup.py
++++ cssselect2-0.2.1/setup.py
+_at_@ -29,8 +29,6 @@
+     install_requires=['tinycss2'],
+     setup_requires=pytest_runner,
+     test_suite='cssselect2.tests',
+-    tests_require=[
+-        'pytest-runner', 'pytest-cov', 'pytest-flake8', 'pytest-isort'],
+-    extras_require={'test': [
+-        'pytest-runner', 'pytest-cov', 'pytest-flake8', 'pytest-isort']},
++    tests_require=['pytest-runner', 'pytest-cov'],
++    extras_require={'test': ['pytest-runner', 'pytest-cov']},
+ )
-- 
2.21.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Wed Apr 03 2019 - 16:19:23 UTC