holoviz-dev / pyctdev

Python packaging Common Tasks for Developers
BSD 3-Clause "New" or "Revised" License
10 stars 2 forks source link

Move HoloViz projects from setup.py to pyproject.toml #106

Open maximlt opened 1 year ago

maximlt commented 1 year ago

Having to rely on a declarative file like pyproject.toml instead of on a Python module like setup.py will bring some advantages. It would for instance make it easier to collect the dependencies required by a package and convert them to an environment.yml file. A project like conda-lock has very good support for this file format.

jbednar commented 1 year ago

I thought we'd already investigated this and had problems, but it looks like it was for an earlier incarnation of declarative files: https://github.com/holoviz/holoviz/issues/154 . As that issue hints, maybe the toml version eliminates those limitations now that it's in wider use? In HoloViz we do love our declarative approaches, when they actually work! :-)

maximlt commented 1 year ago

Yes indeed things should be better at this point. Yet pyproject.toml isn't fully declarative, in the sense that there are still some fields that can/need to be computed dynamically. This is for instance the case for version, and we'll have to see if param.version works in that case too without any change.

Probably trying to convert Panel from setup.py to pyproject.toml would give us enough insight.

maximlt commented 1 year ago

I had a brief look at this and will list here some difficulties to address: