Skip to content

Commit

Permalink
PyPy in CI?
Browse files Browse the repository at this point in the history
  • Loading branch information
James-E-A committed Jan 30, 2024
1 parent a6a8483 commit 3cd22c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pypqc"
version = "0.0.6.2a0-dev2"
version = "0.0.6.2a0-dev3"
description = "Python bindings for the \"PQClean\" post-quantum cryptography library."
readme = "README.rst"
urls = {"Homepage" = "https://github.com/JamesTheAwesomeDude/pypqc"}
Expand Down
12 changes: 8 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,27 @@
# https://github.com/pypa/setuptools/issues/1040

from setuptools import setup
from distutils.command.build_ext import build_ext as _build_ext
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel


class bdist_wheel_abi_none(_bdist_wheel):
class site_bdist_wheel(_bdist_wheel):
"""https://github.com/joerick/python-ctypes-package-sample/blob/7db688cd6ee32ae95bce0f75fb7d806926e20252/setup.py#L29"""
def finalize_options(self):
_bdist_wheel.finalize_options(self)
self.root_is_pure = False

def get_tag(self):
python, abi, plat = _bdist_wheel.get_tag(self)
return "py3", "none", plat
if self.py_limited_api and platform.python_implementation() not in {
'PyPy', # https://github.com/orgs/pypy/discussions/4884#discussioncomment-8309845
}:
python = f'py{sys.version_info.major}'
abi = f'abi{sys.version_info.major}'
return python, abi, plat


setup(
cmdclass={"bdist_wheel": bdist_wheel_abi_none},
cmdclass={"bdist_wheel": site_bdist_wheel},
cffi_modules=[
'cffi_modules/dilithium2_clean.py:ffi',
'cffi_modules/dilithium3_clean.py:ffi',
Expand Down

0 comments on commit 3cd22c2

Please sign in to comment.