pip 忽略设置中的 python_requires 字段
pip ignores python_requires field in setup
我的 setup.cfg 文件中有以下内容:
[metadata]
name = mathsom
python_requires = '>=3.8'
...
问题是我用 Python 3.7 创建了一个环境并且安装没有问题。安装命令:
pip install --extra-index-url https://test.pypi.org/simple/ mathsom
pip 不应该需要 Python 3.8 环境吗?
这里是 test.PyPI link: PyPI project, and here the repo: GitHub repo
我知道 setup.cfg 文件正在运行,因为 install_requires
字段中的 pip 安装包和测试 PyPI 中显示的 Trove 分类器。
完成 setup.cfg 文件:
[metadata]
name = mathsom
python_requires = '>=3.8'
author = Oliver Mohr B.
author_email = oliver.mohr.b@gmail.com
version = 0.1.2
description = Personal library for math related problems
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/oliverm91/mathsom
license_files = LICENSE
keywords = solvers, solver, interpolations, interpolation, numerics, derivatives, integrals
classifiers =
Development Status :: 3 - Alpha
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Programming Language :: Python
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Scientific/Engineering :: Mathematics
Natural Language :: English
[options]
package_dir=
= src
packages=find:
install_requires =
numpy
scipy
[options.packages.find]
where=src
python_requires
属于部分 [options]
:
[metadata]
name = mathsom
[options]
python_requires = >= 3.8
我的 setup.cfg 文件中有以下内容:
[metadata]
name = mathsom
python_requires = '>=3.8'
...
问题是我用 Python 3.7 创建了一个环境并且安装没有问题。安装命令:
pip install --extra-index-url https://test.pypi.org/simple/ mathsom
pip 不应该需要 Python 3.8 环境吗?
这里是 test.PyPI link: PyPI project, and here the repo: GitHub repo
我知道 setup.cfg 文件正在运行,因为 install_requires
字段中的 pip 安装包和测试 PyPI 中显示的 Trove 分类器。
完成 setup.cfg 文件:
[metadata]
name = mathsom
python_requires = '>=3.8'
author = Oliver Mohr B.
author_email = oliver.mohr.b@gmail.com
version = 0.1.2
description = Personal library for math related problems
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/oliverm91/mathsom
license_files = LICENSE
keywords = solvers, solver, interpolations, interpolation, numerics, derivatives, integrals
classifiers =
Development Status :: 3 - Alpha
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Programming Language :: Python
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Scientific/Engineering :: Mathematics
Natural Language :: English
[options]
package_dir=
= src
packages=find:
install_requires =
numpy
scipy
[options.packages.find]
where=src
python_requires
属于部分 [options]
:
[metadata]
name = mathsom
[options]
python_requires = >= 3.8