Skip to content

Core doesn't install python version specific dependencies #3347

@DamienMatias

Description

@DamienMatias
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

Hello guys, I'm currently working on a package that is meant to be compatible with python ^3.6 and we added dataclasses as a dependency only for python 3.6 which gives us the following pyproject.toml

[tool.poetry]
name = "toto"
version = "0.1.0"
description = ""
authors = ["Damien Matias"]

[tool.poetry.dependencies]
python = "^3.6.1"
dataclasses = {version = "^0.7", python = ">=3.6.1,<3.7"}

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

The issue is if I try to install the package using pip in a python 36 venv, it won't install dataclasses even though it's specified

❯ pip install .
Looking in indexes: https://pypi.org/simple
Processing /private/tmp/toto
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: toto
  Building wheel for toto (PEP 517) ... done
  Created wheel for toto: filename=toto-0.1.0-py3-none-any.whl size=1038 sha256=187322497ce6ccb76aa5c8b658ec322315269284b48540e69f7ed2827e60d1ea
  Stored in directory: /Users/dmatias/Library/Caches/pip/wheels/77/f6/1b/c1cd1dd9e985f0598509bf1e578353c80a4c92bcd09e765e87
Successfully built toto
Installing collected packages: toto
  Attempting uninstall: toto
    Found existing installation: toto 0.1.0
    Uninstalling toto-0.1.0:
      Successfully uninstalled toto-0.1.0
Successfully installed toto-0.1.0

Maybe this is more a https://github.com/python-poetry/poetry-core issue ?

Thank you in advance :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/solverRelated to the dependency resolverkind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions