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 | 150 | ||||
-rw-r--r-- | dev-python/pymysql/pymysql-1.0.3.ebuild | 2 |
3 files changed, 2 insertions, 154 deletions
diff --git a/dev-python/pymysql/Manifest b/dev-python/pymysql/Manifest index f0bf1ea04d4f..882bfc67cafb 100644 --- a/dev-python/pymysql/Manifest +++ b/dev-python/pymysql/Manifest @@ -1,5 +1,3 @@ DIST PyMySQL-1.0.3.gh.tar.gz 85371 BLAKE2B 4caaf486413b0fd78acc04c6856b044048c5af28e2b8f85125dda83738daeb31f621726babd8ce724b01fc3f297769f09c2c77b60540cb5c66d152c61fd725e8 SHA512 46d56399b02e61b4b31af82f96cfbb6c24e0c18f780c872bde53a818ad74d30dfe8ded1fdac97971433b0e237e1007631a9c0e38ef2cb17b6601c77f624faf8b -DIST pymysql-1.0.2.gh.tar.gz 84985 BLAKE2B f2b740827cfa9a4a9cdfe9d711e78d61c2cac2afbc2f15ecc3e317a7fff7771d3d79b8d963e085f011123029341edd469514d84be8cdc5e9aa143cd0fa2caae5 SHA512 c98633c465705154c0607f4508e4d19986fafb647eac01832f8e3fb0175565958289518f9632897ffba924406fce00881a351dbae05c7d68a55eec2b86a55638 -EBUILD pymysql-1.0.2-r1.ebuild 4241 BLAKE2B b3d2beff0518ab648d58fff3ed60631438ddeb64dbb210708a0a430ac4fc72bd9e6e7c85a95df5ff725bcf301d29b032b45a8af3ee3d069366dd0e1838c853ae SHA512 8bade6df51c142b60a712dca1d569ae5dd392e2ded65501ae69157c0c44032ecd4566ba687e97dea61c049a04922f1718cda0291e843255439dde6130ddb6428 -EBUILD pymysql-1.0.3.ebuild 2894 BLAKE2B da9080e328222b4ada32be2257ef13c06dbd6655a0cbad6da1a9adf96f8ee1f4b05210c514443ad840286c9de7e4c227b2c96a5c47674b39d70c5207778e8045 SHA512 e0270c55fb62d53898ff2a643791b996baef4951af2fa36f65a42f7952f949c01541ebbeb1312f88701c5f5807dbbbfd2fec3c8d3e77dfdadef7097f21befc0a +EBUILD pymysql-1.0.3.ebuild 2888 BLAKE2B 8073410e0b9d61a14b253fee66e81728a2b61241a28e52fe30b33c01f11e77d3e7f2f5df5abfbe594e86ead0cd7fc83fffce1da47a7e084a752e81622de8a659 SHA512 3650cb077d587723a059f477d83756324eae0763ae05928f718cfcd6bc9cbd43c010e8f01b6d56845449fbbeecc228345d6230b73247f376ad0f1cfb06aed721 MISC metadata.xml 494 BLAKE2B b6e0ceebdd751d98a5bb60a107c94e8e0908559d8894dcfd06974f7910eb4ba13c5c3e1b9f92314b2cb030e51d4fb73dbc987102eee0d8263abf1f3588ecca46 SHA512 ac51ba234d09a327fc9a9e5b5ab826aeb51011597cdbe572411dab53b14a1e44cdf7429f0d2420810730ddd4921ee25c300d8239eb6c9f9aea391901c2252e29 diff --git a/dev-python/pymysql/pymysql-1.0.2-r1.ebuild b/dev-python/pymysql/pymysql-1.0.2-r1.ebuild deleted file mode 100644 index 7ec157a702d9..000000000000 --- a/dev-python/pymysql/pymysql-1.0.2-r1.ebuild +++ /dev/null @@ -1,150 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{9..11} pypy3 ) -DISTUTILS_USE_PEP517=setuptools -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}.gh.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}" -} diff --git a/dev-python/pymysql/pymysql-1.0.3.ebuild b/dev-python/pymysql/pymysql-1.0.3.ebuild index 2c99a7b07ddf..cd202b247cfb 100644 --- a/dev-python/pymysql/pymysql-1.0.3.ebuild +++ b/dev-python/pymysql/pymysql-1.0.3.ebuild @@ -22,7 +22,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=" |