diff options
Diffstat (limited to 'dev-python/pymysql')
-rw-r--r-- | dev-python/pymysql/Manifest | 4 | ||||
-rw-r--r-- | dev-python/pymysql/pymysql-1.0.2-r1.ebuild | 2 | ||||
-rw-r--r-- | dev-python/pymysql/pymysql-1.0.2.ebuild | 150 |
3 files changed, 2 insertions, 154 deletions
diff --git a/dev-python/pymysql/Manifest b/dev-python/pymysql/Manifest index 6cc0b360688b..2d370ca9f5f7 100644 --- a/dev-python/pymysql/Manifest +++ b/dev-python/pymysql/Manifest @@ -1,5 +1,3 @@ DIST pymysql-1.0.2.gh.tar.gz 84985 BLAKE2B f2b740827cfa9a4a9cdfe9d711e78d61c2cac2afbc2f15ecc3e317a7fff7771d3d79b8d963e085f011123029341edd469514d84be8cdc5e9aa143cd0fa2caae5 SHA512 c98633c465705154c0607f4508e4d19986fafb647eac01832f8e3fb0175565958289518f9632897ffba924406fce00881a351dbae05c7d68a55eec2b86a55638 -DIST pymysql-1.0.2.tar.gz 84985 BLAKE2B f2b740827cfa9a4a9cdfe9d711e78d61c2cac2afbc2f15ecc3e317a7fff7771d3d79b8d963e085f011123029341edd469514d84be8cdc5e9aa143cd0fa2caae5 SHA512 c98633c465705154c0607f4508e4d19986fafb647eac01832f8e3fb0175565958289518f9632897ffba924406fce00881a351dbae05c7d68a55eec2b86a55638 -EBUILD pymysql-1.0.2-r1.ebuild 4247 BLAKE2B 3bb170fa68516b9db414c76583b31cfba1de8d9fac4c5954638fe2d52148d7d150ce4d232a711bc4ee49e89cf2c59b4e12562f66b19a9da0a44b9f80324530ca SHA512 2c176d2dd692bc3deca132c0c2b4978256fa5184d21b839647fbffd60835c6885e5a939f4e686382ef1090076cdd27fcd8169af7f213db266d926ed1551de7b6 -EBUILD pymysql-1.0.2.ebuild 4207 BLAKE2B a87b3bcc18a7ac903ecd79fe6add4412dc3155997a93edaa036d624052422aae2d579a15f7e6a0426c49cc92016ef310b8bb0fe7b7aca885c92d9010bee55125 SHA512 49e27f6608e4110c1080974e4b140e42120bfe7d0b728ab15f78dba7f6a6e8e235619899d19bfc53a1b39fceaab5429a319b4ee2139c4bb2544c9afdb4795c11 +EBUILD pymysql-1.0.2-r1.ebuild 4241 BLAKE2B fe3bce96795e34cfc6ec7e54b3d9ba249f9b9be19ca703c0a7a748dc44488cef8037bd9bd003978b7d9a5645fbdd76989d1bed56d9e615aca487b50a6cdef686 SHA512 7e04e1a8414d266293d9ec0365aa0061b1267f3b531ee6c62b968b3d779ba2aca591d9f4a4b73027e0e95ffb2212ee12a06b928ab6eac1662a8f302183d51edf MISC metadata.xml 494 BLAKE2B b77cafe43ba22f501e74de63e2629860f6d360e21533ce1b02593735f5a5bad5730f58bc05d3dbc94742cd26fda12092f66fb6d98b4a34d1a2ae9bced30c9631 SHA512 a8378d8970dc0fd8af8f9df6ed1e22b30b1c7901bc8f5a73e1180a3871d092b3afc16bdf939f05407533dd009c380f2301952cae93099b2b00d021b0aa8455ec diff --git a/dev-python/pymysql/pymysql-1.0.2-r1.ebuild b/dev-python/pymysql/pymysql-1.0.2-r1.ebuild index dc541b68e6d9..f2fcc3195665 100644 --- a/dev-python/pymysql/pymysql-1.0.2-r1.ebuild +++ b/dev-python/pymysql/pymysql-1.0.2-r1.ebuild @@ -17,7 +17,7 @@ S=${WORKDIR}/${MY_P} LICENSE="MIT" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 ~sparc x86" # TODO: support other mysql variants BDEPEND=" diff --git a/dev-python/pymysql/pymysql-1.0.2.ebuild b/dev-python/pymysql/pymysql-1.0.2.ebuild deleted file mode 100644 index 3b56a5306846..000000000000 --- a/dev-python/pymysql/pymysql-1.0.2.ebuild +++ /dev/null @@ -1,150 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8..10} pypy3 ) - -inherit distutils-r1 - -MY_PN="PyMySQL" -MY_P="${MY_PN}-${PV}" - -DESCRIPTION="Pure-Python MySQL Driver" -HOMEPAGE="https://github.com/PyMySQL/PyMySQL" -SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" -S=${WORKDIR}/${MY_P} - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 ~sparc x86" - -# TODO: support other mysql variants -BDEPEND=" - test? ( - dev-db/mariadb[server] - )" - -distutils_enable_tests pytest - -src_prepare() { - # Auth tests don't support socket auth - find tests/ -name '*_auth.py' -delete || die - - distutils-r1_src_prepare -} - -src_test() { - if [[ -z "${USER}" ]] ; then - # Tests require system user - local -x USER="$(whoami)" - einfo "USER set to '${USER}'" - fi - - local mysql_install_db_cmd="${EPREFIX}/usr/share/mariadb/scripts/mysql_install_db" - [[ ! -x "${mysql_install_db_cmd}" ]] && mysql_install_db_cmd="${EPREFIX}/usr/bin/mysql_install_db" - [[ ! -x "${mysql_install_db_cmd}" ]] && die "mysql_install_db command not found!" - - local mysqld_cmd="${EPREFIX}/usr/sbin/mysqld" - [[ ! -x "${mysqld_cmd}" ]] && die "mysqld command not found!" - - local PIDFILE="${T}/mysqld.pid" - if pkill -0 -F "${PIDFILE}" &>/dev/null ; then - einfo "Killing already running mysqld process ..." - pkill -F "${PIDFILE}" - fi - - if [[ -d "${T}/mysql" ]] ; then - einfo "Removing already existing mysqld data dir ..." - rm -rf "${T}/mysql" || die - fi - - einfo "Creating mysql test instance ..." - mkdir -p "${T}"/mysql || die - "${mysql_install_db_cmd}" \ - --no-defaults \ - --auth-root-authentication-method=normal \ - --basedir="${EPREFIX}/usr" \ - --datadir="${T}"/mysql 1>"${T}"/mysqld_install.log \ - || die - - einfo "Starting mysql test instance ..." - # TODO: random port - "${mysqld_cmd}" \ - --no-defaults \ - --character-set-server=utf8 \ - --bind-address=127.0.0.1 \ - --port=43306 \ - --pid-file="${T}"/mysqld.pid \ - --socket="${T}"/mysqld.sock \ - --datadir="${T}"/mysql 1>"${T}"/mysqld.log 2>&1 & - - # wait for it to start - local i - for (( i = 0; i < 10; i++)); do - [[ -S ${T}/mysqld.sock ]] && break - sleep 1 - done - [[ -S ${T}/mysqld.sock ]] || die "mysqld failed to start" - - einfo "Configuring test mysql instance ..." - - # create test user for auth tests - mysql -uroot --socket="${T}"/mysqld.sock -s -e ' - INSTALL SONAME "auth_ed25519"; - CREATE FUNCTION ed25519_password RETURNS STRING SONAME "auth_ed25519.so"; - ' || die "Failed to set up auth_ed25519" - - mysql -uroot --socket="${T}"/mysqld.sock -s -e " - SELECT CONCAT('CREATE USER nopass_ed25519 IDENTIFIED VIA ed25519 USING \"',ed25519_password(\"\"),'\";'); - SELECT CONCAT('CREATE USER user_ed25519 IDENTIFIED VIA ed25519 USING \"',ed25519_password(\"pass_ed25519\"),'\";'); - " || die "Failed to create ed25519 test users" - - # create test databases - mysql -uroot --socket="${T}"/mysqld.sock -s -e ' - create database test1 DEFAULT CHARACTER SET utf8mb4; - create database test2 DEFAULT CHARACTER SET utf8mb4; - - create user test2 identified by "some password"; - grant all on test2.* to test2; - - create user test2@localhost identified by "some password"; - grant all on test2.* to test2@localhost; - ' || die "Failed to create test databases" - - cat > pymysql/tests/databases.json <<-EOF || die - [{ - "host": "localhost", - "user": "root", - "password": "", - "database": "test1", - "use_unicode": true, - "local_infile": true, - "unix_socket": "${T}/mysqld.sock" - }, { - "host": "localhost", - "user": "root", - "password": "", - "database": "test2", - "unix_socket": "${T}/mysqld.sock" - }] - EOF - - distutils-r1_src_test - - if pkill -0 -F "${PIDFILE}" &>/dev/null ; then - einfo "Stopping mysql test instance ..." - pkill -F "${PIDFILE}" - fi -} - -python_test() { - local excludes=( - # requires some dialog plugin - pymysql/tests/test_connection.py::TestAuthentication::testDialogAuthThreeAttemptsQuestionsInstallPlugin - pymysql/tests/test_connection.py::TestAuthentication::testDialogAuthTwoQuestionsInstallPlugin - ) - - PYTHONPATH=. pytest -vv ${excludes[@]/#/--deselect } || - die "Tests failed with ${EPYTHON}" -} |