stan-dev / httpstan

HTTP interface to Stan, a package for Bayesian inference.
ISC License
40 stars 15 forks source link

Finish migration to setuptools #633

Closed riddell-stan closed 1 year ago

riddell-stan commented 1 year ago

Finish migration from distutils to setuptools. Distutils is being deprecated by Python.

There are minor differences between setuptools and distutils. These differences are not well-documented.

This change appears to make things work.

A better approach would be to subclass build_ext, following the guidelines in the setuptools documentation:

https://setuptools.pypa.io/en/latest/userguide/extension.html

Closes https://github.com/stan-dev/httpstan/issues/631

riddell-stan commented 1 year ago

For anyone interested, here's a complex example of someone customizing build_ext: https://github.com/ratt-ru/montblanc/blob/aaf23809c890de13e76e18bf69a174236b4eb5bb/install/tensorflow_ops_ext.py