Large License Cleanup & Prepare for Python 3.7 Migration #8

Merged
onkelbeh merged 16 commits from python37dev into master 2019-11-01 20:33:54 +01:00
63 changed files with 2388 additions and 2 deletions
Showing only changes of commit 09530e53f7 - Show all commits

View File

@ -0,0 +1,36 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
MY_PV="0.4a1"
DESCRIPTION="The Python CoAP library"
HOMEPAGE="https://github.com/chrysn/aiocoap"
SRC_URI="https://github.com/chrysn/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="
${PYTHON_DEPS}
"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
${RDEPEND}
"
DOCS="README.rst"
S="${WORKDIR}/${PN}-${MY_PV}"
src_prepare() {
rm -rf tests # FIXME
eapply "${FILESDIR}/aiocoap-0.4a1-no-umlaut.patch"
eapply_user
}

View File

@ -0,0 +1,36 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Attributes without boilerplate"
HOMEPAGE="
https://github.com/hynek/attrs
https://attrs.readthedocs.org/
https://pypi.org/project/attrs/"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
IUSE="test"
RDEPEND="
dev-python/zope-interface[${PYTHON_USEDEP}]"
DEPEND="
${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
$(python_gen_impl_dep sqlite)
>=dev-python/hypothesis-3.6.0[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
)"
python_test() {
py.test -v || die "tests failed with ${EPYTHON}"
}

View File

@ -0,0 +1,33 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Modern password hashing for software and servers"
HOMEPAGE="https://github.com/pyca/bcrypt/ https://pypi.org/project/bcrypt/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
SLOT="0"
LICENSE="Apache-2.0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris"
IUSE="test"
COMMON_DEPEND="
$(python_gen_cond_dep '>=dev-python/cffi-1.1:=[${PYTHON_USEDEP}]' 'python*')
$(python_gen_cond_dep '>=virtual/pypy-2.6.0' pypy )
>=dev-python/six-1.4.1[${PYTHON_USEDEP}]
"
DEPEND="${COMMON_DEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
test? ( >=dev-python/pytest-3.2.1[${PYTHON_USEDEP}] )
"
RDEPEND="${COMMON_DEPEND}
!dev-python/py-bcrypt"
python_test() {
esetup.py test
}

View File

@ -1,7 +1,8 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1 vcs-snapshot

View File

@ -0,0 +1,59 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Low-level, data-driven core of boto 3."
HOMEPAGE="https://github.com/boto/botocore"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="doc test"
if [[ "${PV}" == "9999" ]]; then
EGIT_REPO_URI="https://github.com/boto/botocore"
inherit git-r3
else
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux"
fi
RDEPEND="
dev-python/docutils[${PYTHON_USEDEP}]
dev-python/jmespath[${PYTHON_USEDEP}]
dev-python/python-dateutil[${PYTHON_USEDEP}]
dev-python/urllib3[${PYTHON_USEDEP}]
"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
doc? (
dev-python/guzzle_sphinx_theme[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
)
test? (
${RDEPEND}
dev-python/mock[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}]
dev-python/jsonschema[${PYTHON_USEDEP}]
)
"
PATCHES=( "${FILESDIR}/1.8.6-tests-pass-all-env-vars-to-cmd-runner.patch" )
python_compile_all() {
use doc && emake -C docs html
}
python_test() {
PYTHONPATH="${BUILD_DIR}/lib" nosetests -v tests/unit || die "unit tests failed under ${EPYTHON}"
PYTHONPATH="${BUILD_DIR}/lib" nosetests -v tests/functional || die "functional tests failed under ${EPYTHON}"
}
python_install_all() {
use doc && local HTML_DOCS=( docs/build/html/. )
distutils-r1_python_install_all
}

View File

@ -0,0 +1,32 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Cloud Storage Disk Usage Analyzer"
HOMEPAGE="https://github.com/ilogik/cdu"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="test"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/mock[${PYTHON_USEDEP}]
dev-python/ipaddress[${PYTHON_USEDEP}]
)
"
# Many tests fail, even on a regular tox run on a upstream clone
RESTRICT="test"
python_test() {
${PYTHON} psutil/tests/__main__.py || die
}

View File

@ -0,0 +1,43 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1 prefix readme.gentoo-r1
DESCRIPTION="Python package for providing Mozilla's CA Bundle"
HOMEPAGE="http://certifi.io/ https://pypi.org/project/certifi"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MPL-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE=""
# Do not drop this patch -- this will affect system's security
PATCHES=( "${FILESDIR}"/$P-use-system-cacerts.patch )
RDEPEND="app-misc/ca-certificates"
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
python_prepare_all() {
distutils-r1_python_prepare_all
eprefixify certifi/core.py
}
python_install_all() {
distutils-r1_python_install_all
local DOC_CONTENTS="
In Gentoo, we don't use certifi's bundled CA certificates.
Instead we remove bundled cacert.pem and patch certifi
to return system's CA certificates.
"
readme.gentoo_create_doc
# Precaution -- nothing should use bundled CA certificates
find "${D}" -name 'cacert.pem' -delete || die "Failed to delete bundled CA certificates"
}

View File

@ -0,0 +1,54 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
# DO NOT ADD pypy to PYTHON_COMPAT
# pypy bundles a modified version of cffi. Use python_gen_cond_dep instead.
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1 toolchain-funcs
DESCRIPTION="Foreign Function Interface for Python calling C code"
HOMEPAGE="https://cffi.readthedocs.io/ https://pypi.org/project/cffi/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0/${PV}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc test"
RDEPEND="
virtual/libffi:=
dev-python/pycparser[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}
virtual/pkgconfig
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
# Avoid race on _configtest.c (distutils/command/config.py:_gen_temp_sourcefile)
DISTUTILS_IN_SOURCE_BUILD=1
src_configure() {
tc-export PKG_CONFIG
}
python_compile_all() {
use doc && emake -C doc html
}
python_test() {
einfo "$PYTHONPATH"
$PYTHON -c "import _cffi_backend as backend" || die
PYTHONPATH="${PYTHONPATH}" \
py.test -x -v \
--ignore testing/test_zintegration.py \
--ignore testing/embedding \
c/ testing/ \
|| die "Testing failed with ${EPYTHON}"
}
python_install_all() {
use doc && local HTML_DOCS=( doc/build/html/. )
distutils-r1_python_install_all
}

View File

@ -0,0 +1,27 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Log formatting with colors"
HOMEPAGE="https://github.com/borntyping/python-colorlog"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
RDEPEND=""
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? ( dev-python/pytest[${PYTHON_USEDEP}] )
"
python_test() {
py.test -vv -p no:logging || die
}

View File

@ -0,0 +1,35 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="A powerful declarative parser for binary data"
HOMEPAGE="https://construct.readthedocs.io/ https://pypi.org/project/construct/"
SRC_URI="https://github.com/construct/construct/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
RESTRICT="test"
DEPEND="test? (
dev-python/numpy[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
$(python_gen_cond_dep 'dev-python/scimath[${PYTHON_USEDEP}]' 'python2_7')
)"
python_test() {
pytest -vv || die "Tests failed under ${EPYTHON}"
}
pkg_postinst() {
ewarn "Version 2.9.x has significant API and implementation changes from"
ewarn "previous 2.8.x releases. Please read the documentation at"
ewarn "https://construct.readthedocs.io/en/latest/transition29.html"
ewarn "for more info."
}

View File

@ -0,0 +1,44 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
PYTHON_COMPAT=( python3_{6,7} )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
DESCRIPTION="Code coverage measurement for Python"
HOMEPAGE="https://coverage.readthedocs.io/en/latest/ https://pypi.org/project/coverage/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="test"
RDEPEND=""
DEPEND="
>=dev-python/setuptools-18.4[${PYTHON_USEDEP}]
test? (
dev-python/PyContracts[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}]
)
"
python_compile() {
if [[ ${EPYTHON} == python2.7 ]]; then
local CFLAGS="${CFLAGS} -fno-strict-aliasing"
export CFLAGS
fi
distutils-r1_python_compile
}
python_test() {
cd "${BUILD_DIR}"/lib || die
[[ "${PYTHON}" =~ pypy ]] && export COVERAGE_NO_EXTENSION=no
${PYTHON} "${S}"/igor.py test_with_tracer py || die
${PYTHON} "${S}"/igor.py test_with_tracer c || die
}

View File

@ -0,0 +1,65 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1 flag-o-matic
DESCRIPTION="Library providing cryptographic recipes and primitives"
HOMEPAGE="https://github.com/pyca/cryptography/ https://pypi.org/project/cryptography/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="|| ( Apache-2.0 BSD )"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="idna libressl test"
# the openssl 1.0.2l-r1 needs to be updated again :(
# It'd theb be able to go into the || section again
#=dev-libs/openssl-1.0.2l-r1:0
# the following is the original section, disallowing bindist entirely
#!libressl? ( >=dev-libs/openssl-1.0.2:0=[-bindist(-)] )
RDEPEND="
!libressl? (
dev-libs/openssl:0= (
|| (
dev-libs/openssl:0[-bindist(-)]
>=dev-libs/openssl-1.0.2o-r6:0
)
)
)
idna? ( >=dev-python/idna-2.1[${PYTHON_USEDEP}] )
libressl? ( dev-libs/libressl:0= )
>=dev-python/asn1crypto-0.21.0[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}]
>=dev-python/six-1.4.1[${PYTHON_USEDEP}]
virtual/python-enum34[${PYTHON_USEDEP}]
virtual/python-ipaddress[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}
>=dev-python/setuptools-1.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep '>=dev-python/cffi-1.8:=[${PYTHON_USEDEP}]' 'python*')
$(python_gen_cond_dep '!~dev-python/cffi-1.11.3[${PYTHON_USEDEP}]' 'python*')
test? (
~dev-python/cryptography-vectors-${PV}[${PYTHON_USEDEP}]
dev-python/pretend[${PYTHON_USEDEP}]
dev-python/iso8601[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
>=dev-python/hypothesis-1.11.4[${PYTHON_USEDEP}]
!~dev-python/hypothesis-3.79.2[${PYTHON_USEDEP}]
dev-python/pyasn1-modules[${PYTHON_USEDEP}]
>=dev-python/pytest-2.9.0[${PYTHON_USEDEP}]
)"
DOCS=( AUTHORS.rst CONTRIBUTING.rst README.rst )
python_configure_all() {
append-cflags $(test-flags-CC -pthread)
}
python_test() {
py.test -v -v -x || die "Tests fail with ${EPYTHON}"
}

View File

@ -0,0 +1,28 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Implementations of a fast Elliptic-curve Diffie-Hellman primitive"
HOMEPAGE="https://github.com/agl/curve25519-donna"
SRC_URI="https://github.com/agl/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
RESTRICT="mirror"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="
${PYTHON_DEPS}
"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
${RDEPEND}
"
DOCS="README"

View File

@ -0,0 +1,29 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
PYTHON_COMPAT=( python3_{6,7} )
PYTHON_REQ_USE="xml(+)"
inherit distutils-r1
DESCRIPTION="XML bomb protection for Python stdlib modules, an xml serialiser"
HOMEPAGE="https://bitbucket.org/tiran/defusedxml https://pypi.org/project/defusedxml/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~amd64-linux"
IUSE="examples"
LICENSE="PSF-2"
SLOT="0"
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
python_test() {
esetup.py test
}
python_install_all() {
use examples && local EXAMPLES=( other/. )
distutils-r1_python_install_all
}

View File

@ -0,0 +1,25 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Reliable machine-readable Linux distribution information for Python"
HOMEPAGE="https://distro.readthedocs.io/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
SLOT="0"
LICENSE="Apache-2.0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="test"
DEPEND="test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
RESTRICT="test" # incomplete test resources
python_test() {
py.test || die
}

View File

@ -0,0 +1,30 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Python bindings to the Ed25519 public-key signature system"
HOMEPAGE="https://github.com/warner/python-ed25519"
SRC_URI="https://github.com/warner/python-${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
RESTRICT="mirror"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="
${PYTHON_DEPS}
"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
${RDEPEND}
"
DOCS="README.md"
S="${WORKDIR}/python-${PN}-${PV}"

View File

@ -0,0 +1,51 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="A wrapper around PyFlakes, pep8 & mccabe"
HOMEPAGE="https://gitlab.com/pycqa/flake8 https://pypi.org/project/flake8/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="test"
# requires.txt inc. mccabe however that creates a circular dep
RDEPEND="
>=dev-python/pyflakes-2.0.0[${PYTHON_USEDEP}]
<dev-python/pyflakes-2.1.0[${PYTHON_USEDEP}]
>=dev-python/pycodestyle-2.4.0[${PYTHON_USEDEP}]
<dev-python/pycodestyle-2.5.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' 'python2*' 'pypy*' )
$(python_gen_cond_dep 'dev-python/configparser[${PYTHON_USEDEP}]' 'python2*' pypy )
"
PDEPEND="
>=dev-python/mccabe-0.6.0[${PYTHON_USEDEP}]
<dev-python/mccabe-0.7.0[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
${PDEPEND}
dev-python/pytest[${PYTHON_USEDEP}]
>=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
)
"
python_prepare_all() {
# Flake8 falsely assumes it needs pytest-runner unconditionally and will
# try to install it, causing sandbox violations.
sed -i -e "/setup_requires=\['pytest-runner'\],/d" setup.py || die
distutils-r1_python_prepare_all
}
python_test() {
py.test -v || die "Tests fail with ${EPYTHON}"
}

View File

@ -0,0 +1,27 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Easy, clean, reliable Python 2/3 compatibility"
HOMEPAGE="https://python-future.org/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
IUSE="test"
DEPEND="
test? (
dev-python/pytest[${PYTHON_USEDEP}]
)
"
python_test() {
py.test -v || die "Tests failed under ${EPYTHON}"
}

View File

@ -0,0 +1,32 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Calculates a token to run the Google Translate text to speech"
HOMEPAGE="https://github.com/boudewijn26/gTTS-token"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="test"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/mock[${PYTHON_USEDEP}]
dev-python/ipaddress[${PYTHON_USEDEP}]
)
"
# Many tests fail, even on a regular tox run on a upstream clone
RESTRICT="test"
python_test() {
${PYTHON} psutil/tests/__main__.py || die
}

View File

@ -0,0 +1,66 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="A Geocoding Toolbox for Python"
HOMEPAGE="https://www.geopy.org/ https://github.com/geopy/geopy"
SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
IUSE="test doc timezone yahoo"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 x86"
RDEPEND="yahoo? ( >=dev-python/requests-oauthlib-0.4.0[${PYTHON_USEDEP}]
dev-python/placefinder[${PYTHON_USEDEP}] )
timezone? ( dev-python/pytz[${PYTHON_USEDEP}] )"
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
test? ( dev-python/mock[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}]
dev-python/nose-cover3[${PYTHON_USEDEP}]
dev-python/pylint[${PYTHON_USEDEP}] )
doc? ( $(python_gen_cond_dep 'dev-python/sphinx[${PYTHON_USEDEP}]' python2_7)
>=dev-python/python-docs-2.7.6-r1:2.7 )"
REQUIRED_USE="test? ( yahoo timezone )"
python_prepare_all() {
if use doc; then
local PYTHON_DOC_ATOM=$(best_version --host-root dev-python/python-docs:2.7)
local PYTHON_DOC_VERSION="${PYTHON_DOC_ATOM#dev-python/python-docs-}"
local PYTHON_DOC="/usr/share/doc/python-docs-${PYTHON_DOC_VERSION}/html"
local PYTHON_DOC_INVENTORY="${PYTHON_DOC}/objects.inv"
sed -i "s|'http://docs.python.org/': None|'${PYTHON_DOC}': '${PYTHON_DOC_INVENTORY}'|" docs/conf.py || die
fi
distutils-r1_python_prepare_all
# prevent install of test folder to avoid file collisions
sed -e "s:find_packages():find_packages(exclude=['test','test.*']):" -i setup.py || die
}
python_test() {
# broken tests
rm test/geocoders/openmapquest.py
sed -i -e 's/from .openmapquest import OpenMapQuestTestCase//' test/geocoders/__init__.py
# Ignore rogue class IGNFranceTestCase demanding elements beyond a normal testsuite
# i.e. "You should provide an api key and a username with a password"
# Cannot decipher how to skip or exclude this "context=IGNFranceTestCase"
# It appears it MAY stem from nose rather than geopy's suite
nosetests --verbose || die "Tests failed under ${EPYTHON}"
}
python_compile_all() {
use doc && emake -C docs html
}
python_install_all() {
use doc && local HTML_DOCS=( docs/_build/html/. )
distutils-r1_python_install_all
}

View File

@ -0,0 +1,26 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Python extension that wraps hiredis"
HOMEPAGE="https://github.com/pietern/hiredis-py"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 arm x86"
IUSE=""
DEPEND=">=dev-libs/hiredis-0.13.1"
RDEPEND="${DEPEND}"
python_compile() {
python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
distutils-r1_python_compile
}

View File

@ -0,0 +1,27 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Enumerates all IP addresses on all network adapters of the system."
HOMEPAGE="https://github.com/pydron/ifaddr"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
IUSE="test"
DEPEND="
test? (
dev-python/pytest[${PYTHON_USEDEP}]
)
"
python_test() {
py.test -v || die "Tests failed under ${EPYTHON}"
}

View File

@ -0,0 +1,27 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="JSON Matching Expressions"
HOMEPAGE="https://github.com/boto/jmespath https://pypi.org/project/jmespath/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 ~arm64 x86 ~amd64-linux ~x86-linux"
IUSE="test"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? ( dev-python/nose[${PYTHON_USEDEP}] )
"
RDEPEND=""
python_test() {
nosetests || die
}

View File

@ -0,0 +1,32 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="An implementation of the JOSE draft"
HOMEPAGE="https://github.com/Demonware/jose"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="test"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/mock[${PYTHON_USEDEP}]
dev-python/ipaddress[${PYTHON_USEDEP}]
)
"
# Many tests fail, even on a regular tox run on a upstream clone
RESTRICT="test"
python_test() {
${PYTHON} psutil/tests/__main__.py || die
}

View File

@ -0,0 +1,25 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="a compact JSON-RPC client library for asyncio"
HOMEPAGE="https://github.com/armills/jsonrpc-async"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
IUSE=""
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND=""
python_test() {
unset PYTHONPATH
nosetests -v || die "Tests failed"
}

View File

@ -0,0 +1,49 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
MY_PN="${PN/_/.}"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="Alternate keyring implementations"
HOMEPAGE="https://github.com/jaraco/keyrings.alt https://pypi.org/project/keyrings.alt/"
SRC_URI="mirror://pypi/${P:0:1}/${MY_PN}/${MY_P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
IUSE="test"
RDEPEND="dev-python/six[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
>=dev-python/setuptools_scm-1.15.0[${PYTHON_USEDEP}]
test? (
>=dev-python/fs-0.5[${PYTHON_USEDEP}]
<dev-python/fs-2[${PYTHON_USEDEP}]
dev-python/gdata[$(python_gen_usedep 'python2*')]
dev-python/keyczar[$(python_gen_usedep 'python2*')]
dev-python/pycrypto[$(python_gen_usedep 'python*')]
>=dev-python/pytest-2.8[${PYTHON_USEDEP}]
)"
S=${WORKDIR}/${MY_P}
# Multiple failures
RESTRICT=test
python_prepare_all() {
sed \
-e "s:find_packages():find_packages(exclude=['tests']):g" \
-i setup.py || die
distutils-r1_python_prepare_all
}
python_test() {
py.test -v -v || die
}

View File

@ -0,0 +1,27 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Pure-python wrapper for libusb-1.0"
HOMEPAGE="https://github.com/vpelletier/python-libusb1"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
IUSE="test"
DEPEND="
test? (
dev-python/pytest[${PYTHON_USEDEP}]
)
"
python_test() {
py.test -v || die "Tests failed under ${EPYTHON}"
}

View File

@ -0,0 +1,35 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Websocket Client Library"
HOMEPAGE="https://github.com/wildfoundry/dataplicity-lomond https://pypi.org/project/lomond/"
SRC_URI="https://github.com/wildfoundry/dataplicity-lomond/archive/v${PV}.tar.gz -> ${P}.tar.gz"
MY_PN="lomond"
MY_P="${MY_PN}-${PV/_beta/b}"
LICENSE=""
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="test"
S="${WORKDIR}/dataplicity-${MY_P}"
RDEPEND=""
DEPEND="${REDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/nose[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
)"
python_test() {
nosetests --verbose || die
py.test -v -v || die
}

View File

@ -0,0 +1,47 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Core utilities for Python packages"
HOMEPAGE="https://github.com/pypa/packaging https://pypi.org/project/packaging/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
SLOT="0"
LICENSE="|| ( Apache-2.0 BSD-2 )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="test"
RDEPEND="
>=dev-python/pyparsing-2.1.10[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
"
DEPEND="
test? (
dev-python/pretend[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
)
"
python_test() {
py.test --capture=no --strict -v || die
}
pkg_preinst() {
# https://bugs.gentoo.org/585146
cd "${HOME}" || die
_cleanup() {
local pyver=$("${PYTHON}" -c "from distutils.sysconfig import get_python_version; print(get_python_version())")
local egginfo="${ROOT%/}$(python_get_sitedir)/${P}-py${pyver}.egg-info"
if [[ -d ${egginfo} ]]; then
echo rm -r "${egginfo}"
rm -r "${egginfo}" || die "Failed to remove egg-info directory"
fi
}
python_foreach_impl _cleanup
}

View File

@ -0,0 +1,38 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="A client class with support for both MQTT v3.1 and v3.1.1"
HOMEPAGE="https://www.eclipse.org/paho/clients/python/"
SRC_URI="https://github.com/eclipse/paho.mqtt.python/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="EPL-1.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="test"
RDEPEND=""
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/mock[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
dev-python/pytest-runner[${PYTHON_USEDEP}]
) "
S="${WORKDIR}/paho.mqtt.python-${PV}"
RESTRICT="test" #659106
src_prepare() {
eapply "${FILESDIR}/${P}-strip-test-dependency.patch"
default
}
python_test() {
esetup.py test
}

View File

@ -0,0 +1,29 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="plugin and hook calling mechanisms for python"
HOMEPAGE="https://pluggy.readthedocs.io/ https://github.com/pytest-dev/pluggy https://pypi.org/project/pluggy/"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="test"
RDEPEND=""
DEPEND="${RDEPEND}
dev-python/setuptools_scm[${PYTHON_USEDEP}]
>=dev-python/importlib_metadata-0.12[${PYTHON_USEDEP}]
test? (
dev-python/pytest[${PYTHON_USEDEP}]
)"
python_test() {
PYTHONPATH="${BUILD_DIR}/lib" pytest -v || die "tests failed with ${EPYTHON}"
}

View File

@ -0,0 +1,50 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Google's Protocol Buffers - Python bindings"
HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> protobuf-${PV}.tar.gz"
LICENSE="BSD"
SLOT="0/17"
KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~sh ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
IUSE=""
DEPEND="${PYTHON_DEPS}
~dev-libs/protobuf-${PV}
dev-python/namespace-google[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]"
RDEPEND="${DEPEND}
!<dev-libs/protobuf-3[python(-)]"
S="${WORKDIR}/protobuf-${PV}/python"
python_prepare_all() {
distutils-r1_python_prepare_all
}
python_configure_all() {
mydistutilsargs=(--cpp_implementation)
}
python_compile() {
python_is_python3 || local -x CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
distutils-r1_python_compile
}
python_test() {
esetup.py test
}
python_install_all() {
distutils-r1_python_install_all
find "${D}" -name "*.pth" -delete || die
}

View File

@ -0,0 +1,32 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Retrieve information on running processes and system utilization"
HOMEPAGE="https://github.com/giampaolo/psutil https://pypi.org/project/psutil/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="test"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/mock[${PYTHON_USEDEP}]
dev-python/ipaddress[${PYTHON_USEDEP}]
)
"
# Many tests fail, even on a regular tox run on a upstream clone
RESTRICT="test"
python_test() {
${PYTHON} psutil/tests/__main__.py || die
}

View File

@ -3,7 +3,7 @@
EAPI=6
PYTHON_COMPAT=(python3_{5,6,7})
PYTHON_COMPAT=( python3_{5,6,7} )
inherit distutils-r1

View File

@ -0,0 +1,28 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python3_{6,7} )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
DESCRIPTION="A self-contained cryptographic library for Python"
HOMEPAGE="https://www.pycryptodome.org https://github.com/Legrandin/pycryptodome https://pypi.org/project/pycryptodome/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD-2 Unlicense"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE=""
RDEPEND="dev-libs/gmp:0
virtual/python-cffi[${PYTHON_USEDEP}]
!dev-python/pycrypto"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]"
python_test() {
esetup.py test
}

View File

@ -0,0 +1,29 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="pure-Python library for analyzing ELF files and DWARF debugging information"
HOMEPAGE="https://pypi.org/project/pyelftools/ https://github.com/eliben/pyelftools"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="public-domain"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
IUSE="examples"
python_test() {
# readelf_tests often fails due to host `readelf` changing output format
local t
for t in all_unittests examples_test ; do
"${PYTHON}" ./test/run_${t}.py || die "Tests fail with ${EPYTHON}"
done
}
python_install_all() {
use examples && dodoc -r examples
distutils-r1_python_install_all
}

View File

@ -0,0 +1,51 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1 eutils
MY_PN="PyJWT"
DESCRIPTION="JSON Web Token implementation in Python"
HOMEPAGE="https://github.com/progrium/pyjwt https://pypi.org/project/PyJWT/"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 x86"
IUSE="test"
RDEPEND=""
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
>=dev-python/cryptography-1.4.0[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
)"
S="${WORKDIR}"/${MY_PN}-${PV}
python_prepare_all() {
find . -name '__pycache__' -prune -exec rm -rf {} \; || die "Cleaning __pycache__ failed"
find . -name '*.pyc' -exec rm -f {} \; || die "Cleaing *.pyc failed"
# enables coverage, we don't need that
rm setup.cfg || die
distutils-r1_python_prepare_all
}
python_test() {
pytest -vv || die "Tests fail with ${EPYTHON}"
}
pkg_postinst() {
elog "Available optional features:"
optfeature "cryptography" dev-python/cryptography
optfeature "flake8" dev-python/flake8
ewarn "flake8 feature requires 'flake8-import-order' and 'pep8-naming', which are not in portage yet"
}

View File

@ -0,0 +1,23 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Python interface to last.fm and other api-compatible websites"
HOMEPAGE="https://github.com/pylast/pylast"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND="dev-python/six[${PYTHON_USEDEP}]"
# As the testing requires a last.fm account and online access it is restricted
RESTRICT="test"

View File

@ -0,0 +1,77 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python3_{6,7} )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1 eutils
DESCRIPTION="Python code static checker"
HOMEPAGE="https://www.logilab.org/project/pylint
https://pypi.org/project/pylint/
https://github.com/pycqa/pylint"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
IUSE="doc examples test"
RDEPEND="
>=dev-python/astroid-1.6.0[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
>=dev-python/isort-4.2.5[${PYTHON_USEDEP}]
dev-python/mccabe[${PYTHON_USEDEP}]
virtual/python-singledispatch[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
dev-python/backports-functools-lru-cache[${PYTHON_USEDEP}]
dev-python/configparser[${PYTHON_USEDEP}]' -2)"
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
test? ( ${RDEPEND}
<dev-python/pytest-3.3[${PYTHON_USEDEP}] )"
python_prepare_all() {
# remove unused dep
sed -i -e '/pytest-runner/d' setup.py || die
# Disable failing tests
# TODO: investigate if it's our fault and how can we fix it
sed -i -e 's/io.StringIO()/\0 if sys.version_info.major > 2 else open(os.devnull, "w")/' \
-e 's/test_libmodule/_&/' \
pylint/test/acceptance/test_stdlib.py || die
sed -i -e 's/^# pylint:.*/\0, import-error/' \
pylint/test/functional/deprecated_module_py36.py || die
sed -i -e 's/^# pylint:.*/\0, wrong-import-order/' \
pylint/test/functional/generated_members.py || die
sed -i -e 's/test_good_comprehension_checks/_&/' \
pylint/test/functional/using_constant_test.py || die
distutils-r1_python_prepare_all
}
python_compile_all() {
# selection of straight html triggers a trivial annoying bug, we skirt it
use doc && PYTHONPATH="${S}" emake -e -C doc singlehtml
}
python_test() {
py.test -v || die "Tests fail with ${EPYTHON}"
}
python_install_all() {
doman man/{pylint,pyreverse}.1
if use examples ; then
docinto examples
dodoc -r examples/.
fi
use doc && local HTML_DOCS=( doc/_build/singlehtml/. )
distutils-r1_python_install_all
}
pkg_postinst() {
# Optional dependency on "tk" USE flag would break support for Jython.
optfeature "pylint-gui script requires dev-lang/python with \"tk\" USE flag enabled." 'dev-lang/python[tk]'
}

View File

@ -0,0 +1,24 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="This library brings support for Yamaha MusicCast devices to Home Assistant"
HOMEPAGE="https://github.com/jalmeroth/pymusiccast"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
IUSE=""
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND=""
python_test() {
unset PYTHONPATH
nosetests -v || die "Tests failed"
}

View File

@ -0,0 +1,29 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
MY_PN=pyRFC3339
MY_P=${MY_PN}-${PV}
DESCRIPTION="Generates and parses RFC 3339 timestamps"
HOMEPAGE="https://github.com/kurtraschke/pyRFC3339"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~ppc64 x86"
IUSE="test"
RDEPEND="dev-python/pytz[${PYTHON_USEDEP}]"
DEPEND="test? ( ${RDEPEND}
dev-python/nose[${PYTHON_USEDEP}] )
dev-python/setuptools[${PYTHON_USEDEP}]"
S=${WORKDIR}/${MY_P}
python_test() {
nosetests || die
}

View File

@ -0,0 +1,24 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="py.test plugin to abort hanging tests"
HOMEPAGE="https://pypi.org/project/pytest-timeout/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
SLOT="0"
LICENSE="MIT"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86 ~amd64-linux ~x86-linux"
IUSE=""
RDEPEND="dev-python/pytest"
DEPEND="${RDEPEND}"
python_test() {
py.test -v || die "tests failed under ${EPYTHON}"
}

View File

@ -0,0 +1,50 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Extensions to the standard Python datetime module"
HOMEPAGE="
https://dateutil.readthedocs.org/
https://pypi.org/project/python-dateutil
https://github.com/dateutil/dateutil/
"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="test"
RDEPEND="
>=dev-python/six-1.5[${PYTHON_USEDEP}]
sys-libs/timezone-data
"
DEPEND="${RDEPEND}
dev-python/setuptools_scm[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/pytest[${PYTHON_USEDEP}]
dev-python/freezegun[${PYTHON_USEDEP}]
dev-python/hypothesis[${PYTHON_USEDEP}]
)
"
python_prepare_all() {
local PATCHES=(
"${FILESDIR}"/0001-zoneinfo-Get-timezone-data-from-system-tzdata.patch
)
# don't install zoneinfo tarball
sed -i '/package_data=/d' setup.py || die
distutils-r1_python_prepare_all
}
python_test() {
py.test -v || die "Tests failed under ${EPYTHON}"
}

View File

@ -0,0 +1,32 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="JOSE implementation in Python using pycryptodome"
HOMEPAGE="https://github.com/capless/python-jose-cryptodome"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="test"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/mock[${PYTHON_USEDEP}]
dev-python/ipaddress[${PYTHON_USEDEP}]
)
"
# Many tests fail, even on a regular tox run on a upstream clone
RESTRICT="test"
python_test() {
${PYTHON} psutil/tests/__main__.py || die
}

