Skip to content

Commit

Permalink
move most metadata to pyproject.toml
Browse files Browse the repository at this point in the history
* use environment marker for conditional pycparser dep
  • Loading branch information
nitzmahone committed Sep 6, 2024
1 parent ac407f0 commit 05111c5
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 58 deletions.
43 changes: 43 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,46 @@ requires = [
"setuptools >= 66.1"
]
build-backend = "setuptools.build_meta"

[project]
name = "cffi"
version = "1.18.0.dev0"
dependencies = [
"pycparser; implementation_name != 'PyPy'",
]
requires-python = ">=3.8"

description = "Foreign Function Interface for Python calling C code."
readme = {file = "README.md", content-type = "text/markdown"}
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"License :: OSI Approved :: MIT License",
]
authors = [
{name = "Armin Rigo"},
{name = "Maciej Fijalkowski"},
]
maintainers = [
{name = "Matt Davis"},
{name = "Matt Clay"},
]

[project.entry-points."distutils.setup_keywords"]
cffi_modules = "cffi.setuptools_ext:cffi_modules"

[project.urls]
Documentation = "https://cffi.readthedocs.io/"
Changelog = "https://cffi.readthedocs.io/en/latest/whatsnew.html"
Downloads = "https://github.com/python-cffi/cffi/releases"
Contact = "https://groups.google.com/forum/#!forum/python-cffi"
"Source Code" = "https://github.com/python-cffi/cffi"
"Issue Tracker" = "https://github.com/python-cffi/cffi/issues"
10 changes: 0 additions & 10 deletions setup.cfg

This file was deleted.

48 changes: 0 additions & 48 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,40 +176,14 @@ def has_ext_modules(self):
# arguments mostly empty in this case.
cpython = ('_cffi_backend' not in sys.builtin_module_names)

install_requires = []
if cpython:
install_requires.append('pycparser')

setup(
name='cffi',
description='Foreign Function Interface for Python calling C code.',
long_description="""
CFFI
====
Foreign Function Interface for Python calling C code.
Please see the `Documentation <http://cffi.readthedocs.org/>`_.
Contact
-------
`Mailing list <https://groups.google.com/forum/#!forum/python-cffi>`_
""",
version='1.18.0.dev0',
python_requires='>=3.8',
packages=['cffi'] if cpython else [],
package_dir={"": "src"},
package_data={'cffi': ['_cffi_include.h', 'parse_c_type.h',
'_embedding.h', '_cffi_errors.h']}
if cpython else {},
zip_safe=False,

url='http://cffi.readthedocs.org',
author='Armin Rigo, Maciej Fijalkowski',
author_email='[email protected]',

license='MIT',

distclass=CFFIDistribution,
ext_modules=[Extension(
name='_cffi_backend',
Expand All @@ -222,26 +196,4 @@ def has_ext_modules(self):
extra_link_args=extra_link_args,
extra_objects=forced_extra_objs,
)] if cpython else [],

install_requires=install_requires,

entry_points = {
"distutils.setup_keywords": [
"cffi_modules = cffi.setuptools_ext:cffi_modules",
],
},

classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'License :: OSI Approved :: MIT License',
],
)

0 comments on commit 05111c5

Please sign in to comment.