diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-11-17 12:56:42 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-11-17 12:56:42 +0000 |
commit | 34fb4543abc1dae6f74171ad8dc80fa64636a941 (patch) | |
tree | 5923cd4dc2a560dba9b618db67713ae10cf92f75 /dev-python/stripe | |
parent | 1536d928ae095e00db8775fecca580c10adc0af8 (diff) |
gentoo auto-resync : 17:11:2022 - 12:56:42
Diffstat (limited to 'dev-python/stripe')
-rw-r--r-- | dev-python/stripe/Manifest | 2 | ||||
-rw-r--r-- | dev-python/stripe/stripe-5.0.0.ebuild | 71 |
2 files changed, 73 insertions, 0 deletions
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest index a48c3762c0e2..e9b82557948f 100644 --- a/dev-python/stripe/Manifest +++ b/dev-python/stripe/Manifest @@ -1,3 +1,5 @@ DIST stripe-4.2.0.tar.gz 267578 BLAKE2B 1cd08aa37a3735928e65fb401d8817694cbfceff05722aa96ae4880da6ccb6e3139dcf55804efe26a4e1c1814a6734eed1b5754c06efaf2003d9c28efbdb8731 SHA512 8a2660878838b0a2602afb6716db0dd91c2896b9f27224c2b04c800f32705e876d2915b0c5f4f1bdcf8d3d508ca050660e2e923f999bd0a10f9fdabd3acaa750 +DIST stripe-5.0.0.tar.gz 267241 BLAKE2B 6b4a58a355baf2d16d6de8667d1dff655c3334b58933c6172b25963f90bf072ebb5fae197faafd69285ceaaf06ba952c7012c35222df873d0453ec9fcee45cd5 SHA512 3d782abd3d6983734b6248fcb44cb69609475e14b820062882439c11ba8ba64e19f3db7984902157adaf0a80f9c26d18e7fbe414eb27bfeda95a7fae78a07577 EBUILD stripe-4.2.0.ebuild 1816 BLAKE2B 2c462bf9592508166663cc3d513b273909bd70b3bf5e893d8e9f6ef7f9e35de652a193aba5c8fdc2a4b1314a1b761328f3f1b8697852bb3b5287092735677b0d SHA512 ac57bec27d9711165ce23c8c08c48199d567c060bd1a0b37be73b74861a0c30779a011418779980d934516c68c1f88a8a1879dac77cd17f2252870f91f8fd1b8 +EBUILD stripe-5.0.0.ebuild 1818 BLAKE2B 62e5d31e23a51d274c3ce0c6adfc6793f79574e94f82ad6959472b84dd476f9843117c91fa28becb41262dd2f5a857c48c78c39d9b09fcc1c0be9757bd60c4fa SHA512 31bedf5400003a964b3294dc070a19ae1a5e622a22f69ccfd4b095498dad40807c34dcc23866e65933600e702cd02538d704ac098eb32f3d978a6a92df3e2d88 MISC metadata.xml 372 BLAKE2B e6a38fdec6fc016068e7a0522ba15e83bf358ba1475e54a9630b1e86c75bc14b790c59716317bd81438a1c770e4d31afbe04400ddcd5dd272715c251fd6cb1a2 SHA512 2d9672b242f2d38654f7906097e597dfbdf75afa3583ea331f61772db95d19a802e83ed523c67a6cf3da18411036055c0996fd04d99199618d5205be8a61bd77 diff --git a/dev-python/stripe/stripe-5.0.0.ebuild b/dev-python/stripe/stripe-5.0.0.ebuild new file mode 100644 index 000000000000..85f74b80fdad --- /dev/null +++ b/dev-python/stripe/stripe-5.0.0.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{8..11} pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="Stripe python bindings" +HOMEPAGE=" + https://github.com/stripe/stripe-python/ + https://pypi.org/project/stripe/ +" +SRC_URI="mirror://pypi/s/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + >=dev-python/requests-2.20[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + >=dev-util/stripe-mock-0.141.0 + dev-python/pytest-mock[${PYTHON_USEDEP}] + net-misc/curl + ) +" + +distutils_enable_tests pytest + +DOCS=( LONG_DESCRIPTION.rst CHANGELOG.md README.md ) + +python_test() { + epytest tests +} + +src_test() { + local stripe_mock_port=12111 + local stripe_mock_max_port=12121 + local stripe_mock_logfile="${T}/stripe_mock_${EPYTHON}.log" + # Try to start stripe-mock until we find a free port + while [[ "${stripe_mock_port}" -le "${stripe_mock_max_port}" ]]; do + ebegin "Trying to start stripe-mock on port ${stripe_mock_port}" + stripe-mock --http-port ${stripe_mock_port} &> "${stripe_mock_logfile}" & + local stripe_mock_pid=$! + sleep 2 + # Did stripe-mock start? + curl --fail -u "sk_test_123:" \ + http://127.0.0.1:${stripe_mock_port}/v1/customers &> /dev/null + eend $? "Port ${stripe_mock_port} unavailable" + if [[ $? -eq 0 ]]; then + einfo "stripe-mock running on port ${stripe_mock_port}" + break + fi + (( stripe_mock_port++ )) + done + if [[ "${stripe_mock_port}" -gt "${stripe_mock_max_port}" ]]; then + eerror "Unable to start stripe-mock for tests" + die "Please see the logfile located at: ${stripe_mock_logfile}" + fi + + local -x STRIPE_MOCK_PORT=${stripe_mock_port} + distutils-r1_src_test + + # Tear down stripe-mock + kill "${stripe_mock_pid}" || die "Unable to stop stripe-mock" +} |