diff --git a/server/pypi/packages/aiodns/meta.yaml b/server/pypi/packages/aiodns/meta.yaml new file mode 100644 index 0000000000..aaa83f042d --- /dev/null +++ b/server/pypi/packages/aiodns/meta.yaml @@ -0,0 +1,3 @@ +package: + name: aiodns + version: "3.5.0" diff --git a/server/pypi/packages/aiodns/test.py b/server/pypi/packages/aiodns/test.py new file mode 100644 index 0000000000..078eff07b3 --- /dev/null +++ b/server/pypi/packages/aiodns/test.py @@ -0,0 +1,30 @@ +import unittest + + +class TestAiodns(unittest.TestCase): + + def test_basic(self): + import aiodns + import asyncio + + async def main(): + resolver = aiodns.DNSResolver() + result = await resolver.query('www.python.org', 'A') + self.assertIsNotNone(result) + # Result is iterable, check that it contains at least one record + records = list(result) if hasattr(result, '__iter__') else [result] + self.assertGreater(len(records), 0) + # Check that records have the expected host attribute + if hasattr(records[0], 'host'): + self.assertIsNotNone(records[0].host) + + asyncio.run(main()) + + # Check that the native module is being used. + def test_extension(self): + import aiodns + # Verify that aiodns is using the native c-ares library + resolver = aiodns.DNSResolver() + self.assertIsNotNone(resolver) + # Check that the resolver has the expected methods + self.assertTrue(hasattr(resolver, 'query')) diff --git a/server/pypi/packages/aiohttp/meta.yaml b/server/pypi/packages/aiohttp/meta.yaml index 3b83128ca0..ead22c5013 100644 --- a/server/pypi/packages/aiohttp/meta.yaml +++ b/server/pypi/packages/aiohttp/meta.yaml @@ -1,3 +1,3 @@ package: name: aiohttp - version: "3.10.10" + version: "3.13.2" diff --git a/server/pypi/packages/aiohttp/patches/chaquopy.patch b/server/pypi/packages/aiohttp/patches/chaquopy.patch new file mode 100644 index 0000000000..cf523c409e --- /dev/null +++ b/server/pypi/packages/aiohttp/patches/chaquopy.patch @@ -0,0 +1,17 @@ +--- src-original/setup.py 2024-01-01 00:00:00.000000000 +0000 ++++ src/setup.py 2024-01-01 00:00:00.000000000 +0000 +@@ -1,6 +1,12 @@ + import os + import pathlib + import sys + ++# Chaquopy: Cython-generated code needs -fPIC for shared libraries on Android. ++# Without this, we get linker errors like "relocation R_AARCH64_ADR_PREL_PG_HI21 ++# cannot be used against symbol; recompile with -fPIC" ++if "CFLAGS" in os.environ and "-fPIC" not in os.environ["CFLAGS"]: ++ os.environ["CFLAGS"] += " -fPIC" ++ + from setuptools import Extension, setup + + if sys.version_info < (3, 9): +