Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdm install does not enforce requires-python #1237

Closed
1 task done
gusalecar opened this issue Jul 18, 2022 · 0 comments
Closed
1 task done

pdm install does not enforce requires-python #1237

gusalecar opened this issue Jul 18, 2022 · 0 comments
Labels
🐛 bug Something isn't working

Comments

@gusalecar
Copy link

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

With this pyproject.toml

[project]
dependencies = [
    "flatdict>=4.0.1",
]
requires-python = "~=3.9.0"

pdm install -v

python.use_venv is on, creating a virtualenv for this project...
Run command: ['/home/gus/.local/pipx/venvs/pdm/bin/python', '-m', 'virtualenv', 
'--no-pip', '--no-setuptools', '--no-wheel', '/home/gus/Escritorio/test/.venv', 
'-p', '/usr/bin/python3']
created virtual environment CPython3.10.4.final.0-64 in 62ms
  creator CPython3Posix(dest=/home/gus/Escritorio/test/.venv, clear=False, no_vcs_ignore=False, global=False)
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
Virtualenv is created successfully at /home/gus/Escritorio/test/.venv
Synchronizing working set with lock file: 1 to add, 0 to update, 0 to remove

unearth: Downloading <Link https://files.pythonhosted.org/packages/3e/0d/424de6e5612f1399ff69bf86500d6a62ff0a4843979701ae97f120c7f1fe/flatdict-4.0.1.tar.gz (from None)> to /tmp/pdm-download-860bv6l7/flatdict-4.0.1.tar.gz
pdm.termui: Using cached wheel: /home/gus/.cache/pdm/wheels/ef/c0/10/643b3daf88e1a913d0554997ed1e5f5b7b69a57a05fb34d0a9/flatdict-4.0.1-py3-none-any.whl
  ✔ Install flatdict 4.0.1 successful

🎉 All complete!

Actual behavior

It uses the system installed Python, in this case 3.10

Expected behavior

It should block installation

Environment Information

Don't know why but it creates __pypackages__ folder and detects correct Python version

# Paste the output of `pdm info && pdm info --env` below:
PDM version:
  2.0.1
Python Interpreter:
  /home/gus/.pyenv/versions/3.9.13/bin/python3.9 (3.9)
Project Root:
  /home/gus/Escritorio/test
Project Packages:
  /home/gus/Escritorio/test/__pypackages__/3.9
{
  "implementation_name": "cpython",
  "implementation_version": "3.9.13",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.15.0-41-generic",
  "platform_system": "Linux",
  "platform_version": "#44-Ubuntu SMP Wed Jun 22 14:20:53 UTC 2022",
  "python_full_version": "3.9.13",
  "platform_python_implementation": "CPython",
  "python_version": "3.9",
  "sys_platform": "linux"
}
@gusalecar gusalecar added the 🐛 bug Something isn't working label Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant