I’m having an issue to display the license correctly in pypi for a package I’m working on.
This is the package page.
So I am trying to publish the package using setuptools
and having the configuration driven by a pyproject.toml
file.
But whenever I publish the change, the page displays the wrong license.
I want to publish it (since the beginning I started with this project), as a GPL2 project but the page, for some reason shows it as License: MIT License (GPL-2.0)
, which I think is wrong.
Any idea how can I correct this? (I would suppose it has to do with my configurations).
I’ll share the basis of what I’m using to publish here, because I’m not publishing yet to GitHub in full (right now I’m working on my private repos).
This is the pyproject.toml file I’m using.
[metadata]
license = "GPL 2"
[project]
name = "odeanimate"
authors = [
{ name="Miguel Alejandro Salgado Zapien", email="BLANKED OUT"},
]
description = "A module for useful quick mathematical calculation, plotting and animation."
readme="README.md"
requires-python = ">= 3.11"
license = {text = "GPL-2.0"}
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Physics",
]
dependencies = [
"matplotlib"
]
dynamic = ["version"]
[project.urls]
"Homepage" = "https://odeanimate.ekiim.xyz"
"Source" = "https://github.com/ekiim/odeanimate"
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
packages = ["odeanimate"]
license-files = ["LICENSE.txt"]
[tool.setuptools.dynamic]
version = {attr = "odeanimate.__version__"}
[tool.pytest.ini_options]
addopts = "-q --doctest-modules --cov=odeanimate--cov-report=site/reports"
testpaths = ["odeanimate", "tests"]
python_files = "*.py"
[tool.pytest.plugins]
cov = {source = "odeanimate"}
doctestplus = {}
To build, I’m just running python -m build
and to publish twine.
Any thoughts?