summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Gamble2017-04-13 09:18:10 +1000
committerMatthew Gamble2017-04-13 09:18:10 +1000
commit99251075b96d4c485a688f842a28689b639e3270 (patch)
tree2ab03625d252a28421c6b4b14f255229320ad3a2
downloadaur-99251075b96d4c485a688f842a28689b639e3270.tar.gz
Initial commit
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD37
-rw-r--r--requirements.patch18
4 files changed, 76 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a492b62253bb
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+# Generated by mksrcinfo v8
+# Wed Apr 12 23:16:14 UTC 2017
+pkgbase = python-infi.unittest
+ pkgdesc = Various extensions to the unittest module
+ pkgver = 1.1.0
+ pkgrel = 1
+ arch = any
+ license = BSD3
+ depends = python-infi
+ depends = python-munch
+ source = https://github.com/Infinidat/infi.unittest/archive/1.1.0.tar.gz
+ source = requirements.patch
+ sha256sums = 311e0ebcab6e67821ab044735d29d2b6aaebc562a7bc6bb6aa665ea2f1afaadf
+ sha256sums = 94fca55157ce215ef89b641b10d7da69c7e3ab8a8ca07cf3462c826a6e89419e
+
+pkgname = python-infi.unittest
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..09a7cf861136
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg/
+/src/
+*.pkg.tar.xz
+*.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..770031a41ba2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Matthew Gamble <git@matthewgamble.net>
+
+pkgname=python-infi.unittest
+pkgver=1.1.0
+pkgrel=1
+pkgdesc="Various extensions to the unittest module"
+arch=("any")
+license=("BSD3")
+depends=("python-infi" "python-munch")
+source=(
+ "https://github.com/Infinidat/infi.unittest/archive/${pkgver}.tar.gz"
+ "requirements.patch"
+)
+sha256sums=(
+ "311e0ebcab6e67821ab044735d29d2b6aaebc562a7bc6bb6aa665ea2f1afaadf"
+ "94fca55157ce215ef89b641b10d7da69c7e3ab8a8ca07cf3462c826a6e89419e"
+)
+
+prepare() {
+ cd "${srcdir}/infi.unittest-${pkgver}"
+ patch -p1 < "${srcdir}/requirements.patch"
+}
+
+package() {
+ _sitepkgs_dir=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(), end='')")
+ _pyversion=$(python -c "import sys; print('{}.{}'.format(*sys.version_info[:2]), end='')")
+
+ cd "${srcdir}/infi.unittest-${pkgver}"
+ python setup.py install --root="${pkgdir}"
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/python-infi.unittest/LICENSE"
+ # The infi namespace is provided by the python-infi package
+ rm "${pkgdir}${_sitepkgs_dir}/infi.unittest-${pkgver}-py${_pyversion}-nspkg.pth"
+ # Remove traces of the base infi package files from the egg metadata
+ rm "${pkgdir}${_sitepkgs_dir}/infi.unittest-${pkgver}-py${_pyversion}.egg-info/namespace_packages.txt"
+ sed -i '/namespace_packages\.txt/d' "${pkgdir}/${_sitepkgs_dir}/infi.unittest-${pkgver}-py${_pyversion}.egg-info/SOURCES.txt"
+ sed -i '/^infi\/__init__\.py$/d' "${pkgdir}/${_sitepkgs_dir}/infi.unittest-${pkgver}-py${_pyversion}.egg-info/SOURCES.txt"
+}
diff --git a/requirements.patch b/requirements.patch
new file mode 100644
index 000000000000..546dd2cc886d
--- /dev/null
+++ b/requirements.patch
@@ -0,0 +1,18 @@
+From: Matthew Gamble <git@matthewgamble.net>
+
+pyforge is incorrectly listed as a hard requirement in setup.py, when in fact
+it's actually just for running the test suite for this library.
+
+diff --git a/setup.py b/setup.py
+index 9601262..62ec31f 100644
+--- a/setup.py
++++ b/setup.py
+@@ -25,7 +25,7 @@ setup(name="infi.unittest",
+ version=__version__,
+ packages=find_packages(exclude=["tests"]),
+ namespace_packages=["infi"],
+- install_requires=_REQUIREMENTS,
++ install_requires=["munch"],
+ scripts=[],
+ entry_points = {
+ 'nose.plugins.0.10': [