colour-science / colour

Colour Science for Python
https://www.colour-science.org
BSD 3-Clause "New" or "Revised" License
2.14k stars 263 forks source link

Fix Poetry package resolution when using local versions of colour-science in poetry projects #1174

Closed tjdcs closed 1 year ago

tjdcs commented 1 year ago

Poetry complains: "The dependency name for colour-science does not match the actual package's name: colour" when using a path dependency in local projects. This is useful when a local project is dependent on a local version of color (like adding colour as a submodule dependency to a project)

Example:

[tool.poetry.dependencies]
python = ">=3.11,<3.12"
colour-science = {path = "submodules/colour-science", develop = true}
coveralls commented 1 year ago

Coverage Status

coverage: 99.781%. remained the same when pulling 11640a7923ad901eae2befae404cbda5c8de78c4 on poetry_packages into 6b8b5d4e010fedd6ea5cbd449c9f5718e6e714fa on develop.

KelSolaar commented 1 year ago

I will need to look at this one in details, there are complications with the Pypi release and the tasks.py file is doing some dirty things because of that. Maybe those are not needed anymore with recent versions of Poetry but in the past you could not have a package mismatching the project name, it was basically breaking the build.

tjdcs commented 1 year ago

I am deploying colour-specio with this type of config. But it is a much less complicated project.

tjdcs commented 1 year ago

Specific example / use case for a "workbench" base project.

https://github.com/tjdcs/colour-workbench

KelSolaar commented 1 year ago

@tjdcs : Was that one closed on purpose?

tjdcs commented 1 year ago

Yes, but because I wanted to move the branch to a better branch folder. I will re-open