From bc3d65119480ffa173f1fe2f782197d2c233a503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Gl=C3=A4=C3=9Fle?= Date: Wed, 25 Dec 2024 00:25:00 +0100 Subject: [PATCH] TMP --- MANIFEST.in | 2 +- TODO | 4 +++ links.txt | 32 ++++++++++++++++++++++++ pyproject.toml | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 48 ----------------------------------- 5 files changed, 105 insertions(+), 49 deletions(-) create mode 100644 TODO create mode 100644 links.txt create mode 100644 pyproject.toml diff --git a/MANIFEST.in b/MANIFEST.in index 6a2b3312..50e01060 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,2 @@ -recursive-include src/cpymad *.pxd *.pyx *.c +recursive-include src/cpymad *.pxd *.pyx recursive-include test *.py *.madx diff --git a/TODO b/TODO new file mode 100644 index 00000000..730773ed --- /dev/null +++ b/TODO @@ -0,0 +1,4 @@ +pyproject.toml: cython +cpymad.selfcheck + +musllinux... diff --git a/links.txt b/links.txt new file mode 100644 index 00000000..8238da34 --- /dev/null +++ b/links.txt @@ -0,0 +1,32 @@ +https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html#using-manifest-in +https://setuptools.pypa.io/en/latest/userguide/datafiles.html +https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html +https://packaging.python.org/en/latest/guides/writing-pyproject-toml/ +https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/ + + + +https://docs.astral.sh/ruff/configuration/ + + + +https://github.com/actions/runner-images#available-images +https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#available-versions-of-python-pypy-and-graalpy +https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories +https://xcodereleases.com/ + +https://devguide.python.org/versions/ + + +https://py-free-threading.github.io/ci/ + + + + +https://www.vim.org/scripts/script.php?script_id=2830 + + +#ifdef __GNUC__ +#ifdef __MINGW32__ + + diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..37d46992 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,68 @@ +[project] +name = "cpymad" +description = "Cython binding to MAD-X" +dynamic = ["version"] + +authors = [ + {name = "Thomas Gläßle", email = "t_glaessle@gmx.de"}, + {name = "Yngve Inntjore Levinsen"}, + {name = "Kajetan Fuchsberger"}, +] +maintainers = [ + {name = "Thomas Gläßle", email = "t_glaessle@gmx.de"}, + {name = "Riccardo De Maria", email = "riccardodemaria@gmail.com"}, +] + +readme = {file = "README.rst", content-type = "text/x-rst"} +license = {file = "COPYING.rst", text = "GPLv3+"} + +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", + "License :: OSI Approved :: Apache Software License", + "License :: Other/Proprietary License", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python :: 3", + "Topic :: Scientific/Engineering :: Physics", +] + +urls.Github = "https://github.com/hibtc/cpymad" +urls.Issues = "https://github.com/hibtc/cpymad/issues" +urls.Documentation = "http://hibtc.github.io/cpymad/" +urls.Changelog = "https://github.com/hibtc/cpymad/blob/master/CHANGES.rst" + +requires-python = ">=3.5" + +dependencies = [ + "numpy", + "minrpc>=0.1.0", +] +optional-dependencies.doc = [ + "sphinx", + "sphinx_rtd_theme", + "sphinx_substitution_extensions", + "sphinx_automodapi", + "sphinx_autodoc_typehints", + "pandas", +] +optional-dependencies.dev = [ + "cython", + "flake8", + "pytest", +] + +[build-system] +build-backend = "setuptools.build_meta" +requires = [ + "setuptools >= 61.0", + "cython>=3.1.0a1 ; python_version >= '3.13'", # Cython3.1 needed for free-threaded python + "cython<3 ; python_version < '3.8'", # Cython3.1 dropped support for python<3.8 + "cython ; python_version >= '3.8' and python_version < '3.13'", # no particular requirements +] + +[tool.setuptools] +dynamic.version.attr = "cpymad.__version__" +include-package-data = true diff --git a/setup.cfg b/setup.cfg index 122870c0..351dc5a0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,53 +1,5 @@ -[metadata] -name = cpymad -version = attr: cpymad.__version__ -description = Cython binding to MAD-X -url = https://github.com/hibtc/cpymad -long_description = file: README.rst -author = Thomas Gläßle -author_email = t_glaessle@gmx.de -license = GPLv3+ -license_files = - COPYING.rst - LICENSE/* - src/cpymad/COPYING/* -project_urls = - Source Code = https://github.com/hibtc/cpymad - Bug Tracker = https://github.com/hibtc/cpymad/issues - Documentation = http://hibtc.github.io/cpymad/ -classifiers = - Development Status :: 4 - Beta - Intended Audience :: Science/Research - License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) - License :: OSI Approved :: Apache Software License - License :: Other/Proprietary License - Operating System :: MacOS :: MacOS X - Operating System :: Microsoft :: Windows - Operating System :: POSIX :: Linux - Programming Language :: Python :: 3 - Topic :: Scientific/Engineering :: Physics -long_description_content_type = text/x-rst - [options] zip_safe = false -include_package_data = true -python_requires = >=3.5 -install_requires = - numpy - minrpc>=0.1.0 - -[options.extras_require] -doc = - sphinx - sphinx_rtd_theme - sphinx_substitution_extensions - sphinx_automodapi - sphinx_autodoc_typehints - pandas -dev = - cython - flake8 - pytest [flake8] # codes: https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes