INGInious icon indicating copy to clipboard operation
INGInious copied to clipboard

Pivot to pyproject.toml for setuptools packaging

Open AlexandreDoneux opened this issue 1 year ago • 3 comments

Using pyproject.toml is the new standardized way to declare packaging metadata. As it is the new standard there will likely be less problems related to the packaging of INGInious.

Rem : setup.py is still usable and the configuration in pyproject.toml overwrites that of setup.py. For the moment the scripts are left in setup.py because of the condition on INGINIOUS_COMPOSE environment variable that can not be done in toml files.

TO DO :

  • [x] Move setup.py config to pyproject.toml
  • [x] Change test_suite depreciated parameter -> deleted + not using nose testing anymore
  • [x] Fix inginious-synchronize script (sh.CommandNotFound: cd)
  • [x] Possibly move scripts from setup.py to pyproject.toml -> two pyproject.toml files (with and without scripts depending on the use of docker compose or not)

AlexandreDoneux avatar Feb 14 '24 10:02 AlexandreDoneux

See https://github.com/UCL-INGI/INGInious/issues/893

nrybowski avatar Feb 15 '24 13:02 nrybowski

A discussion is needed regarding the scripts in the INGInious package using docker compose. They are not needed and where ignored conditionnaly with a boolean in setup.py. It is however not possible with the pyproject.toml file.

Using two different pyproject.toml files does not seem to be achievable :

  1. The pip install command does not allow selection of a particular pyprojetc.toml.
  2. Placing the pyproject.toml files in two sub-directories will not work as it seems pip copies only that directory in /tmp before the install. The source code is therefor not reachable for the install.

So either we accept the presence of unused scripts in the docker compose package (not that many) or we comment the pyproject.toml scripts before building it.

AlexandreDoneux avatar Feb 20 '24 14:02 AlexandreDoneux

This PR will be reconsidered after the definition of a new backend architecture and services separation.

nrybowski avatar Feb 22 '24 13:02 nrybowski