idiap / fast-transformers

Pytorch library for fast transformer implementations
1.65k stars 179 forks source link

Add PEP 518 build system/requirements spec (pyproject.toml) #76

Closed LoicGrobol closed 3 years ago

LoicGrobol commented 3 years ago

fast-transformers depends on torch for its build, consequently, installing it with pip from a source dist in an environment without torch doesn't work (torch is listed as a dependency but pip tries to build before installing dependencies) and since the pypi repository has no wheels, we need to install from a source dist.

PEP 518 is the solution to this exact problem: it allows specifying build dependencies and a build system (in that case setuptools) and pip is now able to use this information at install time.

This PR adds a pyproject.toml file with the correct dependencies and build system information, which allows installing from a source dist.

angeloskath commented 3 years ago

Thanks for that, I wasn't aware of PEP 518. Building wheels or in general simplifying the build process is a major issue for the library still.

Cheers, Angelos