[dev-python/pymongo-auth-aws] add

This commit is contained in:
Robert Förster 2024-06-22 00:59:06 +02:00
parent e658d61f13
commit eb35f025aa
4 changed files with 314 additions and 0 deletions

View File

@ -0,0 +1 @@
DIST pymongo-auth-aws-1.1.0.tar.gz 12188 BLAKE2B bf74c4d3f790d37aab82b5f9512af3f924b35392794907ecc9177194c7fcbf15dfc11e207fbfd86b18acb1404c11f0fdb63bf77ad253d7a0a3150426d3e3e8a9 SHA512 4be046628b83cb015986298d396f66f89e52f0ea26e2e8acb0c7f922f5c5b6377e1a17fc8564be1c7a82e15e252a705e35788fda5c4bf5edc81d68bbfc4f6d38

View File

@ -0,0 +1,129 @@
https://github.com/mongodb/pymongo-auth-aws/commit/40198b0aa9d76657badb1dcf3c60298d005dca5b minus hatch-requirements-txt
--- a/dev/null 2024-04-07 00:22:51.151700697 +0200
+++ b/pyproject.toml 2024-06-21 21:07:25.763896995 +0200
@@ -0,0 +1,59 @@
+[build-system]
+requires = ["hatchling>1.24"]
+build-backend = "hatchling.build"
+
+[project]
+name = "pymongo-auth-aws"
+dynamic = ["version", "dependencies", "optional-dependencies"]
+description = "MONGODB-AWS authentication support for PyMongo"
+readme = "README.rst"
+license = {file="LICENSE"}
+requires-python = ">=3.8"
+authors = [
+ { name = "Shane Harvey", email = "drivers-python-noreply@mongodb.com" },
+]
+keywords = [
+ "MONGODB-AWS",
+ "mongo",
+ "mongodb",
+ "pymongo",
+ "pymongo-auth-aws",
+]
+classifiers = [
+ "Development Status :: 5 - Production/Stable",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: Apache Software License",
+ "Operating System :: MacOS :: MacOS X",
+ "Operating System :: Microsoft :: Windows",
+ "Operating System :: POSIX",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: Implementation :: CPython",
+ "Programming Language :: Python :: Implementation :: PyPy",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
+ "Topic :: Database",
+]
+
+[project.urls]
+Homepage = "https://github.com/mongodb/pymongo-auth-aws"
+
+[tool.hatch.version]
+path = "pymongo_auth_aws/version.py"
+
+[tool.ruff]
+target-version = "py37"
+line-length = 100
+
+[tool.ruff.lint]
+unfixable = [
+ "RUF100", # Unused noqa
+ "T20", # Removes print statements
+ "F401", # Unused imports
+]
+
+[tool.ruff.lint.per-file-ignores]
+"pymongo_auth_aws/__init__.py" = ["F401"]
+"test/*.py" = ["E402"]
--- a/setup.py 2022-09-13 15:56:51.000000000 +0200
+++ b/dev/null 2024-04-07 00:22:51.151700697 +0200
@@ -1,53 +0,0 @@
-import os
-
-from setuptools import setup, find_packages
-
-with open('README.rst', 'rb') as f:
- LONG_DESCRIPTION = f.read().decode('utf8')
-
-# Single source the version.
-version_file = os.path.realpath(os.path.join(
- os.path.dirname(__file__), 'pymongo_auth_aws', 'version.py'))
-version = {}
-with open(version_file) as fp:
- exec(fp.read(), version)
-
-setup(
- name="pymongo-auth-aws",
- version=version['__version__'],
- description="MONGODB-AWS authentication support for PyMongo",
- long_description=LONG_DESCRIPTION,
- long_description_content_type='text/x-rst',
- packages=find_packages(exclude=['test']),
- install_requires=['boto3', 'botocore'],
- extras_require={
- "test": ["pymongo"]
- },
- author="Shane Harvey",
- author_email="drivers-python-noreply@mongodb.com",
- url="https://github.com/mongodb/pymongo-auth-aws",
- keywords=["mongo", "mongodb", "pymongo-auth-aws", "pymongo", "MONGODB-AWS"],
- test_suite="test",
- license="Apache License, Version 2.0",
- python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*",
- classifiers=[
- "Development Status :: 5 - Production/Stable",
- "Intended Audience :: Developers",
- "License :: OSI Approved :: Apache Software License",
- "Operating System :: MacOS :: MacOS X",
- "Operating System :: Microsoft :: Windows",
- "Operating System :: POSIX",
- "Programming Language :: Python :: 2",
- "Programming Language :: Python :: 2.7",
- "Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.4",
- "Programming Language :: Python :: 3.5",
- "Programming Language :: Python :: 3.6",
- "Programming Language :: Python :: 3.7",
- "Programming Language :: Python :: 3.8",
- "Programming Language :: Python :: 3.9",
- "Programming Language :: Python :: 3.10",
- "Programming Language :: Python :: Implementation :: CPython",
- "Programming Language :: Python :: Implementation :: PyPy",
- "Topic :: Database"]
-)
--- a/setup.cfg 2022-09-13 15:57:03.103746400 +0200
+++ b/dev/null 2024-04-07 00:22:51.151700697 +0200
@@ -1,7 +0,0 @@
-[bdist_wheel]
-universal = 1
-
-[egg_info]
-tag_build =
-tag_date = 0
-

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>ultrabug@gentoo.org</email>
<name>Alexys Jacob</name>
</maintainer>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<longdescription lang="en">
PyMongo is a Python distribution containing tools for working
with MongoDB, and is the recommended way to work with MongoDB
from Python.
</longdescription>
<use>
<flag name="native-extensions">Compiles native C extensions</flag>
<flag name="test-full">
Run test suite in full, including tests that run a local
database instance.
</flag>
</use>
<upstream>
<remote-id type="pypi">pymongo</remote-id>
<remote-id type="github">mongodb/mongo-python-driver</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,156 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=hatchling
PYPI_NO_NORMALIZE=1
PYTHON_COMPAT=( pypy3 python3_{10..12} )
inherit distutils-r1 pypi
DESCRIPTION="MONGODB-AWS authentication support for PyMongo"
HOMEPAGE="
https://github.com/mongodb/pymongo-auth-aws
https://pypi.org/project/pymongo-auth-aws
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
RDEPEND="
dev-python/boto3[${PYTHON_USEDEP}]
dev-python/botocore[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
<dev-python/dnspython-3.0.0[${PYTHON_USEDEP}]
dev-python/pymongo[${PYTHON_USEDEP}]
)
"
# adjust after 1.1.0
PATCHES=(
"${FILESDIR}/hatch.patch"
)
distutils_enable_tests pytest
#reqcheck() {
# if use test && use test-full; then
# # During the tests, database size reaches 1.5G.
# local CHECKREQS_DISK_BUILD=1536M
#
# check-reqs_${1}
# fi
#}
#pkg_pretend() {
# reqcheck pkg_pretend
#}
#pkg_setup() {
# reqcheck pkg_setup
#}
#python_compile() {
# # causes build errors to be fatal
# local -x TOX_ENV_NAME=whatever
# local DISTUTILS_ARGS=()
# # unconditionally implicitly disabled on pypy3
# if ! use native-extensions; then
# DISTUTILS_ARGS+=( --no_ext )
# else
# export PYMONGO_C_EXT_MUST_BUILD=1
# fi
# distutils-r1_python_compile
#}
#python_test() {
# rm -rf bson pymongo || die
# local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
# local EPYTEST_DESELECT=(
# network-sandbox
# test/test_client.py::ClientUnitTest::test_connection_timeout_ms_propagates_to_DNS_resolver
# test/test_client.py::ClientUnitTest::test_detected_environment_logging
# test/test_client.py::ClientUnitTest::test_detected_environment_warning
# test/test_client.py::TestClient::test_service_name_from_kwargs
# test/test_client.py::TestClient::test_srv_max_hosts_kwarg
# test/test_dns.py::TestCaseInsensitive::test_connect_case_insensitive
# test/test_srv_polling.py
# test/test_uri_spec.py::TestAllScenarios::test_test_uri_options_srv-options_SRV_URI_with_custom_srvServiceName
# test/test_uri_spec.py::TestAllScenarios::test_test_uri_options_srv-options_SRV_URI_with_invalid_type_for_srvMaxHosts
# test/test_uri_spec.py::TestAllScenarios::test_test_uri_options_srv-options_SRV_URI_with_negative_integer_for_srvMaxHosts
# test/test_uri_spec.py::TestAllScenarios::test_test_uri_options_srv-options_SRV_URI_with_positive_srvMaxHosts_and_loadBalanced=fa
# test/test_uri_spec.py::TestAllScenarios::test_test_uri_options_srv-options_SRV_URI_with_srvMaxHosts
# test/test_uri_spec.py::TestAllScenarios::test_test_uri_options_srv-options_SRV_URI_with_srvMaxHosts=0_and_loadBalanced=true
# test/test_uri_spec.py::TestAllScenarios::test_test_uri_options_srv-options_SRV_URI_with_srvMaxHosts=0_and_replicaSet
# broken regularly by changes in mypy
# test/test_typing.py::TestMypyFails::test_mypy_failures
# fragile to timing? fails because we're getting too many logs
# test/test_connection_logging.py::TestConnectionLoggingConnectionPoolOptions::test_maxConnecting_should_be_included_in_connection_pool_created_message_when_specified
# )
# if ! use test-full; then
# .invalid is guaranteed to return NXDOMAIN per RFC 6761
# local -x DB_IP=mongodb.invalid
# epytest
# return
# fi
# Yes, we need TCP/IP for that...
# local -x DB_IP=127.0.0.1
# local -x DB_PORT=27000
# local dbpath=${TMPDIR}/mongo.db
# local logpath=${TMPDIR}/mongod.log
# Now, the hard part: we need to find a free port for mongod.
# We're just trying to run it random port numbers and check the log
# for bind errors. It shall be noted that 'mongod --fork' does not
# return failure when it fails to bind.
# mkdir -p "${dbpath}" || die
# while true; do
# ebegin "Trying to start mongod on port ${DB_PORT}"
# LC_ALL=C \
# mongod --dbpath "${dbpath}" --nojournal \
# --bind_ip ${DB_IP} --port ${DB_PORT} \
# --unixSocketPrefix "${TMPDIR}" \
# --logpath "${logpath}" --fork \
# && sleep 2
# Now we need to check if the server actually started...
# if [[ ${?} -eq 0 && -S "${TMPDIR}"/mongodb-${DB_PORT}.sock ]]; then
# yay!
# eend 0
# break
# elif grep -q 'Address already in use' "${logpath}"; then
# ay, someone took our port!
# eend 1
# : $(( DB_PORT += 1 ))
# continue
# else
# eend 1
# eerror "Unable to start mongod for tests. See the server log:"
# eerror " ${logpath}"
# die "Unable to start mongod for tests."
# fi
# done
# local failed
# nonfatal epytest || failed=1
# mongod --dbpath "${dbpath}" --shutdown || die
# [[ ${failed} ]] && die "Tests fail with ${EPYTHON}"
# rm -rf "${dbpath}" || die
#}