diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fa1236c..12d527c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: tests: strategy: matrix: - python-version: [3.6, 3.8, 3.11] + python-version: [3.6, 3.8, 3.11, 3.12] os: [ubuntu-20.04, macos-12, macos-latest, windows-2019] exclude: - os: macos-latest diff --git a/VERSION b/VERSION index 359a5b9..c4292de 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0 \ No newline at end of file +2.0.0.dev \ No newline at end of file diff --git a/okonomiyaki/__init__.py b/okonomiyaki/__init__.py index 23e2acb..98cbc05 100644 --- a/okonomiyaki/__init__.py +++ b/okonomiyaki/__init__.py @@ -1,9 +1,3 @@ -# Copyright (c) 2013 by Enthought, Inc. +# Copyright (c) 2013-2024 by Enthought, Inc. # All rights reserved. -try: - from ._version import ( - version as __version__, version_info as __version_info__ - ) -except ImportError: - __version__ = "unknown" - __version_info__ = (0, 0, 0, "unknown", 0) +from ._version import __version__ # noqa diff --git a/okonomiyaki/platforms/_pep425_impl.py b/okonomiyaki/platforms/_pep425_impl.py index 65d5a33..0694427 100644 --- a/okonomiyaki/platforms/_pep425_impl.py +++ b/okonomiyaki/platforms/_pep425_impl.py @@ -101,15 +101,21 @@ def _is_running_32bit(): def get_platform(): - import distutils.util - import platform """Return our platform name 'win32', 'linux_x86_64'""" - - result = distutils.util.get_platform().replace('.', '_').replace('-', '_') - if result == "linux_x86_64" and _is_running_32bit(): - # 32 bit Python program (running on a 64 bit Linux): pip should only - # install and run 32 bit compiled extensions in that case. - result = "linux_i686" + try: + import distutils.util + except ImportError: + import sysconfig + result = sysconfig.get_platform().replace(".", "_").replace("-", "_") + else: + result = distutils.util.get_platform().replace('.', '_').replace('-', '_') + if _is_running_32bit(): + # 32 bit Python program (running on a 64 bit Linux): pip should only + # install and run 32 bit compiled extensions in that case. + if result == "linux_x86_64": + result = "linux_i686" + elif result == "linux_aarch64": + result = "linux_armv71" return result diff --git a/okonomiyaki/platforms/abi.py b/okonomiyaki/platforms/abi.py index c20c46d..279059b 100644 --- a/okonomiyaki/platforms/abi.py +++ b/okonomiyaki/platforms/abi.py @@ -45,7 +45,7 @@ def _default_cpython_abi(platform, implementation_version): abi = u"msvc2015" elif implementation_version.minor <= 8: abi = u"msvc2019" - elif implementation_version.minor <= 11: + else: abi = u"msvc2022" if abi is None: diff --git a/okonomiyaki/platforms/tests/test_abi.py b/okonomiyaki/platforms/tests/test_abi.py index 0c8693d..1f83539 100644 --- a/okonomiyaki/platforms/tests/test_abi.py +++ b/okonomiyaki/platforms/tests/test_abi.py @@ -32,7 +32,6 @@ def test_basics(self, platform, implementation, version, expected): self.assertEqual(abi, expected) @parameterized.expand([ - ("win_x86", "cpython", "3.12.0+1"), ("win_x86", "pypy", "4.1.0+1"), ("rh5_x86_64", "r", "3.0.0+1")]) def test_non_supported(self, *arguments): diff --git a/setup.cfg b/setup.cfg index c93470a..2558e89 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,6 +17,7 @@ classifier = Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 [bdist_wheel] universal = 1 diff --git a/setup.py b/setup.py index 4c60a98..f532a08 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,6 @@ HERE = Path(__file__).parent version = (HERE / 'VERSION').read_text().strip() -filename = (HERE / 'okonomiyaki' / 'version.py').write_text(f'__version__ = "{version}"\n') +filename = (HERE / 'okonomiyaki' / '_version.py').write_text(f'__version__ = "{version}"\n') setup()