From 4bc997dd6b03153e7feb29645c74fa00e502eb0c Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Mon, 2 Oct 2023 01:14:32 +0100 Subject: [PATCH] use setuptools instead --- python_c_extension/pyproject.toml | 7 +++++++ python_c_extension/setup.py | 20 ++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 python_c_extension/pyproject.toml diff --git a/python_c_extension/pyproject.toml b/python_c_extension/pyproject.toml new file mode 100644 index 0000000..5076919 --- /dev/null +++ b/python_c_extension/pyproject.toml @@ -0,0 +1,7 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "gil_talk" +version = "0.2" diff --git a/python_c_extension/setup.py b/python_c_extension/setup.py index 0e0af73..409a5d8 100644 --- a/python_c_extension/setup.py +++ b/python_c_extension/setup.py @@ -1,9 +1,13 @@ -from distutils.core import setup, Extension +from setuptools import Extension, setup -ext_module = Extension('extension_module', - sources=['python_c_extension/extension_module.c']) - -setup(name='Extension Module', - version='1.0', - description='Python C Extension module', - ext_modules=[ext_module]) +setup( + name='Extension Module', + version="0.2", + description='Python C Extension module', + ext_modules=[ + Extension( + name="extension_module", + sources=["python_c_extension/extension_module.c"], + ), + ] +)