View File

@ -0,0 +1,35 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
DESCRIPTION="World timezone definitions for Python"
HOMEPAGE="https://pythonhosted.org/pytz/ https://pypi.org/project/pytz/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
IUSE=""
RDEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
|| ( >=sys-libs/timezone-data-2017a sys-libs/glibc[vanilla] )"
DEPEND="${RDEPEND}
app-arch/unzip"
PATCHES=(
# Use timezone-data zoneinfo.
"${FILESDIR}"/2018.4-zoneinfo.patch
# ...and do not install a copy of it.
"${FILESDIR}"/${PN}-2018.4-zoneinfo-noinstall.patch
)
python_test() {
"${PYTHON}" pytz/tests/test_tzinfo.py -v || die "Tests fail with ${EPYTHON}"
}

View File

@ -0,0 +1,46 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
MY_P="PyYAML-${PV}"
DESCRIPTION="YAML parser and emitter for Python"
HOMEPAGE="https://pyyaml.org/wiki/PyYAML https://pypi.org/project/PyYAML/"
SRC_URI="https://pyyaml.org/download/${PN}/${MY_P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~riscv s390 ~sh sparc x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
IUSE="examples libyaml"
RDEPEND="libyaml? ( dev-libs/libyaml )"
DEPEND="${RDEPEND}
libyaml? ( $(python_gen_cond_dep 'dev-python/cython[${PYTHON_USEDEP}]' python2_7 'python3*') )"
S="${WORKDIR}/${MY_P}"
PATCHES=(
# bug #659348
"${FILESDIR}/${P}-cve-2017-18342.patch"
)
python_configure_all() {
mydistutilsargs=( $(use_with libyaml) )
}
python_test() {
esetup.py test
}
python_install_all() {
distutils-r1_python_install_all
if use examples; then
dodoc -r examples
docompress -x /usr/share/doc/${PF}
fi
}

View File

@ -0,0 +1,45 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1 flag-o-matic
DESCRIPTION="Alternative regular expression module to replace re"
HOMEPAGE="https://bitbucket.org/mrabarnett/mrab-regex"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd"
IUSE="doc"
DOCS=( README docs/UnicodeProperties.txt )
python_compile() {
if ! python_is_python3; then
local CFLAGS=${CFLAGS}
append-cflags -fno-strict-aliasing
fi
distutils-r1_python_compile
}
python_test() {
local msg="tests failed under ${EPYTHON}"
# https://bitbucket.org/mrabarnett/mrab-regex/issue/145/1-fail-in-testsuite-under-pypy
einfo "There is one trivial fail of test test_empty_array under pypy"
if python_is_python3; then
"${PYTHON}" Python3/test_regex.py || die "${msg}"
else
"${PYTHON}" Python2/test_regex.py || die "${msg}"
fi
}
python_install_all() {
use doc && local HTML_DOCS=( docs/Features.html )
distutils-r1_python_install_all
}

View File

@ -0,0 +1,41 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="A utility belt for advanced users of python-requests"
HOMEPAGE="https://toolbelt.readthedocs.org/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~ppc64 x86"
IUSE="test"
RDEPEND="<dev-python/requests-3.0.0[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/betamax[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
)"
DOCS=( AUTHORS.rst HISTORY.rst README.rst )
PATCHES=(
"${FILESDIR}/requests-toolbelt-0.8.0-test-tracebacks.patch"
)
# Known python2.7 test failures do to upstream
# not testing with newer requests versions
# bug: https://bugs.gentoo.org/635824
# https://github.com/requests/toolbelt/issues/213
RESTRICT=test
python_test() {
py.test -v || die "Tests failed with ${EPYTHON}"
}

View File

@ -0,0 +1,56 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
DESCRIPTION="HTTP library for human beings"
HOMEPAGE="https://python-requests.org/"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris"
IUSE="socks5 +ssl"
RDEPEND="
>=dev-python/certifi-2017.4.17[${PYTHON_USEDEP}]
>=dev-python/chardet-3.0.2[${PYTHON_USEDEP}]
<dev-python/chardet-3.1.0[${PYTHON_USEDEP}]
>=dev-python/idna-2.5[${PYTHON_USEDEP}]
<dev-python/idna-2.9[${PYTHON_USEDEP}]
>=dev-python/urllib3-1.21.1[${PYTHON_USEDEP}]
<dev-python/urllib3-1.26[${PYTHON_USEDEP}]
!=dev-python/urllib3-1.25.0[${PYTHON_USEDEP}]
!=dev-python/urllib3-1.25.1[${PYTHON_USEDEP}]
socks5? ( >=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}] )
ssl? (
>=dev-python/cryptography-1.3.4[${PYTHON_USEDEP}]
>=dev-python/pyopenssl-0.14[$(python_gen_usedep 'python*' pypy)]
)
"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
"
# tests connect to various remote sites
RESTRICT="test"
#DEPEND+="
# test? (
# dev-python/pytest[${PYTHON_USEDEP}]
# dev-python/pytest-httpbin[${PYTHON_USEDEP}]
# dev-python/pytest-mock[${PYTHON_USEDEP}]
# dev-python/pytest-xdist[${PYTHON_USEDEP}]
# >=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}]
# )
#"
python_test() {
py.test || die
}

View File

@ -0,0 +1,33 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Pure-Python RSA implementation"
HOMEPAGE="https://stuvel.eu/rsa https://pypi.org/project/rsa/"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
IUSE="test"
RDEPEND="
~dev-python/pyasn1-0.4.5[${PYTHON_USEDEP}]
dev-python/traceback2[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}
>=dev-python/setuptools-0.6.10[${PYTHON_USEDEP}]
test? (
dev-python/nose[${PYTHON_USEDEP}]
dev-python/unittest2[${PYTHON_USEDEP}]
)
"
python_test() {
nosetests --verbose || die
}

View File

@ -0,0 +1,36 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="An Amazon S3 Transfer Manager"
HOMEPAGE="https://github.com/boto/s3transfer"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 ~arm64 x86 ~amd64-linux ~x86-linux"
IUSE="test"
CDEPEND="
dev-python/botocore[${PYTHON_USEDEP}]
$(python_gen_cond_dep 'dev-python/futures[${PYTHON_USEDEP}]' 'python2_7')
"
# Pin mock to 1.3.0 if testing failures due to mock occur.
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
${CDEPEND}
dev-python/mock[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}]
)
"
RDEPEND="${CDEPEND}"
#PATCHES=( "${FILESDIR}/s3transfer-0.1.13-tests.patch" )
python_test() {
nosetests -v tests/unit/ tests/functional/ || die "tests failed under ${EPYTHON}"
}

View File

@ -0,0 +1,38 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
inherit distutils-r1
DESCRIPTION="Python library providing a few tools handling SemVer in Python"
HOMEPAGE="https://pypi.org/project/semantic_version/"
SRC_URI="https://github.com/rbarrois/python-semanticversion/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="doc test"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
test? ( dev-python/pytest[${PYTHON_USEDEP}] )
"
S="${WORKDIR}/python-${P/_/}"
python_compile_all() {
if use doc; then
sphinx-build docs docs/_build/html || die
HTML_DOCS=( docs/_build/html/. )
fi
}
python_test() {
# The django test hangs
py.test --ignore tests/test_django.py\
|| die "tests failed with ${EPYTHON}"
}

View File

@ -0,0 +1,103 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
DESCRIPTION="Python documentation generator"
HOMEPAGE="https://www.sphinx-doc.org/"
SRC_URI="mirror://pypi/S/${PN^}/${P^}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
IUSE="doc latex net test"
# Tests automagically use latex, bug 667414
#REQUIRED_USE="test? ( latex )"
RESTRICT="!test? ( test )"
RDEPEND="
>=dev-python/alabaster-0.7.9[${PYTHON_USEDEP}]
<dev-python/alabaster-0.8[${PYTHON_USEDEP}]
>=dev-python/Babel-2.1.1[${PYTHON_USEDEP}]
>=dev-python/docutils-0.11[${PYTHON_USEDEP}]
dev-python/imagesize[${PYTHON_USEDEP}]
>=dev-python/jinja-2.3[${PYTHON_USEDEP}]
>=dev-python/pygments-2.0.1-r1[${PYTHON_USEDEP}]
>=dev-python/requests-2.0.0[${PYTHON_USEDEP}]
>=dev-python/six-1.5[${PYTHON_USEDEP}]
>=dev-python/snowballstemmer-1.1[${PYTHON_USEDEP}]
>=dev-python/sphinx_rtd_theme-0.1[${PYTHON_USEDEP}]
<dev-python/sphinx_rtd_theme-2.0[${PYTHON_USEDEP}]
dev-python/packaging[${PYTHON_USEDEP}]
dev-python/sphinxcontrib-websupport[${PYTHON_USEDEP}]
virtual/python-typing[${PYTHON_USEDEP}]
latex? (
dev-texlive/texlive-latexextra
dev-texlive/texlive-luatex
app-text/dvipng
)
net? (
>=dev-python/sqlalchemy-0.9[${PYTHON_USEDEP}]
>=dev-python/whoosh-2.0[${PYTHON_USEDEP}]
)"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/sphinxcontrib-websupport[${PYTHON_USEDEP}]
dev-python/html5lib[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
dev-python/simplejson[${PYTHON_USEDEP}]
>=dev-python/sqlalchemy-0.9[${PYTHON_USEDEP}]
>=dev-python/whoosh-2.0[${PYTHON_USEDEP}]
virtual/imagemagick-tools[jpeg,png,svg]
virtual/python-enum34[${PYTHON_USEDEP}]
dev-texlive/texlive-latexextra
dev-texlive/texlive-luatex
app-text/dvipng
)"
S="${WORKDIR}/${P^}"
python_prepare_all() {
# remove tests that fail due to network-sandbox
rm tests/test_websupport.py || die "Failed to remove web tests"
rm tests/test_build_linkcheck.py || die "Failed to remove web tests"
sed -i -e 's:test_latex_remote_images:_&:' tests/test_build_latex.py || die
# fails when additional sphinx themes are installed
sed -i -e 's:test_theme_api:_&:' tests/test_theming.py || die
distutils-r1_python_prepare_all
}
python_compile() {
distutils-r1_python_compile
# Generate the grammar. It will be caught by install somehow.
# Note that the tests usually do it for us. However, I don't want
# to trust USE=test really running all the tests, especially
# with FEATURES=test-fail-continue.
pushd "${BUILD_DIR}"/lib >/dev/null || die
"${EPYTHON}" -m sphinx.pycode.__init__ || die "Grammar generation failed."
popd >/dev/null || die
}
python_compile_all() {
if use doc; then
esetup.py build_sphinx
HTML_DOCS=( "${BUILD_DIR}"/sphinx/html/. )
fi
}
python_test() {
mkdir -p "${BUILD_DIR}/sphinx_tempdir" || die
local -x SPHINX_TEST_TEMPDIR="${BUILD_DIR}/sphinx_tempdir"
py.test -vv || die "Tests fail with ${EPYTHON}"
}

View File

@ -0,0 +1,67 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python3_{6,7} )
PYTHON_REQ_USE="sqlite?"
inherit distutils-r1 eutils flag-o-matic
MY_PN="SQLAlchemy"
MY_P="${MY_PN}-${PV/_beta/b}"
DESCRIPTION="Python SQL toolkit and Object Relational Mapper"
HOMEPAGE="https://www.sqlalchemy.org/ https://pypi.org/project/SQLAlchemy/"
SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
IUSE="doc examples +sqlite test"
REQUIRED_USE="test? ( sqlite )"
RDEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]"
DEPEND="
${RDEPEND}
test? (
<dev-python/pluggy-0.7s[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
$(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7 pypy)
)"
S="${WORKDIR}/${MY_P}"
python_prepare_all() {
# Disable tests hardcoding function call counts specific to Python versions.
rm -r test/aaa_profiling || die
distutils-r1_python_prepare_all
}
python_compile() {
if ! python_is_python3; then
local CFLAGS=${CFLAGS}
append-cflags -fno-strict-aliasing
fi
distutils-r1_python_compile
}
python_test() {
pytest -vv test || die "Testsuite failed under ${EPYTHON}"
}
python_install_all() {
use doc && HTML_DOCS=( doc/. )
use examples && dodoc -r examples
distutils-r1_python_install_all
}
pkg_postinst() {
optfeature "MySQL support" dev-python/mysql-python dev-python/mysql-connector-python
optfeature "mssql support" dev-python/pymssql
optfeature "postgresql support" dev-python/psycopg:2
}

View File

@ -0,0 +1,37 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python3_{5,6,7} )
inherit distutils-r1
DESCRIPTION="Pretty-print tabular data"
HOMEPAGE="https://pypi.org/project/tabulate/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
SLOT="0"
LICENSE="MIT"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-python/wcwidth[${PYTHON_USEDEP}]"
# TODO: optional test-dep on colorclass
DEPEND="
test? (
${RDEPEND}
$(python_gen_impl_dep 'sqlite')
dev-python/colorclass[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}]
dev-python/numpy[${PYTHON_USEDEP}]
dev-python/pandas[${PYTHON_USEDEP}]
virtual/python-funcsigs[${PYTHON_USEDEP}]
)
"
python_test() {
esetup.py test
}

View File

@ -0,0 +1,30 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python{3_{6,7}} )
inherit distutils-r1
DESCRIPTION="Type Hints for Python"
HOMEPAGE="https://docs.python.org/3/library/typing.html https://pypi.org/project/typing/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="PSF-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~x64-solaris"
IUSE=""
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND=""
python_test() {
if [[ ${EPYTHON} == python2* || ${EPYTHON} == pypy ]]; then
cd "${S}"/python2 || die
else
cd "${S}"/src || die
fi
"${PYTHON}" test_typing.py || die "tests failed under ${EPYTHON}"
}

View File

@ -0,0 +1,25 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python{3_{6,7}} )
inherit distutils-r1
DESCRIPTION="tzinfo object for the local timezone"
HOMEPAGE="https://github.com/regebro/tzlocal"
SRC_URI="mirror://pypi/t/${PN}/${P}.tar.gz"
LICENSE="CC0-1.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDPEND="dev-python/pytz[${PYTHON_USEDEP}]"
python_test() {
unset TZ
"${PYTHON}" -m unittest discover || die "Testing failed with ${EPYTHON}"
}

View File

@ -0,0 +1,67 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python{3_{6,7}} )
PYTHON_REQ_USE="ssl(+)"
inherit distutils-r1
DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
HOMEPAGE="https://github.com/shazow/urllib3"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="doc test"
#RESTRICT="test"
RDEPEND="
>=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}]
!~dev-python/PySocks-1.5.7[${PYTHON_USEDEP}]
<dev-python/PySocks-2.0[${PYTHON_USEDEP}]
dev-python/certifi[${PYTHON_USEDEP}]
>=dev-python/cryptography-1.3.4[${PYTHON_USEDEP}]
>=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
>=dev-python/idna-2.0.0[${PYTHON_USEDEP}]
virtual/python-ipaddress[${PYTHON_USEDEP}]
"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
${RDEPEND}
>=www-servers/tornado-4.2.1[$(python_gen_usedep 'python*')]
dev-python/pytest[${PYTHON_USEDEP}]
)
doc? (
dev-python/mock[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
)
"
# Testsuite written requiring mock to be installed under all Cpythons
python_prepare_all() {
# skip appengine tests
rm -r test/appengine || die
distutils-r1_python_prepare_all
}
python_compile_all() {
use doc && emake -C docs SPHINXOPTS= html
}
python_test() {
# FIXME: get tornado ported
if [[ ${EPYTHON} == python* ]]; then
py.test -v || die "Tests fail with ${EPYTHON}"
fi
}
python_install_all() {
use doc && local HTML_DOCS=( docs/_build/html/. )
distutils-r1_python_install_all
}

View File

@ -0,0 +1,27 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python{3_{6,7}} )
inherit distutils-r1
DESCRIPTION="A library to identify devices (phones, tablets) and their capabilities by parsing (browser/HTTP) user agent strings"
HOMEPAGE="https://github.com/selwin/python-user-agents"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="alpha amd64 ~arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 ~sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
IUSE="test"
DEPEND="
test? (
dev-python/pytest[${PYTHON_USEDEP}]
)
"
python_test() {
py.test -v || die "Tests failed under ${EPYTHON}"
}

View File

@ -0,0 +1,25 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python{3_{6,7}} )
inherit distutils-r1
DESCRIPTION="Experiment to convert voluptuous schemas to JSON"
HOMEPAGE="https://github.com/balloob/voluptuous-serialize"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
IUSE=""
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND=">=dev-python/voluptuous-0.11.1[${PYTHON_USEDEP}]"
python_test() {
unset PYTHONPATH
nosetests -v || die "Tests failed"
}

View File

@ -0,0 +1,25 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
PYTHON_COMPAT=( python{3_{6,7}} )
inherit distutils-r1
DESCRIPTION="A Python data validation library."
HOMEPAGE="https://github.com/alecthomas/voluptuous"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
IUSE=""
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND=""
python_test() {
unset PYTHONPATH
nosetests -v || die "Tests failed"
}

View File

@ -0,0 +1,42 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python{3_{6,7}} )
inherit distutils-r1
MY_PN=${PN//-/_}
DESCRIPTION="WebSocket client for python with hybi13 support"
HOMEPAGE="https://github.com/websocket-client/websocket-client"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_PN}-${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="amd64 ~arm64 x86 ~x64-macos"
IUSE="examples test"
RDEPEND="
dev-python/six[${PYTHON_USEDEP}]
$(python_gen_cond_dep 'dev-python/backports-ssl-match-hostname[${PYTHON_USEDEP}]' pypy python2_7 )
"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? ( ${RDEPEND} )
"
S="${WORKDIR}/${MY_PN}-${PV}"
python_test() {
esetup.py test
}
python_install_all() {
if use examples; then
docompress -x "/usr/share/doc/${PF}/examples"
dodoc -r examples
fi
distutils-r1_python_install_all
}

View File

@ -0,0 +1,44 @@
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python{3_{6,7}} )
inherit distutils-r1
DESCRIPTION="Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible)"
HOMEPAGE="https://github.com/jstasiak/python-zeroconf https://pypi.org/project/zeroconf/"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="test"
RDEPEND="
dev-python/netifaces[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
dev-python/ifaddr[${PYTHON_USEDEP}]
virtual/python-enum34[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/nose[${PYTHON_USEDEP}]
)"
# Not included
RESTRICT="test"
python_prepare_all() {
# It's virtual/python-enum34
sed \
-e "s:'enum-compat',::g" \
-i setup.py || die
distutils-r1_python_prepare_all
}
python_test() {
nosetests --verbose || die
}