diff --git a/mpdecimal/PKGBUILD b/mpdecimal/PKGBUILD new file mode 100644 index 000000000..8e8f931f0 --- /dev/null +++ b/mpdecimal/PKGBUILD @@ -0,0 +1,26 @@ +# Contributor: Felix Yan + +pkgname=mpdecimal +pkgver=2.4.2 +pkgrel=1 +pkgdesc="Package for correctly-rounded arbitrary precision decimal floating point arithmetic" +arch=('x86_64') +url="http://www.bytereef.org/mpdecimal/index.html" +license=('custom') +depends=('glibc') +source=("http://www.bytereef.org/software/$pkgname/releases/$pkgname-$pkgver.tar.gz") +sha512sums=('eb18ad53b81b93c469db4d915bbb3fae21b36ad82a88e01fef3a6946ac5f50b54376e259a5ecbe23836f1efd59d226b942ecdee87eaba7f9e75cdcaaa9499ef7') + +build() { + cd $pkgname-$pkgver + + ./configure --prefix=/usr + make +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + + install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt +} diff --git a/mutagen/PKGBUILD b/mutagen/PKGBUILD index 3fa12352b..cb914d74e 100644 --- a/mutagen/PKGBUILD +++ b/mutagen/PKGBUILD @@ -3,22 +3,27 @@ pkgbase=mutagen pkgname=('mutagen' 'python3-mutagen') -pkgver=1.37 +pkgver=1.40.0 pkgrel=1 arch=('any') url="https://github.com/quodlibet/mutagen" license=('GPL2') -makedepends=('python2-setuptools' 'python3-setuptools') -checkdepends=('python2-pytest' 'python3-pytest') -source=($pkgname-$pkgver::https://github.com/quodlibet/mutagen/archive/release-${pkgver}.tar.gz) -sha1sums=('4c9725f0b613d54e8ae522dac3d716c36ef10095') +makedepends=(python2-setuptools python3-setuptools) +checkdepends=(python2-pytest python3-pytest + python2-hypothesis python3-hypothesis + python2-pyflakes python3-pyflakes + python2-pycodestyle python3-pycodestyle) +source=(https://github.com/quodlibet/mutagen/releases/download/release-${pkgver}/${pkgbase}-${pkgver}.tar.gz{,.sig}) +validgpgkeys=(0EBF782C5D53F7E5FB02A66746BD761F7A49B0EC) +sha1sums=('3473555912d01026ed9c085b01d91ee0117b45f9' + 'SKIP') prepare() { - cp -aT $pkgbase-release-$pkgver python3-$pkgbase-$pkgver + cp -aT $pkgbase-$pkgver python3-$pkgbase-$pkgver } check() { - cd $pkgbase-release-$pkgver + cd $pkgbase-$pkgver LANG=en_US.UTF8 python2 setup.py test cd ../python3-$pkgbase-$pkgver # LANG=en_US.UTF8 python3 setup.py test @@ -28,7 +33,7 @@ package_mutagen() { pkgdesc="An audio metadata tag reader and writer" depends=('python2') - cd $pkgbase-release-$pkgver + cd $pkgbase-$pkgver python2 setup.py install --root="${pkgdir}" } diff --git a/pylint/PKGBUILD b/pylint/PKGBUILD new file mode 100644 index 000000000..cb9d0a7bb --- /dev/null +++ b/pylint/PKGBUILD @@ -0,0 +1,82 @@ +# Contributor: Angel Velasquez +# Contributor: Felix Yan +# Contributor: Stéphane Gaudreault +# Contributor: Alexander Fehr + +pkgbase=pylint +pkgname=('python3-pylint' 'python2-pylint') +pkgver=1.8.2 +pkgrel=2 +pkgdesc="Analyzes Python code looking for bugs and signs of poor quality" +arch=('any') +url="http://pylint.org" +license=('GPL') +makedepends=('python3-astroid' 'python2-astroid' + 'python3-setuptools' 'python2-setuptools' + 'python3-six' 'python2-six' + 'python3-isort' 'python2-isort' + 'python3-mccabe' 'python2-mccabe' + 'python2-backports.functools_lru_cache' + 'python2-configparser' + 'python2-singledispatch') +checkdepends=('python3-pytest-runner' 'python2-pytest-runner' 'mpdecimal') +optdepends=('tk: Pylint GUI' + 'graphviz: To have other output formats than dot or vcg') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/PyCQA/pylint/archive/pylint-$pkgver.tar.gz") +sha512sums=('ac0e7d53b5482435b0579b475684bb725358f21ae3a09d15fdf01bb51dd06f9204c4be3b17de69d4e11d1fed38820f0046625030928ca5699f2828c8f2a44716') + +prepare() { + sed -i 's/pytest<3.3/pytest/' pylint-pylint-$pkgver/setup.py + + cp -a pylint-pylint-$pkgver{,-py2} + + cd "$srcdir"/pylint-pylint-$pkgver/pylint + sed -e "s|/usr/bin/env python|/usr/bin/env python3|" -e "s|/usr/bin/python$|/usr/bin/python3|" -i epylint.py __main__.py test/input/noext test/data/ascript + + cd "$srcdir"/pylint-pylint-$pkgver-py2/pylint + sed -e "s|/usr/bin/env python|/usr/bin/env python2|" -e "s|/usr/bin/python$|/usr/bin/python2|" -i epylint.py __main__.py test/input/noext test/data/ascript +} + +build() { + cd "$srcdir"/pylint-pylint-$pkgver + python3 setup.py build + + cd "$srcdir"/pylint-pylint-$pkgver-py2 + python2 setup.py build +} + +check() { + cd "$srcdir"/pylint-pylint-$pkgver + python3 setup.py pytest + + cd "$srcdir"/pylint-pylint-$pkgver-py2 + python2 setup.py pytest +} + +package_python3-pylint() { + depends=('python3-astroid' 'python3-setuptools' 'python3-mccabe' 'python3-isort') + + cd pylint-pylint-$pkgver + + python3 setup.py install --prefix=/usr --root="$pkgdir" --skip-build --optimize=1 + + install -d "$pkgdir"/usr/share/man/man1 + install -m644 man/* "$pkgdir"/usr/share/man/man1 +} + +package_python2-pylint() { + depends=('python2-astroid' 'python2-setuptools' 'python2-mccabe' 'python2-isort' + 'python2-backports.functools_lru_cache' 'python2-configparser' 'python2-singledispatch') + + cd pylint-pylint-$pkgver-py2 + + python2 setup.py install --prefix=/usr --root="$pkgdir" --skip-build --optimize=1 + + install -d "$pkgdir"/usr/share/man/man1 + install -m644 man/* "$pkgdir"/usr/share/man/man1 + + for _exe in epylint pylint pyreverse symilar; do + mv "$pkgdir"/usr/bin/${_exe}{,2} + mv "$pkgdir"/usr/share/man/man1/${_exe}{,2}.1 + done +} diff --git a/python-astroid/PKGBUILD b/python-astroid/PKGBUILD new file mode 100644 index 000000000..c4e39151c --- /dev/null +++ b/python-astroid/PKGBUILD @@ -0,0 +1,61 @@ +# Maintainer: Angel Velasquez +# Maintainer: Felix Yan + +pkgbase=python-astroid +pkgname=('python2-astroid' 'python3-astroid') +pkgver=1.6.1 +pkgrel=1 +pkgdesc="Useful miscellaneous modules used by Logilab projects" +arch=('any') +url="https://github.com/PyCQA/astroid" +license=('LGPL') +makedepends=('python3-setuptools' 'python2-setuptools' 'python3-six' 'python2-six' + 'python3-lazy-object-proxy' 'python2-lazy-object-proxy' 'python3-wrapt' 'python2-wrapt' + 'python2-singledispatch' 'python2-enum34' 'python2-backports.functools_lru_cache') +checkdepends=('python3-dateutil' 'python2-dateutil' 'python3-pytest' 'python2-pytest' 'python3-numpy' + 'python2-numpy' 'python3-nose' 'python2-nose') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/PyCQA/astroid/archive/astroid-$pkgver.tar.gz") +sha512sums=('fbe1495ecd493de0341ce973046c94f2fe2783666ad4d15513ea60831d1e0f0663d3f3afdc0c37a6313eb581f333bdc75c21214b660536c92f3b5073ce0845f2') + +prepare() { + cp -a astroid-astroid-$pkgver{,-py2} +} + +build() { + cd "$srcdir"/astroid-astroid-$pkgver + python3 setup.py build + + cd "$srcdir"/astroid-astroid-$pkgver-py2 + python2 setup.py build +} + +check() { + cd "$srcdir"/astroid-astroid-$pkgver + python3 -c "from astroid import __pkginfo__; print(__pkginfo__.version)" + # https://github.com/PyCQA/astroid/issues/472 + PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python3 -Wi -m unittest discover -s build/lib/astroid/tests -p "unittest*.py" -v || warning "Tests failed" + + cd "$srcdir"/astroid-astroid-$pkgver-py2 + PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python2 -Wi -m unittest discover -s build/lib/astroid/tests -p "unittest*.py" -v +} + +package_python3-astroid() { + depends=('python3-six' 'python3-lazy-object-proxy' 'python3-wrapt') + replaces=('python3-logilab-astng') + conflicts=('python3-logilab-astng') + + cd astroid-astroid-$pkgver + + python3 setup.py install --optimize=1 --skip-build --prefix=/usr --root="$pkgdir" +} + +package_python2-astroid() { + depends=('python2-six' 'python2-lazy-object-proxy' 'python2-wrapt' 'python2-singledispatch' + 'python2-enum34' 'python2-backports.functools_lru_cache') + replaces=('python2-logilab-astng') + conflicts=('python2-logilab-astng') + + cd astroid-astroid-$pkgver-py2 + + python2 setup.py install --optimize=1 --skip-build --prefix=/usr --root="$pkgdir" +} diff --git a/python-coverage/PKGBUILD b/python-coverage/PKGBUILD new file mode 100644 index 000000000..c33cbd868 --- /dev/null +++ b/python-coverage/PKGBUILD @@ -0,0 +1,71 @@ +# Contributor: Felix Yan +# Contributor: Clément Démoulins +# Contributor: Fazlul Shahriar + +pkgbase=python-coverage +pkgname=(python3-coverage python2-coverage) +pkgver=4.5.1 +pkgrel=1 +pkgdesc="A tool for measuring code coverage of Python programs" +arch=('x86_64') +url="http://nedbatchelder.com/code/coverage/" +license=('Apache') +makedepends=('python3-setuptools' 'python2-setuptools') +checkdepends=('python3-mock' 'python2-mock' 'python3-pytest-xdist' 'python2-pytest-xdist' + 'python3-pycontracts' 'python2-pycontracts' 'python3-greenlet' 'python2-greenlet' + 'python3-virtualenv' 'python2-virtualenv' 'python3-pyenchant' 'python2-pyenchant' + 'python3-pylint' 'python2-pylint' 'python3-unittest-mixins' 'python2-unittest-mixins' + 'python3-flaky' 'python2-flaky') +source=("$pkgbase-$pkgver.tar.gz::https://bitbucket.org/ned/coveragepy/get/coverage-$pkgver.tar.gz") +sha512sums=('72e03b35140596d7b6cd2976d35ecfd931b8c5518ae09dddeb2e204e73cee5e4f87341458dabbf5fdc6774a89342383ccd01d98ec7a8291f9cf8d9c1e5e9d0e9') + +prepare() { + mv ned-coveragepy-* coveragepy-$pkgver + cp -a coveragepy-$pkgver{,-py2} +} + +check() { + # Hack entry points by installing it + + export LC_CTYPE=en_US.UTF-8 + + ( + cd "$srcdir/coveragepy-$pkgver" + virtualenv3 "$srcdir/pyvenv" --system-site-packages + . "$srcdir/pyvenv/bin/activate" + export PYTHONPATH="$PYTHONPATH:/usr/lib/python3.6/site-packages" + python setup.py --quiet develop + python igor.py zip_mods install_egg remove_extension + python igor.py test_with_tracer py + python setup.py --quiet build_ext --inplace + python igor.py test_with_tracer c + ) || warning "Python 3 tests failed" + + ( + cd "$srcdir/coveragepy-$pkgver-py2" + virtualenv2 "$srcdir/pyvenv-py2" --system-site-packages + . "$srcdir/pyvenv-py2/bin/activate" + export PYTHONPATH="$PYTHONPATH:/usr/lib/python2.7/site-packages" + python setup.py --quiet develop + python igor.py zip_mods install_egg remove_extension + python igor.py test_with_tracer py + python setup.py --quiet build_ext --inplace + python igor.py test_with_tracer c + ) || warning "Python 2 tests failed" +} + +package_python3-coverage() { + depends=('python3') + + cd coveragepy-$pkgver + python3 setup.py install --root="$pkgdir" --optimize=1 +} + +package_python2-coverage() { + depends=('python2') + + cd coveragepy-$pkgver + python2 setup.py install --root="$pkgdir" --optimize=1 + + mv "$pkgdir/usr/bin/coverage" "$pkgdir/usr/bin/coverage2" +} diff --git a/python-fields/.gitignore b/python-fields/.gitignore new file mode 100644 index 000000000..25767d7f1 --- /dev/null +++ b/python-fields/.gitignore @@ -0,0 +1 @@ +python-fields diff --git a/python-fields/PKGBUILD b/python-fields/PKGBUILD new file mode 100644 index 000000000..1b3cb7c31 --- /dev/null +++ b/python-fields/PKGBUILD @@ -0,0 +1,57 @@ +# $Id$ +# Maintainer: Felix Yan + +pkgbase=python-fields +pkgname=('python3-fields' 'python2-fields') +pkgver=5.0.0 +pkgrel=2 +arch=('any') +pkgdesc='A totally different take on container boilerplate' +url='https://github.com/ionelmc/python-fields' +license=('BSD') +makedepends=('python3-setuptools' 'python2-setuptools' 'git') +checkdepends=( + 'python3-pytest-benchmark' 'python2-pytest-benchmark' + 'python3-pytest-runner' 'python2-pytest-runner' 'python3-attrs' + 'python2-attrs' 'python3-characteristic' 'python2-characteristic') +source=("git+https://github.com/ionelmc/python-fields.git#tag=v$pkgver") +sha512sums=('SKIP') + +prepare() { + cp -a python-fields{,-py2} +} + +build() { + cd "$srcdir"/python-fields + python3 setup.py build + + cd "$srcdir"/python-fields-py2 + python2 setup.py build +} + +check() { + # To workaround an error in doctest + export LC_CTYPE=en_US.UTF-8 + + cd "$srcdir"/python-fields + python3 setup.py ptr + + cd "$srcdir"/python-fields-py2 + python2 setup.py ptr +} + +package_python3-fields() { + depends=('python3') + + cd python-fields + python3 setup.py install --root "$pkgdir" --optimize=1 + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +package_python2-fields() { + depends=('python2') + + cd python-fields-py2 + python2 setup.py install --root "$pkgdir" --optimize=1 + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} diff --git a/python-flaky/PKGBUILD b/python-flaky/PKGBUILD new file mode 100644 index 000000000..6d131e3fb --- /dev/null +++ b/python-flaky/PKGBUILD @@ -0,0 +1,69 @@ +# Contributor: Felix Yan + +pkgbase=python-flaky +pkgname=('python3-flaky' 'python2-flaky') +pkgver=3.4.0 +pkgrel=1 +pkgdesc='Plugin for nose or py.test that automatically reruns flaky tests' +arch=('any') +license=('Apache') +url='https://github.com/box/flaky' +makedepends=('python3-setuptools' 'python2-setuptools') +checkdepends=('python3-pytest' 'python2-pytest' 'python3-nose' 'python2-nose' + 'python3-genty' 'python2-genty' 'python3-mock' 'python2-mock') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/box/flaky/archive/v$pkgver.tar.gz") +sha512sums=('1e0902d1fc1566e11e64c6a983617d63109f6277fc51e42a88d9d1d7115dd2234636b0833df3aba22838427b792caa65638c33e75f86b3d402054923af3ffd66') + +prepare() { + cp -a flaky-$pkgver{,-py2} +} + +build() { + cd "$srcdir"/flaky-$pkgver + python3 setup.py build + + cd "$srcdir"/flaky-$pkgver-py2 + python2 setup.py build +} + +check() { + # Hack entry points by installing it + + cd "$srcdir"/flaky-$pkgver + python3 setup.py install --root="$PWD/tmp_install" --optimize=1 + ( + export PYTHONPATH="$PWD/tmp_install/usr/lib/python3.6/site-packages:$PYTHONPATH" + nosetests3 --with-flaky --exclude="test_nose_options_example" test/test_nose/ + py.test -k 'example and not options' --doctest-modules test/test_pytest/ + py.test -p no:flaky test/test_pytest/test_flaky_pytest_plugin.py + nosetests3 --with-flaky --force-flaky --max-runs 2 test/test_nose/test_nose_options_example.py + py.test --force-flaky --max-runs 2 test/test_pytest/test_pytest_options_example.py + ) + + cd "$srcdir"/flaky-$pkgver-py2 + python2 setup.py install --root="$PWD/tmp_install" --optimize=1 + ( + export PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages:$PYTHONPATH" + nosetests2 --with-flaky --exclude="test_nose_options_example" test/test_nose/ + py.test2 -k 'example and not options' --doctest-modules test/test_pytest/ + py.test2 -p no:flaky test/test_pytest/test_flaky_pytest_plugin.py + nosetests2 --with-flaky --force-flaky --max-runs 2 test/test_nose/test_nose_options_example.py + py.test2 --force-flaky --max-runs 2 test/test_pytest/test_pytest_options_example.py + ) +} + +package_python3-flaky() { + depends=('python3') + + cd "$srcdir"/flaky-$pkgver + python3 setup.py install --root="$pkgdir" --optimize=1 +} + +package_python2-flaky() { + depends=('python2') + + cd "$srcdir"/flaky-$pkgver-py2 + python2 setup.py install --root="$pkgdir" --optimize=1 +} + +# vim:set ts=2 sw=2 et: diff --git a/python-genty/.gitignore b/python-genty/.gitignore new file mode 100644 index 000000000..eb1b55c92 --- /dev/null +++ b/python-genty/.gitignore @@ -0,0 +1 @@ +genty diff --git a/python-genty/PKGBUILD b/python-genty/PKGBUILD new file mode 100644 index 000000000..256dd861d --- /dev/null +++ b/python-genty/PKGBUILD @@ -0,0 +1,48 @@ +# Contributor: Felix Yan + +pkgbase=python-genty +pkgname=('python3-genty' 'python2-genty') +pkgver=1.3.2 +pkgrel=2 +pkgdesc="Allows you to run a test with multiple data sets" +arch=('any') +license=('Apache') +url="https://github.com/box/genty" +makedepends=('python3-setuptools' 'python2-setuptools' 'python3-six' 'python2-six' 'git') +checkdepends=('python3-mock' 'python2-mock') +source=("git+https://github.com/box/genty.git#tag=v$pkgver") +sha512sums=('SKIP') + +prepare() { + cp -a genty{,-py2} +} + +build() { + cd "$srcdir/genty" + python3 setup.py build + + cd "$srcdir/genty-py2" + python2 setup.py build +} + +check() { + cd "$srcdir/genty" + python3 setup.py test + + cd "$srcdir/genty-py2" + python2 setup.py test +} + +package_python3-genty() { + depends=('python3-six') + + cd genty + python3 setup.py install --root="${pkgdir}" --optimize=1 +} + +package_python2-genty() { + depends=('python2-six') + + cd genty-py2 + python2 setup.py install --root="${pkgdir}" --optimize=1 +} diff --git a/python-hypothesis/PKGBUILD b/python-hypothesis/PKGBUILD new file mode 100644 index 000000000..c08762016 --- /dev/null +++ b/python-hypothesis/PKGBUILD @@ -0,0 +1,47 @@ +# Arch Contributor: Felix Yan + +pkgbase=python-hypothesis +pkgname=('python3-hypothesis' 'python2-hypothesis') +pkgver=3.48.0 +pkgrel=1 +pkgdesc="Advanced Quickcheck style testing library for Python" +arch=('any') +license=('MPL') +url="https://hypothesis.readthedocs.org" +makedepends=('python3-setuptools' 'python2-setuptools' + 'python3-attrs' 'python2-attrs' + 'python3-coverage' 'python2-coverage' + 'python2-enum34') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/HypothesisWorks/hypothesis-python/archive/$pkgver.tar.gz") +sha512sums=('eb3377fae612840737f134c413a6835926580648f982cb6b8fb319571bd600348c621500bb0210c68c0aad4aa27e9cccf2e60af63cc08b2c15f04bf1c02152dc') + +prepare() { + cp -a hypothesis-python-$pkgver{,-py2} + + rm -r hypothesis-python-$pkgver/tests/py2 + rm -r hypothesis-python-$pkgver-py2/tests/py3 + + export LC_CTYPE=en_US.UTF-8 +} + +build() { + cd "$srcdir"/hypothesis-python-$pkgver + python3 setup.py build + + cd "$srcdir"/hypothesis-python-$pkgver-py2 + python2 setup.py build +} + +package_python3-hypothesis() { + depends=('python3-attrs' 'python3-coverage') + + cd hypothesis-python-$pkgver + python3 setup.py install --root="$pkgdir" --optimize=1 +} + +package_python2-hypothesis() { + depends=('python2-attrs' 'python2-coverage' 'python2-enum34') + + cd hypothesis-python-$pkgver-py2 + python2 setup.py install --root="$pkgdir" --optimize=1 +} diff --git a/python-isort/PKGBUILD b/python-isort/PKGBUILD new file mode 100644 index 000000000..c019d9cce --- /dev/null +++ b/python-isort/PKGBUILD @@ -0,0 +1,54 @@ +# $Id$ +# Maintainer: Felix Yan +# Contributor: Yaron de Leeuw + +pkgbase=python-isort +pkgname=('python3-isort' 'python2-isort') +pkgver=4.3.4 +pkgrel=1 +pkgdesc="A Python utility / library to sort Python imports." +arch=('any') +url="https://github.com/timothycrosley/isort" +license=('MIT') +makedepends=('python3-setuptools' 'python2-setuptools' 'python2-futures') +checkdepends=('python3-pytest' 'python2-pytest' 'python3-mock' 'python2-mock') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/timothycrosley/isort/archive/$pkgver.tar.gz") +sha512sums=('cc9254c288e479a05cc20c29c9be6fa368a46e85f8eb0a22238ee3e57004a75999d35d2a736ad0a4ddc7d7c7efcc30fb97bfd16fcd0adb44d3b937dd935588b7') + +prepare() { + cp -a isort-$pkgver{,-py2} +} + +build() { + cd "$srcdir"/isort-$pkgver + python3 setup.py build + + cd "$srcdir"/isort-$pkgver-py2 + python2 setup.py build +} + +check() { + cd "$srcdir"/isort-$pkgver + python3 setup.py test + + cd "$srcdir"/isort-$pkgver-py2 + python2 setup.py test +} + +package_python3-isort() { + depends=('python3-setuptools') + + cd isort-$pkgver + python3 setup.py install --root="$pkgdir" --optimize=1 + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +package_python2-isort() { + depends=('python2-setuptools' 'python2-futures') + + cd isort-$pkgver-py2 + python2 setup.py install --root="$pkgdir" --optimize=1 + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + + mv "$pkgdir"/usr/bin/isort{,2} +} diff --git a/python-lazy-object-proxy/PKGBUILD b/python-lazy-object-proxy/PKGBUILD new file mode 100644 index 000000000..c0db83842 --- /dev/null +++ b/python-lazy-object-proxy/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Felix Yan + +pkgbase=python-lazy-object-proxy +pkgname=(python3-lazy-object-proxy python2-lazy-object-proxy) +pkgver=1.3.1 +pkgrel=1 +pkgdesc='A fast and thorough lazy object proxy' +arch=('x86_64') +url="https://github.com/ionelmc/python-lazy-object-proxy" +license=('BSD') +makedepends=('python3-setuptools' 'python2-setuptools') +checkdepends=('python3-pytest' 'python2-pytest' + 'python3-pytest-benchmark' 'python2-pytest-benchmark') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/ionelmc/python-lazy-object-proxy/archive/v$pkgver.tar.gz") +sha256sums=('b315bc589ac934feb81c954424b501bf56afdbf7851918be4261c2ccdbb14ea7') + +prepare() { + cp -a python-lazy-object-proxy-$pkgver{,-py2} +} + +build() { + cd "$srcdir"/python-lazy-object-proxy-$pkgver + python3 setup.py build + + cd "$srcdir"/python-lazy-object-proxy-$pkgver-py2 + python2 setup.py build +} + +check() { + cd "$srcdir"/python-lazy-object-proxy-$pkgver + LC_CTYPE=en_US.UTF-8 PYTHONPATH="$PWD/build/lib.linux-$CARCH-3.6:$PYTHONPATH" py.test --ignore=src + + cd "$srcdir"/python-lazy-object-proxy-$pkgver-py2 + PYTHONPATH="$PWD/build/lib.linux-$CARCH-2.7:$PYTHONPATH" py.test2 --ignore=src +} + +package_python3-lazy-object-proxy() { + depends=("python3") + + cd python-lazy-object-proxy-$pkgver + python3 setup.py install --root="$pkgdir" --optimize=1 + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +package_python2-lazy-object-proxy() { + depends=("python2") + + cd python-lazy-object-proxy-$pkgver-py2 + python2 setup.py install --root="$pkgdir" --optimize=1 + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} diff --git a/python-mccabe/PKGBUILD b/python-mccabe/PKGBUILD new file mode 100644 index 000000000..e2e9909a7 --- /dev/null +++ b/python-mccabe/PKGBUILD @@ -0,0 +1,54 @@ +# Contributor: Felix Yan +# Contributor: Karol "Kenji Takahashi" Woźniak + +pkgbase=python-mccabe +pkgname=(python3-mccabe python2-mccabe) +pkgver=0.6.1 +pkgrel=1 +pkgdesc="McCabe complexity checker for Python" +arch=('any') +url="https://github.com/flintwork/mccabe" +license=('custom:Expat') +makedepends=('python3-pytest-runner' 'python2-pytest-runner') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/flintwork/mccabe/archive/$pkgver.tar.gz") +md5sums=('0360af86f0bce7a839bd3cba517edf9c') + +prepare() { + cp -a mccabe-$pkgver{,-py2} +} + +build() { + cd "$srcdir"/mccabe-$pkgver + python3 setup.py build + + cd "$srcdir"/mccabe-$pkgver-py2 + python2 setup.py build +} + +check() { + cd "$srcdir"/mccabe-$pkgver + python3 setup.py test + + cd "$srcdir"/mccabe-$pkgver-py2 + python2 setup.py test +} + +package_python3-mccabe() { + depends=('python3') + + cd mccabe-$pkgver + python3 setup.py install --root="$pkgdir" --prefix=/usr --skip-build --optimize=1 + + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +package_python2-mccabe() { + depends=('python2') + + cd mccabe-$pkgver-py2 + python2 setup.py install --root="$pkgdir" --prefix=/usr --skip-build --optimize=1 + + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +# vim:set ts=2 sw=2 et: diff --git a/python-process-tests/PKGBUILD b/python-process-tests/PKGBUILD new file mode 100644 index 000000000..4dd8a7565 --- /dev/null +++ b/python-process-tests/PKGBUILD @@ -0,0 +1,43 @@ +# Contributor: Felix Yan + +pkgbase=python-process-tests +pkgname=('python3-process-tests' 'python2-process-tests') +pkgver=2.0.0 +pkgrel=1 +pkgdesc="Tools for testing processes" +arch=('any') +url="https://pypi.python.org/pypi/process-tests" +license=('BSD') +makedepends=('python3-setuptools' 'python2-setuptools') +source=("https://pypi.io/packages/source/p/process-tests/process-tests-$pkgver.tar.gz") +sha512sums=('456238c9fe29dac2d03acb4f8b26d3801cf3cf997210a5de6634d9a86e8b6f2d29db4042ccc1721caa880b31f8d4131d5c121bab84033625a9ce0e80fd379f8a') + +prepare() { + cp -a process-tests-$pkgver{,-py2} +} + +build() { + cd "$srcdir"/process-tests-$pkgver + python3 setup.py build + + cd "$srcdir"/process-tests-$pkgver-py2 + python2 setup.py build +} + +package_python3-process-tests() { + depends=('python3') + + cd process-tests-$pkgver + python3 setup.py install --root="$pkgdir/" --optimize=1 + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +package_python2-process-tests() { + depends=('python2') + + cd process-tests-$pkgver + python2 setup.py install --root="$pkgdir/" --optimize=1 + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +# vim:set ts=2 sw=2 et: diff --git a/python-py-cpuinfo/PKGBUILD b/python-py-cpuinfo/PKGBUILD new file mode 100644 index 000000000..58e466834 --- /dev/null +++ b/python-py-cpuinfo/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Felix Yan + +pkgbase=python-py-cpuinfo +pkgname=('python3-py-cpuinfo' 'python2-py-cpuinfo') +pkgver=3.3.0 +_commit=894ff3fdbf67953b089e93597b0c361e50968170 +pkgrel=1 +arch=('any') +pkgdesc='Get CPU info with pure Python 2 & 3' +url='https://github.com/workhorsy/py-cpuinfo' +license=('MIT') +makedepends=('python3-setuptools' 'python2-setuptools') +checkdepends=('python3-pytest-runner' 'python2-pytest-runner') +source=("$pkgbase-$_commit.tar.gz::https://github.com/workhorsy/py-cpuinfo/archive/$_commit.tar.gz") +sha512sums=('b26ba68b1eb28e71c131b979672deeede95de9a8986aa8dc448002a7d0b2baa05264974102f01d258c0201d507c3bd7a3c683ef64add5271751808cf86b83bf3') + +prepare() { + mv py-cpuinfo-{$_commit,$pkgver} + cp -a py-cpuinfo-$pkgver{,-py2} +} + +build() { + cd "$srcdir"/py-cpuinfo-$pkgver + python3 setup.py build + + cd "$srcdir"/py-cpuinfo-$pkgver-py2 + python2 setup.py build +} + +check() { + cd "$srcdir"/py-cpuinfo-$pkgver + python3 setup.py pytest + + cd "$srcdir"/py-cpuinfo-$pkgver-py2 + python2 setup.py pytest +} + +package_python3-py-cpuinfo() { + depends=('python3') + + cd py-cpuinfo-$pkgver + python3 setup.py install --root "$pkgdir" --optimize=1 + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +package_python2-py-cpuinfo() { + depends=('python2') + + cd py-cpuinfo-$pkgver-py2 + python2 setup.py install --root "$pkgdir" --optimize=1 + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + + mv "$pkgdir"/usr/bin/cpuinfo{,2} +} diff --git a/python-pycodestyle/.gitignore b/python-pycodestyle/.gitignore new file mode 100644 index 000000000..282a93fbd --- /dev/null +++ b/python-pycodestyle/.gitignore @@ -0,0 +1 @@ +pycodestyle diff --git a/python-pycodestyle/PKGBUILD b/python-pycodestyle/PKGBUILD new file mode 100644 index 000000000..f11c89a4c --- /dev/null +++ b/python-pycodestyle/PKGBUILD @@ -0,0 +1,59 @@ +# Contributor: Felix Yan +# Contributor: Ismael Carnales +# Contributor: Sergey Mastykov + +pkgbase=python-pycodestyle +pkgname=('python3-pycodestyle' 'python2-pycodestyle') +pkgver=2.3.1 +pkgrel=1 +pkgdesc="Python style guide checker" +arch=('any') +url="https://github.com/PyCQA/pycodestyle" +license=('custom:Expat') +makedepends=('python3-setuptools' 'python2-setuptools' 'git') +source=("git+https://github.com/PyCQA/pycodestyle.git#tag=$pkgver") +sha256sums=('SKIP') + +prepare() { + cp -a pycodestyle{,-py2} + + sed -i '1s/env python$/python2/' pycodestyle-py2/pycodestyle.py + sed -i '1s/env python$/python3/' pycodestyle/pycodestyle.py +} + +build() { + cd "$srcdir"/pycodestyle + python3 setup.py build + + cd "$srcdir"/pycodestyle-py2 + python2 setup.py build +} + +check() { + cd "$srcdir"/pycodestyle + python3 setup.py test + + cd "$srcdir"/pycodestyle-py2 + python2 setup.py test +} + +package_python3-pycodestyle() { + depends=('python3-setuptools') + + cd pycodestyle + python3 setup.py install -O1 --prefix=/usr --root="$pkgdir/" + + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +package_python2-pycodestyle() { + depends=('python2-setuptools') + + cd pycodestyle-py2 + python2 setup.py install -O1 --prefix=/usr --root="$pkgdir/" + mv "$pkgdir"/usr/bin/pycodestyle{,2} + + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +# vim:set ts=2 sw=2 et: diff --git a/python-pycontracts/PKGBUILD b/python-pycontracts/PKGBUILD new file mode 100644 index 000000000..f53f4cc40 --- /dev/null +++ b/python-pycontracts/PKGBUILD @@ -0,0 +1,51 @@ +# $Id: PKGBUILD 140810 2015-09-19 13:17:30Z fyan $ +# Maintainer: Felix Yan + +pkgbase=python-pycontracts +pkgname=(python3-pycontracts python2-pycontracts) +pkgver=1.8.2 +pkgrel=1 +pkgdesc='Declare constraints on function parameters and return values' +arch=('any') +url="https://andreacensi.github.io/contracts" +license=('GPL') +makedepends=('python3-setuptools' 'python2-setuptools' 'python3-pyparsing' 'python2-pyparsing' + 'python3-decorator' 'python2-decorator' 'python3-six' 'python2-six') +checkdepends=('python3-nose' 'python2-nose') +source=("https://pypi.io/packages/source/P/PyContracts/PyContracts-$pkgver.tar.gz") +sha512sums=('3ab81218fdb487b0f2e80db92de8ace91832a2aaeb8703f0eab2928338d5d7bc71d55f585b942be8d0c1e04d3602f6d754a307aca6d9e758c6d1fe5a361fc18e') + +prepare() { + cp -a PyContracts-$pkgver{,-py2} +} + +build() { + cd "$srcdir"/PyContracts-$pkgver + python3 setup.py build + + cd "$srcdir"/PyContracts-$pkgver-py2 + python2 setup.py build +} + +check() { + cd "$srcdir"/PyContracts-$pkgver + python3 setup.py nosetests + + cd "$srcdir"/PyContracts-$pkgver-py2 + rm -r src/contracts-py3k-test + python2 setup.py nosetests +} + +package_python3-pycontracts() { + depends=('python3-pyparsing' 'python3-decorator' 'python3-six') + + cd PyContracts-$pkgver + python3 setup.py install --root="$pkgdir" --optimize=1 +} + +package_python2-pycontracts() { + depends=('python2-pyparsing' 'python2-decorator' 'python2-six') + + cd PyContracts-$pkgver-py2 + python2 setup.py install --root="$pkgdir" --optimize=1 +} diff --git a/python-pyenchant/PKGBUILD b/python-pyenchant/PKGBUILD new file mode 100644 index 000000000..dc1d7b780 --- /dev/null +++ b/python-pyenchant/PKGBUILD @@ -0,0 +1,53 @@ +# Contributor: Pierre Buard +# Contributor: Allan McRae +# Contributor: Sebastien Piccand +# Contributor: Daniel J Griffiths +# Maintainer: Jelle van der Waa + +pkgname=('python3-pyenchant' 'python2-pyenchant') +pkgver=2.0.0 +pkgrel=2 +arch=('any') +url="https://pypi.python.org/pypi/pyenchant" +license=('LGPL') +makedepends=('python2-setuptools' 'python3-setuptools' 'enchant') +source=("https://github.com/rfk/pyenchant/archive/v${pkgver}.tar.gz" + "enchant-2.patch") +md5sums=('e969ea446971410a780c3e5aac23978c' + '5db60f4ad048772599f4e496b9f93385') + +prepare() { + cd ${srcdir}/pyenchant-${pkgver} + + patch -Np1 -i "${srcdir}/enchant-2.patch" +} + +build() { + cp -r pyenchant-${pkgver} pyenchant2-${pkgver} + + cd ${srcdir}/pyenchant-${pkgver} + + python3 setup.py build + + cd ${srcdir}/pyenchant2-${pkgver} + + python2 setup.py build +} + +package_python3-pyenchant() { + pkgdesc="PyEnchant is a spellchecking library for Python3 based on the Enchant library" + depends=('python3' 'enchant') + + cd pyenchant-${pkgver} + + python3 setup.py install --root=${pkgdir} --optimize=1 +} + +package_python2-pyenchant() { + pkgdesc="PyEnchant is a spellchecking library for Python2 based on the Enchant library" + depends=('python2' 'enchant') + + cd pyenchant2-${pkgver} + + python2 setup.py install --root=${pkgdir} --optimize=1 +} diff --git a/python-pyenchant/enchant-2.patch b/python-pyenchant/enchant-2.patch new file mode 100644 index 000000000..eb714921e --- /dev/null +++ b/python-pyenchant/enchant-2.patch @@ -0,0 +1,11 @@ +diff -ur pyenchant2-2.0.0/enchant/_enchant.py pyenchant2-2.0.0_fix/enchant/_enchant.py +--- pyenchant2-2.0.0/enchant/_enchant.py 2018-01-24 21:13:42.680056632 -0700 ++++ pyenchant2-2.0.0_fix/enchant/_enchant.py 2018-01-24 21:14:20.620017925 -0700 +@@ -72,6 +72,7 @@ + yield "libenchant.so" + # See if ctypes can find the library for us, under various names. + yield find_library("enchant") ++ yield find_library("enchant-2") + yield find_library("libenchant") + yield find_library("libenchant-1") + # Special-case handling for enchant installed by macports. diff --git a/python-pyflakes/PKGBUILD b/python-pyflakes/PKGBUILD new file mode 100644 index 000000000..932486f63 --- /dev/null +++ b/python-pyflakes/PKGBUILD @@ -0,0 +1,62 @@ +# Contributor: Felix Yan +# Contributor: Karol 'Kenji Takahashi' Woźniak +# Contributor: Tianjiao Yin +# Contributor: Thomas Dziedzic < gostrc at gmail > +# Contributor: TDY +# Contributor: Tiago Pierezan Camargo + +pkgbase=python-pyflakes +pkgname=(python3-pyflakes python2-pyflakes) +pkgver=1.6.0 +pkgrel=1 +pkgdesc='A lint-like tool for Python to identify common errors quickly without executing code' +arch=('any') +url='http://pypi.python.org/pypi/pyflakes' +license=('MIT') +makedepends=('python3-setuptools' 'python2-setuptools') +source=("https://pypi.io/packages/source/p/pyflakes/pyflakes-$pkgver.tar.gz") +sha512sums=('7e9c2aad6ebed638a1354cef51c7e1f68b25e59f8caf4694997a9afecd7cd8baa629a9363297ac0d961430f007fd22dcae7dae1bcbd7838a3b5d4285063bc7c5') + +prepare() { + cp -a "pyflakes-$pkgver"{,-py2} +} + +build() { + cd "$srcdir"/pyflakes-$pkgver + python3 setup.py build + + cd "$srcdir"/pyflakes-$pkgver-py2 + python2 setup.py build +} + +check() { + cd "$srcdir"/pyflakes-$pkgver + python3 setup.py test + + cd "$srcdir"/pyflakes-$pkgver-py2 + python2 setup.py test +} + +package_python3-pyflakes() { + depends=('python3-setuptools') + + cd pyflakes-$pkgver + python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 + + # We have python 3 as default python, and want to keep compatibility with the old pyflakes3k naming + # ln -s pyflakes "$pkgdir/usr/bin/pyflakes3k" + mv "$pkgdir"/usr/bin/pyflakes{,-python3} + + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +package_python2-pyflakes() { + depends=('python2-setuptools') + + cd pyflakes-$pkgver-py2 + python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 + + # mv "$pkgdir"/usr/bin/pyflakes{,-python2} + + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} diff --git a/python-pytest-benchmark/PKGBUILD b/python-pytest-benchmark/PKGBUILD new file mode 100644 index 000000000..7627ebfa1 --- /dev/null +++ b/python-pytest-benchmark/PKGBUILD @@ -0,0 +1,66 @@ +# Maintainer: Felix Yan + +pkgbase=python-pytest-benchmark +pkgname=('python3-pytest-benchmark' 'python2-pytest-benchmark') +pkgver=3.1.1 +pkgrel=1 +pkgdesc='A py.test fixture for benchmarking code' +arch=('any') +license=('BSD') +url='https://github.com/ionelmc/pytest-benchmark' +makedepends=('python3-pytest' 'python2-pytest' 'python2-statistics' 'python2-pathlib' + 'python3-py-cpuinfo' 'python2-py-cpuinfo') +#TODO I have stopped importing all the test infrastructure here, feel free to continue +#checkdepends=('python3-pytest-cov' 'python2-pytest-cov' 'python3-pygal' 'python2-pygal' +# 'python3-freezegun' 'python2-freezegun' 'mercurial' 'python3-aspectlib' +# 'python2-aspectlib' 'python3-pytest-xdist' 'python2-pytest-xdist' +# 'python3-pytest-runner' 'python2-pytest-runner' 'python3-elasticsearch' +# 'python2-elasticsearch' 'git') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/ionelmc/pytest-benchmark/archive/v$pkgver.tar.gz") +sha512sums=('4a037fc3133b93a5a5ae914c92bc03468812aaa883cfbfeca35877003ebad781ab0dd4fc941eb6d9c7c44d7bf5380585ce04392c77278c54b7b4ebe5911a09f8') + +prepare() { + cp -a pytest-benchmark-$pkgver{,-py2} +} + +build() { + cd "$srcdir"/pytest-benchmark-$pkgver + python3 setup.py build + + cd "$srcdir"/pytest-benchmark-$pkgver-py2 + python2 setup.py build +} + +#check() { +# # Hack entry points by installing it +# # Test should be related to pytest 2.9 +# +# cd "$srcdir"/pytest-benchmark-$pkgver +# python3 setup.py install --root="$PWD/tmp_install" --optimize=1 +# PYTHONPATH="$PWD/tmp_install/usr/lib/python3.6/site-packages:$PYTHONPATH" PATH="$PWD/tmp_install/usr/bin:$PATH" python3 setup.py pytest --addopts=tests || warning "Tests failed" +# +# cd "$srcdir"/pytest-benchmark-$pkgver-py2 +# python2 setup.py install --root="$PWD/tmp_install" --optimize=1 +# PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages:$PYTHONPATH" PATH="$PWD/tmp_install/usr/bin:$PATH" python2 setup.py pytest --addopts=tests || warning "Tests failed" +#} + +package_python3-pytest-benchmark() { + depends=('python3-pytest' 'python3-py-cpuinfo') + + cd "$srcdir"/pytest-benchmark-$pkgver + python3 setup.py install --root="$pkgdir"/ --optimize=1 + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +package_python2-pytest-benchmark() { + depends=('python2-pytest' 'python2-py-cpuinfo' 'python2-statistics' 'python2-pathlib') + + cd "$srcdir"/pytest-benchmark-$pkgver-py2 + python2 setup.py install --root="$pkgdir"/ --optimize=1 + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + + mv "$pkgdir"/usr/bin/pytest-benchmark{,2} + mv "$pkgdir"/usr/bin/py.test-benchmark{,2} +} + +# vim:set ts=2 sw=2 et: diff --git a/python-pytest-cache/.gitignore b/python-pytest-cache/.gitignore new file mode 100644 index 000000000..a33564e42 --- /dev/null +++ b/python-pytest-cache/.gitignore @@ -0,0 +1 @@ +pytest-cache diff --git a/python-pytest-cache/PKGBUILD b/python-pytest-cache/PKGBUILD new file mode 100644 index 000000000..787b94ce6 --- /dev/null +++ b/python-pytest-cache/PKGBUILD @@ -0,0 +1,58 @@ +# Contributor: Felix Yan + +pkgbase=python-pytest-cache +pkgname=('python3-pytest-cache' 'python2-pytest-cache') +_pypiname=pytest-cache +pkgver=1.0 +pkgrel=3 +pkgdesc='pytest plugin with mechanisms for caching across test runs' +arch=('any') +license=('MIT') +url='http://bitbucket.org/hpk42/pytest-cache/' +makedepends=('python3-pytest' 'python2-pytest' 'python3-execnet' 'python2-execnet' 'mercurial') +source=("hg+https://bitbucket.org/hpk42/pytest-cache#tag=$pkgver") +md5sums=('SKIP') + +prepare() { + cp -a "${srcdir}/${_pypiname}"{,-py2} +} + +build() { + cd "$srcdir/$_pypiname" + python3 setup.py build + + cd "$srcdir/$_pypiname-py2" + python2 setup.py build +} + +check() {( + # Hack entry points by installing it + + cd "$srcdir/$_pypiname" + python3 setup.py install --root="$PWD/tmp_install" --optimize=1 + PYTHONPATH="$PWD/tmp_install/usr/lib/python3.6/site-packages:$PYTHONPATH" py.test + + cd "$srcdir/$_pypiname-py2" + python2 setup.py install --root="$PWD/tmp_install" --optimize=1 + PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages:$PYTHONPATH" py.test2 + ) || warning "Tests failed" + # Skipping tests as it's incompatibility with pytest 2.8.0, not python 3.5. + # https://bitbucket.org/hpk42/pytest-cache/issues/11/tests-failed-with-pytest-280 +} + +package_python3-pytest-cache() { + depends=('python3-pytest' 'python3-execnet') + + cd "$srcdir/$_pypiname" + python3 setup.py install --root="$pkgdir"/ --optimize=1 + install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +package_python2-pytest-cache() { + depends=('python2-pytest' 'python2-execnet') + + cd "$srcdir/$_pypiname-py2" + python2 setup.py install --root="$pkgdir"/ --optimize=1 + install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} +# vim:set ts=2 sw=2 et: diff --git a/python-pytest-cov/PKGBUILD b/python-pytest-cov/PKGBUILD new file mode 100644 index 000000000..e969f09d7 --- /dev/null +++ b/python-pytest-cov/PKGBUILD @@ -0,0 +1,59 @@ +# Contributor: Felix Yan +# Contributor: Sebastien LEDUC +# Contributor: Andrey Mikhaylenko + +pkgbase=python-pytest-cov +pkgname=('python3-pytest-cov' 'python2-pytest-cov') +pkgver=2.5.1 +pkgrel=1 +pkgdesc='py.test plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing' +arch=('any') +license=('MIT') +url='https://github.com/schlamar/pytest-cov' +makedepends=('python3-coverage' 'python2-coverage' 'python3-setuptools' 'python2-setuptools' + 'python3-pytest' 'python2-pytest') +checkdepends=('python3-virtualenv' 'python2-virtualenv' 'python3-process-tests' + 'python2-process-tests' 'python3-pytest-cache' 'python2-pytest-cache' + 'python3-pytest-xdist' 'python2-pytest-xdist' + 'python3-fields' 'python2-fields') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/pytest-dev/pytest-cov/archive/v$pkgver.tar.gz") +sha512sums=('4963eba62ae8e7c1a03eb3310c242b6c24c9e711345b3b4c85902a4a1ba74e1c22ebb38dd4c0ddd42d4d8fc12eb22dd3a4d99f392c424bfba0c50b4564bc444f') + +prepare() { + cp -a pytest-cov-$pkgver{,-py2} +} + +build() { + cd "$srcdir"/pytest-cov-$pkgver + python3 setup.py build + + cd "$srcdir"/pytest-cov-$pkgver-py2 + python2 setup.py build +} + +check() { + # Hack entry points by installing it + + cd "$srcdir"/pytest-cov-$pkgver + python3 setup.py install --root="$PWD/tmp_install" --optimize=1 + PYTHONPATH="$PWD/tmp_install/usr/lib/python3.6/site-packages:$PYTHONPATH:$PWD/tests" py.test || warning "Tests failed" + + cd "$srcdir"/pytest-cov-$pkgver-py2 + python2 setup.py install --root="$PWD/tmp_install" --optimize=1 + PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages:$PYTHONPATH:$PWD/tests" py.test2 || warning "Tests failed" +} + +package_python3-pytest-cov() { + depends=('python3-pytest' 'python3-coverage') + + cd pytest-cov-$pkgver + python3 setup.py install --root="$pkgdir" --optimize=1 +} + +package_python2-pytest-cov() { + depends=('python2-pytest' 'python2-coverage') + + cd pytest-cov-$pkgver-py2 + python2 setup.py install --root="$pkgdir" --optimize=1 +} +# vim:set ts=2 sw=2 et: diff --git a/python-tox/PKGBUILD b/python-tox/PKGBUILD index bac8ed282..2c7db0d45 100644 --- a/python-tox/PKGBUILD +++ b/python-tox/PKGBUILD @@ -26,25 +26,25 @@ build() { python2 setup.py build } -#check() { -# # Hack entry points -# -# ( -# cd "$srcdir"/tox-$pkgver -# virtualenv3 "$srcdir/pyvenv" --system-site-packages -# . "$srcdir/pyvenv/bin/activate" -# python setup.py install -# python setup.py pytest -# ) -# -# ( -# cd "$srcdir"/tox-$pkgver-py2 -# virtualenv2 "$srcdir/pyvenv-py2" --system-site-packages -# . "$srcdir/pyvenv-py2/bin/activate" -# python setup.py install -# python setup.py pytest -# ) -#} +check() { + # Hack entry points + + ( + cd "$srcdir"/tox-$pkgver + virtualenv3 "$srcdir/pyvenv" --system-site-packages + . "$srcdir/pyvenv/bin/activate" + python setup.py install + python setup.py pytest + ) + + ( + cd "$srcdir"/tox-$pkgver-py2 + virtualenv2 "$srcdir/pyvenv-py2" --system-site-packages + . "$srcdir/pyvenv-py2/bin/activate" + python setup.py install + python setup.py pytest + ) +} package_python3-tox() { diff --git a/python-unittest-mixins/PKGBUILD b/python-unittest-mixins/PKGBUILD new file mode 100644 index 000000000..727d5e263 --- /dev/null +++ b/python-unittest-mixins/PKGBUILD @@ -0,0 +1,50 @@ +# Contributor: Felix Yan + +pkgbase=python-unittest-mixins +pkgname=('python3-unittest-mixins' 'python2-unittest-mixins') +pkgver=1.4 +pkgrel=1 +pkgdesc='Helpful mixins for unittest classes' +arch=('any') +license=('Apache') +url='https://github.com/nedbat/unittest-mixins' +makedepends=('python3-setuptools' 'python2-setuptools') +checkdepends=('python3-pytest-runner' 'python2-pytest-runner') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/nedbat/unittest-mixins/archive/v$pkgver.tar.gz") +sha512sums=('c6f23c8013f1f19de46c22f73e52d7b88c8646ac4a5b28423bb9c4835b87706cd7f5cef53627a7118cdaa6f58689c5511d7ae8710eb8f4d2a3ceef3f911c1521') + +prepare() { + cp -a unittest-mixins-$pkgver{,-py2} +} + +build() { + cd "$srcdir"/unittest-mixins-$pkgver + python3 setup.py build + + cd "$srcdir"/unittest-mixins-$pkgver-py2 + python2 setup.py build +} + +check() { + cd "$srcdir"/unittest-mixins-$pkgver + python3 setup.py pytest + + cd "$srcdir"/unittest-mixins-$pkgver-py2 + python2 setup.py pytest +} + +package_python3-unittest-mixins() { + depends=('python3-six') + + cd unittest-mixins-$pkgver + python3 setup.py install --root="$pkgdir" --optimize=1 +} + +package_python2-unittest-mixins() { + depends=('python2-six') + + cd unittest-mixins-$pkgver-py2 + python2 setup.py install --root="$pkgdir" --optimize=1 +} + +# vim:set ts=2 sw=2 et: diff --git a/python-wrapt/PKGBUILD b/python-wrapt/PKGBUILD new file mode 100644 index 000000000..7b0b9e356 --- /dev/null +++ b/python-wrapt/PKGBUILD @@ -0,0 +1,52 @@ +# $Id$ +# Maintainer: Felix Yan +# Contributor: Troy C < rstrox -ta yahoo -tod com > + +pkgbase=python-wrapt +pkgname=(python3-wrapt python2-wrapt) +pkgver=1.10.11 +pkgrel=1 +pkgdesc="A Python module for decorators, wrappers and monkey patching" +arch=("x86_64") +url="https://pypi.python.org/pypi/wrapt" +license=("BSD") +makedepends=('python3' 'python2') +checkdepends=('python3-pytest' 'python2-pytest') +source=("$pkgname-$pkgver.tar.gz::https://github.com/GrahamDumpleton/wrapt/archive/$pkgver.tar.gz") +sha512sums=('cc051749341bcd6fc1a950607fad94f74334a00acf0366129470181a5af7a3af32a26e5c5deee9242ee12bcc7e4c47dacb958c514aba8a764be3bcc662845b98') + +prepare() { + cp -a wrapt-$pkgver{,-py2} +} + +build() { + cd "$srcdir"/wrapt-$pkgver + python3 setup.py build + + cd "$srcdir"/wrapt-$pkgver-py2 + python2 setup.py build +} + +check() { + cd "$srcdir"/wrapt-$pkgver + PYTHONPATH="$PWD/build/lib.linux-$CARCH-3.6:$PYTHONPATH" py.test + + cd "$srcdir"/wrapt-$pkgver-py2 + PYTHONPATH="$PWD/build/lib.linux-$CARCH-2.7:$PYTHONPATH" py.test2 +} + +package_python3-wrapt() { + depends=('python3') + + cd wrapt-$pkgver + python3 setup.py install --root="$pkgdir" --optimize=1 + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +package_python2-wrapt() { + depends=('python2') + + cd wrapt-$pkgver-py2 + python2 setup.py install --root="$pkgdir" --optimize=1 + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} diff --git a/python2-backports.functools_lru_cache/PKGBUILD b/python2-backports.functools_lru_cache/PKGBUILD new file mode 100644 index 000000000..9c8bad1c9 --- /dev/null +++ b/python2-backports.functools_lru_cache/PKGBUILD @@ -0,0 +1,33 @@ +# Contributor: Felix Yan +# Contributor: Crass00 + +pkgname=python2-backports.functools_lru_cache +pkgver=1.5 +pkgrel=1 +pkgdesc="Backport of functools.lru_cache from Python 3.3" +arch=('any') +url="https://github.com/jaraco/backports.functools_lru_cache" +license=('MIT') +depends=('python2-backports') +makedepends=('python2-setuptools-scm') +checkdepends=('python2-pytest-runner') +optdepends=('python2-ipaddress: for IPAddress ServerAltnames support') +source=("https://pypi.io/packages/source/b/backports.functools_lru_cache/backports.functools_lru_cache-$pkgver.tar.gz") +sha512sums=('083a69beb050a6de0f838231ceae05cd1825f42310b2cd4f0e53f7ca043af4c699ad7042c32831ee365bb6b374d33189136e45689c77815b99773d145f0ef4f1') + +build() { + cd backports.functools_lru_cache-$pkgver + python2 setup.py build +} + +check() { + cd backports.functools_lru_cache-$pkgver + python2 setup.py pytest +} + +package() { + cd backports.functools_lru_cache-$pkgver + python2 setup.py install --root="$pkgdir" --optimize=1 + + rm "$pkgdir"/usr/lib/python2.7/site-packages/backports/__init__.py* +} diff --git a/python2-backports/PKGBUILD b/python2-backports/PKGBUILD new file mode 100644 index 000000000..57ea660e0 --- /dev/null +++ b/python2-backports/PKGBUILD @@ -0,0 +1,25 @@ +# Contributor: Felix Yan + +pkgname=python2-backports +pkgver=1.0 +pkgrel=1 +pkgdesc="Namespace package required for backports collection" +arch=('any') +url="https://pypi.python.org/pypi/backports" +license=('PSF') +depends=('python2') + +build() { + cd "$srcdir" + cat << EOF > __init__.py +from pkgutil import extend_path +__path__ = extend_path(__path__, __name__) +EOF + python2 -m compileall . +} + +package() { + cd "$srcdir" + install -Dm644 __init__.py "$pkgdir/usr/lib/python2.7/site-packages/backports/__init__.py" + install -Dm644 __init__.pyc "$pkgdir/usr/lib/python2.7/site-packages/backports/__init__.pyc" +} diff --git a/python2-configparser/PKGBUILD b/python2-configparser/PKGBUILD new file mode 100644 index 000000000..5a6186fff --- /dev/null +++ b/python2-configparser/PKGBUILD @@ -0,0 +1,34 @@ +# Contributor: Felix Yan +# Contributor: Andrzej Giniewicz + +pkgname=python2-configparser +pkgver=3.5.0 +pkgrel=1 +pkgdesc="This library brings the updated configparser from Python 3.5 to Python 2.6-3.5." +arch=('any') +url="https://bitbucket.org/ambv/configparser" +license=('MIT') +depends=('python2') +makedepends=('python2-setuptools') +source=("https://pypi.io/packages/source/c/configparser/configparser-${pkgver}.tar.gz" license) +md5sums=('cfdd915a5b7a6c09917a64a573140538' + 'f8e5b03556ed846d7681bacd4126f484') + +prepare() { + sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + $(find "${srcdir}"/configparser-${pkgver} -name '*.py') +} + +build() { + cd "${srcdir}"/configparser-${pkgver} + + python2 setup.py build +} + +package() { + cd "${srcdir}"/configparser-${pkgver} + + python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 + + install -D "${srcdir}"/license "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/python2-configparser/license b/python2-configparser/license new file mode 100644 index 000000000..3e94d17c4 --- /dev/null +++ b/python2-configparser/license @@ -0,0 +1,19 @@ +Copyright (c) 2011 Łukasz Langa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/python2-futures/LICENSE b/python2-futures/LICENSE new file mode 100644 index 000000000..c430db0f1 --- /dev/null +++ b/python2-futures/LICENSE @@ -0,0 +1,21 @@ +Copyright 2009 Brian Quinlan. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY BRIAN QUINLAN "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +HALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/python2-futures/PKGBUILD b/python2-futures/PKGBUILD new file mode 100644 index 000000000..e29153ff9 --- /dev/null +++ b/python2-futures/PKGBUILD @@ -0,0 +1,29 @@ +# Contributor: Balló György +# Contributor: Jaroslav Lichtblau +# Contributor: Allan McRae + +pkgname=python2-futures +_pkgname=futures +pkgver=3.2.0 +pkgrel=1 +pkgdesc="Backport of the concurrent.futures package from Python 3.2" +arch=('any') +url="https://github.com/agronholm/pythonfutures" +license=('BSD') +depends=('python2') +source=("$_pkgname-$pkgver.tar.gz::https://github.com/agronholm/pythonfutures/archive/$pkgver.tar.gz" + LICENSE) +md5sums=('3c950f2ad6682e37cb91ff3e54555e05' + 'dd6708d05936d3f6c4e20ed14c87b5e3') + +build() { + cd "python$_pkgname-$pkgver" + python2 setup.py build +} + +package() { + cd "python$_pkgname-$pkgver" + python2 setup.py install --root "$pkgdir" --optimize=1 + + install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/python2-pathlib/PKGBUILD b/python2-pathlib/PKGBUILD new file mode 100644 index 000000000..ebce7f74a --- /dev/null +++ b/python2-pathlib/PKGBUILD @@ -0,0 +1,20 @@ +# Contributor: Felix Yan +# Contributor: vae77 + +pkgname=python2-pathlib +pkgver=1.0.1 +pkgrel=3 +pkgdesc="This module offers a set of classes featuring all the common operations on paths in an easy, object-oriented way" +arch=('any') +url="https://pathlib.readthedocs.org/en/${pkgver}/" +license=('MIT') +depends=('python2') +makedepends=('python2-setuptools') +source=("https://files.pythonhosted.org/packages/source/p/pathlib/pathlib-${pkgver}.tar.gz") +md5sums=('5099ed48be9b1ee29b31c82819240537') + +package() { + cd "$srcdir/pathlib-$pkgver" + python2 setup.py install --root="$pkgdir/" --optimize=1 + install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" +} diff --git a/python2-singledispatch/PKGBUILD b/python2-singledispatch/PKGBUILD new file mode 100644 index 000000000..4d931ef36 --- /dev/null +++ b/python2-singledispatch/PKGBUILD @@ -0,0 +1,36 @@ +# Contributor: Andrzej Giniewicz + +pkgname=python2-singledispatch +pkgver=3.4.0.3 +pkgrel=2 +pkgdesc="Implementation of functools.singledispatch from Python 3.4" +arch=('any') +url="https://bitbucket.org/ambv/singledispatch" +license=('MIT') +depends=('python2' 'python2-six') +makedepends=('python2-setuptools') +source=("https://pypi.python.org/packages/source/s/singledispatch/singledispatch-$pkgver.tar.gz" license) +md5sums=('af2fc6a3d6cc5a02d0bf54d909785fcb' + '360faaffcf297a20e20e2289af00ce07') + +prepare() { + cd "${srcdir}"/singledispatch-$pkgver + + sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + $(find "${srcdir}" -name '*.py') +} + +build() { + cd "${srcdir}"/singledispatch-$pkgver + + python2 setup.py build +} + +package() { + cd "${srcdir}"/singledispatch-$pkgver + + python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 + + install -D "${srcdir}"/license "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + diff --git a/python2-singledispatch/license b/python2-singledispatch/license new file mode 100644 index 000000000..4ebb526b9 --- /dev/null +++ b/python2-singledispatch/license @@ -0,0 +1,19 @@ +Copyright (c) 2013 Łukasz Langa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/python2-statistics/PKGBUILD b/python2-statistics/PKGBUILD new file mode 100644 index 000000000..8d1bfa969 --- /dev/null +++ b/python2-statistics/PKGBUILD @@ -0,0 +1,23 @@ +# Maintainer: Felix Yan + +pkgname=python2-statistics +pkgver=1.0.3.5 +pkgrel=1 +pkgdesc='A Python 2.* port of 3.4 Statistics Module' +arch=('any') +url='https://pypi.python.org/pypi/statistics' +license=('PSF') +depends=('python2-docutils') +makedepends=('python2-setuptools') +source=("https://pypi.python.org/packages/source/s/${pkgname#*-}/${pkgname#*-}-${pkgver}.tar.gz") +sha256sums=('2dc379b80b07bf2ddd5488cad06b2b9531da4dd31edb04dc9ec0dc226486c138') + +package() { + cd ${pkgname#*-}-${pkgver} + + python2 setup.py install --root="${pkgdir}" --optimize='1' + + install -dm 755 "${pkgdir}"/usr/share/licenses/${pkgname} +} + +# vim: ts=2 sw=2 et: diff --git a/python3.order b/python3.order index dfab7d5ad..e1072b548 100644 --- a/python3.order +++ b/python3.order @@ -6,6 +6,7 @@ python-pbr python-mock +python-py python-pytest python-numpy @@ -36,8 +37,6 @@ python-ptyprocess python-cffi python-magic -# python-py fail tests -python-py python-simplejson python-mistune @@ -95,3 +94,34 @@ python-utils python-progressbar python-toposort chaser + +python-fields +python-pytest-capturelog +python-pytest-cache +python-process-tests +python-pytest-cov +python-py-cpuinfo +python2-statistics +python2-pathlib +python-pytest-benchmark +python-lazy-object-proxy +python2-singledispatch +python-wrapt +python2-backports +python2-backports.functools_lru_cache +python-astroid + +python2-futures +python-isort +python-mccabe +python2-configparser +mpdecimal +pylint + +python-pycontracts +python-pyenchant +python-unittest-mixins +python-genty +python-flaky +python-coverage +python-hypothesis