Skip to content
Snippets Groups Projects
Commit 83fae9c7 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

setup.py: Fix debian unstable package build

Since Python 3.10, support for PyArg_ParseTuple() # formats
requires PY_SSIZE_T_CLEAN macro to be defined.
parent 386a68f1
No related branches found
Tags v0.4.1
No related merge requests found
#!/usr/bin/env python3
# Copyright (C) 2019-2021 The Software Heritage developers
# Copyright (C) 2019-2022 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU Affero General Public License version 3, or any later version
# See top-level LICENSE file for more information
from io import open
from os import path
import sys
from setuptools import Extension, find_packages, setup
......@@ -36,6 +37,10 @@ def parse_requirements(*names):
return requirements
macros = []
if sys.version_info[:2] >= (3, 10): # https://github.com/python/cpython/issues/85115
macros.append(("PY_SSIZE_T_CLEAN", None))
setup(
name="swh.loader.cvs",
description="Software Heritage CVS Loader",
......@@ -76,6 +81,7 @@ setup(
"swh/loader/cvs/rcsparse/py-rcsparse.c",
"swh/loader/cvs/rcsparse/rcsparse.c",
],
define_macros=macros,
)
],
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment