Thriftpy / thriftpy2

Pure python approach of Apache Thrift.
MIT License
567 stars 90 forks source link

chore: add pyproject.toml and specify build dependencies #221

Closed aisk closed 1 year ago

aisk commented 1 year ago

For latest setuptools, the build step has changed a lot. The main change is the build process is in an isolated environment without any pip packages.

thriftpy2's setup.py is using cython in its import stage, so the setuptools' change caused the CI failed (see: #220, except the python3.6, because it's using old version setuptools).

This commit adds the new style pyproject.toml and specified cython as the build dependency, so the CI can access cython in build process.

Please note that, when publish thriftpy2 to pypi server, we should using the new way described in https://setuptools.pypa.io/en/latest/userguide/quickstart.html, to build files which will be upload to pypi.

Roughly speaking, running pip install build; python -m build instead of python setup.py sdist bdist_wheel.