PIP忽略了设置中的Python_requires字段

发布于 2025-01-19 08:38:11 字数 1788 浏览 2 评论 0 原文

我在我的设置中有以下内容

[metadata]
name = mathsom
python_requires = '>=3.8'
...

。安装命令:

pip install --extra-index-url https://test.pypi.org/simple/ mathsom

PIP不需要Python 3.8环境吗?

这是test.pypi链接: pypi project ,在这里回购: github repo

我知道setup.cfg文件是在工作,因为pip install install install install install in install> install> install_requires 现场和Trove分类器在测试PYPI中显示。

完整的设置.cfg文件:

[metadata]
name = mathsom
python_requires = '>=3.8'
author = Oliver Mohr B.
author_email = [email protected]
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

I have the following in my setup.cfg file:

[metadata]
name = mathsom
python_requires = '>=3.8'
...

Problem is that I created an enviroment with Python 3.7 and installation had no problems. Installation command:

pip install --extra-index-url https://test.pypi.org/simple/ mathsom

Shouldn't pip require a Python 3.8 enviroment?

Here is the test.PyPI link: PyPI project, and here the repo: GitHub repo

I know that the setup.cfg file is working because pip install packages in install_requires field and Trove Classifiers show in Test PyPI.

Complete setup.cfg file:

[metadata]
name = mathsom
python_requires = '>=3.8'
author = Oliver Mohr B.
author_email = [email protected]
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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

话少心凉 2025-01-26 08:38:11

python_requires 属于

[metadata]
name = mathsom

[options]
python_requires = >= 3.8

python_requires belongs to section [options]:

[metadata]
name = mathsom

[options]
python_requires = >= 3.8
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文