diff --git a/okonomiyaki/utils/test_data/__init__.py b/okonomiyaki/utils/test_data/__init__.py index d1e5b9e4..d8209b52 100644 --- a/okonomiyaki/utils/test_data/__init__.py +++ b/okonomiyaki/utils/test_data/__init__.py @@ -241,3 +241,35 @@ NOSE_1_3_4_OSX_X86_64_cp38, MKL_10_3_OSX_X86_64_cp38, NUMPY_1_9_2_OSX_X86_64_cp38] + +# cp38 eggs for testing + +_RH8_X86_64_cp311 = os.path.join(_HERE, "eggs", "rh8_x86_64", "cp311") + +NOSE_1_3_4_RH7_X86_64_cp311 = os.path.join(_RH8_X86_64_cp311, "nose-1.3.4-1.egg") +MKL_10_3_RH7_X86_64_cp311 = os.path.join(_RH8_X86_64_cp311, "MKL-10.3-1.egg") +NUMPY_1_9_2_RH7_X86_64_cp311 = os.path.join(_RH8_X86_64_cp311, "numpy-1.9.2-1.egg") + +_WIN_X86_64_cp311 = os.path.join(_HERE, "eggs", "win_x86_64", "cp311") + +NOSE_1_3_4_WIN_X86_64_cp311 = os.path.join(_WIN_X86_64_cp311, "nose-1.3.4-1.egg") +MKL_10_3_WIN_X86_64_cp311 = os.path.join(_WIN_X86_64_cp311, "MKL-10.3-1.egg") +NUMPY_1_9_2_WIN_X86_64_cp311 = os.path.join(_WIN_X86_64_cp311, "numpy-1.9.2-1.egg") + +_OSX_X86_64_cp311 = os.path.join(_HERE, "eggs", "osx_x86_64", "cp311") + +NOSE_1_3_4_OSX_X86_64_cp311 = os.path.join(_OSX_X86_64_cp311, "nose-1.3.4-1.egg") +MKL_10_3_OSX_X86_64_cp311 = os.path.join(_OSX_X86_64_cp311, "MKL-10.3-1.egg") +NUMPY_1_9_2_OSX_X86_64_cp311 = os.path.join(_OSX_X86_64_cp311, "numpy-1.9.2-1.egg") + + +CP311_EGGS = [ + NOSE_1_3_4_RH7_X86_64_cp311, + MKL_10_3_RH7_X86_64_cp311, + NUMPY_1_9_2_RH7_X86_64_cp311, + NOSE_1_3_4_WIN_X86_64_cp311, + MKL_10_3_WIN_X86_64_cp311, + NUMPY_1_9_2_WIN_X86_64_cp311, + NOSE_1_3_4_OSX_X86_64_cp311, + MKL_10_3_OSX_X86_64_cp311, + NUMPY_1_9_2_OSX_X86_64_cp311] diff --git a/okonomiyaki/utils/test_data/eggs/osx_x86_64/cp311/MKL-10.3-1.egg b/okonomiyaki/utils/test_data/eggs/osx_x86_64/cp311/MKL-10.3-1.egg new file mode 100644 index 00000000..c7debf11 Binary files /dev/null and b/okonomiyaki/utils/test_data/eggs/osx_x86_64/cp311/MKL-10.3-1.egg differ diff --git a/okonomiyaki/utils/test_data/eggs/osx_x86_64/cp311/nose-1.3.4-1.egg b/okonomiyaki/utils/test_data/eggs/osx_x86_64/cp311/nose-1.3.4-1.egg new file mode 100644 index 00000000..f500e2d7 Binary files /dev/null and b/okonomiyaki/utils/test_data/eggs/osx_x86_64/cp311/nose-1.3.4-1.egg differ diff --git a/okonomiyaki/utils/test_data/eggs/osx_x86_64/cp311/numpy-1.9.2-1.egg b/okonomiyaki/utils/test_data/eggs/osx_x86_64/cp311/numpy-1.9.2-1.egg new file mode 100644 index 00000000..3ec8ceb3 Binary files /dev/null and b/okonomiyaki/utils/test_data/eggs/osx_x86_64/cp311/numpy-1.9.2-1.egg differ diff --git a/okonomiyaki/utils/test_data/eggs/rh8_x86_64/cp311/MKL-10.3-1.egg b/okonomiyaki/utils/test_data/eggs/rh8_x86_64/cp311/MKL-10.3-1.egg new file mode 100644 index 00000000..4d5d9fb1 Binary files /dev/null and b/okonomiyaki/utils/test_data/eggs/rh8_x86_64/cp311/MKL-10.3-1.egg differ diff --git a/okonomiyaki/utils/test_data/eggs/rh8_x86_64/cp311/nose-1.3.4-1.egg b/okonomiyaki/utils/test_data/eggs/rh8_x86_64/cp311/nose-1.3.4-1.egg new file mode 100644 index 00000000..90141691 Binary files /dev/null and b/okonomiyaki/utils/test_data/eggs/rh8_x86_64/cp311/nose-1.3.4-1.egg differ diff --git a/okonomiyaki/utils/test_data/eggs/rh8_x86_64/cp311/numpy-1.9.2-1.egg b/okonomiyaki/utils/test_data/eggs/rh8_x86_64/cp311/numpy-1.9.2-1.egg new file mode 100644 index 00000000..1997a5c8 Binary files /dev/null and b/okonomiyaki/utils/test_data/eggs/rh8_x86_64/cp311/numpy-1.9.2-1.egg differ diff --git a/okonomiyaki/utils/test_data/eggs/win_x86_64/cp311/MKL-10.3-1.egg b/okonomiyaki/utils/test_data/eggs/win_x86_64/cp311/MKL-10.3-1.egg new file mode 100644 index 00000000..e01d4594 Binary files /dev/null and b/okonomiyaki/utils/test_data/eggs/win_x86_64/cp311/MKL-10.3-1.egg differ diff --git a/okonomiyaki/utils/test_data/eggs/win_x86_64/cp311/nose-1.3.4-1.egg b/okonomiyaki/utils/test_data/eggs/win_x86_64/cp311/nose-1.3.4-1.egg new file mode 100644 index 00000000..9df8cc98 Binary files /dev/null and b/okonomiyaki/utils/test_data/eggs/win_x86_64/cp311/nose-1.3.4-1.egg differ diff --git a/okonomiyaki/utils/test_data/eggs/win_x86_64/cp311/numpy-1.9.2-1.egg b/okonomiyaki/utils/test_data/eggs/win_x86_64/cp311/numpy-1.9.2-1.egg new file mode 100644 index 00000000..c838644c Binary files /dev/null and b/okonomiyaki/utils/test_data/eggs/win_x86_64/cp311/numpy-1.9.2-1.egg differ diff --git a/okonomiyaki/utils/tests/test_eggs.py b/okonomiyaki/utils/tests/test_eggs.py index 4d6415af..293c5a9b 100644 --- a/okonomiyaki/utils/tests/test_eggs.py +++ b/okonomiyaki/utils/tests/test_eggs.py @@ -6,7 +6,7 @@ from okonomiyaki.file_formats import EggMetadata from okonomiyaki.platforms import PlatformABI -from ..test_data import CP38_EGGS, CP27_EGGS +from ..test_data import CP38_EGGS, CP27_EGGS, CP311_EGGS class TestDummyEggs(unittest.TestCase): @@ -34,6 +34,29 @@ def test_cp38_egg_metadata_valid(self, filepath): self.assertEqual(metadata.platform_tag, 'linux_x86_64') self.assertEqual(metadata.platform_abi, PlatformABI(u'gnu')) + @given(sampled_from(CP311_EGGS)) + def test_cp311_egg_metadata_valid(self, filepath): + # when + metadata = EggMetadata.from_egg(filepath) + filepath = filepath.lower() + + # then + if 'mkl' in metadata.name: + self.assertEqual(metadata.python_tag, None) + self.assertEqual(metadata.abi_tag, None) + else: + self.assertEqual(metadata.python_tag, 'cp311') + self.assertEqual(metadata.abi_tag, 'cp311') + if 'osx_x86_64' in filepath: + self.assertEqual(metadata.platform_tag, 'macosx_12_0_x86_64') + self.assertEqual(metadata.platform_abi, PlatformABI(u'darwin')) + elif 'win_x86_64' in filepath: + self.assertEqual(metadata.platform_tag, 'win_amd64') + self.assertEqual(metadata.platform_abi, PlatformABI(u'msvc2022')) + else: + self.assertEqual(metadata.platform_tag, 'linux_x86_64') + self.assertEqual(metadata.platform_abi, PlatformABI(u'gnu')) + @given(sampled_from(CP27_EGGS)) def test_cp27_egg_metadata_valid(self, filepath): # when diff --git a/okonomiyaki/utils/tests/test_test_data.py b/okonomiyaki/utils/tests/test_runtimes.py similarity index 100% rename from okonomiyaki/utils/tests/test_test_data.py rename to okonomiyaki/utils/tests/test_runtimes.py diff --git a/setup.cfg b/setup.cfg index 897d35db..01cd727e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -58,12 +58,16 @@ okonomiyaki.utils.test_data = eggs/rh5_x86_64/*.egg eggs/rh6_x86_64/*.egg eggs/rh7_x86_64/*.egg + eggs/rh8_x86_64/*.egg eggs/win_x86_64/*.egg eggs/osx_x86_64/cp38/*.egg + eggs/osx_x86_64/cp311/*.egg eggs/rh5_x86_64/cp38/*.egg eggs/rh6_x86_64/cp38/*.egg eggs/rh7_x86_64/cp38/*.egg + eggs/rh8_x86_64/cp311/*.egg eggs/win_x86_64/cp38/*.egg + eggs/win_x86_64/cp311/*.egg wheels/*.whl [options.extras_require]