Skip to content

Error in parsing conditional requirements in setup.py #1264

Closed
@00sapo

Description

  • 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 python >= 3.8 do:

pdm add "fairseq @ git+https://github.com/pytorch/fairseq@336942734c85791a90baa373c212d27e7c722662"

Actual behavior

PDM fails, saying that the package has conflicting requirements. Actually, looking at the setup.py, it has two conditional constraints, but pdm stops at the first one:

https://github.com/facebookresearch/fairseq/blob/336942734c85791a90baa373c212d27e7c722662/setup.py#L185-L186

Expected behavior

Should install normally, as with pip.

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
PDM version:
  2.0.3
Python Interpreter:
  /extra/Develop/Didone/DidoneBERT/dustenv/pyenv/versions/3.8.13/bin/python3.8 (3.8)
Project Root:
  /extra/Develop/Didone/DidoneBERT
Project Packages:
  /extra/Develop/Didone/DidoneBERT/__pypackages__/3.8
{
  "implementation_name": "cpython",
  "implementation_version": "3.8.13",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.10.129-1-MANJARO",
  "platform_system": "Linux",
  "platform_version": "#1 SMP PREEMPT Thu Jul 7 16:56:51 UTC 2022",
  "python_full_version": "3.8.13",
  "platform_python_implementation": "CPython",
  "python_version": "3.8",
  "sys_platform": "linux"
}

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions