tortoise / aerich

A database migrations tool for TortoiseORM, ready to production.
https://github.com/tortoise/aerich
Apache License 2.0
804 stars 90 forks source link

Update poetry build backend to support editable install #319

Closed strayge closed 10 months ago

strayge commented 10 months ago

Summary

Updated build backend to support editable install.

Reason

Old poetry builder does not support editable install.

Before

❯ pip install -e ../../aerich/
Obtaining file:///<...>/aerich
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
ERROR: Project file:///<...>/aerich has a 'pyproject.toml' and its build backend is missing the 
'build_editable' hook. Since it does not have a 'setup.py' nor a 'setup.cfg', it cannot be installed 
in editable mode. Consider using a build backend that supports PEP 660.

After

❯ pip install -e ../../aerich/
Obtaining file:///<...>/aerich
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
...
Successfully built aerich
Installing collected packages: aerich
Successfully installed aerich-0.7.2
long2ice commented 10 months ago

Thanks!