hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

9.6K
active users

So there was a time when if you wanted compiled extensions in your Python project, but you didn't want to install a _package_, you'd have a setup.py, and you'd do:

python setup.py build_ext -i

Thing is, calling setup.py directly is now deprecated.

Is there any way to do the above that isn't calling setup.py? I've seen a suggestion of calling setuptools internal API directly, which ... ok, I guess. But wondering what people do in practice. Just make everything compiled an installable package?

"pip install -e ." is not equivalent! E.g. if you're using setuptools-rust it will build in non-release mode.

EDIT: To clarify, what are people using setuptools doing? I understand other tools may have options for this.

Itamar Turner-Trauring

@melissawm I should look at that, yeah, but the question isn't really what tool should I use in my own code project.

Rather, it's how can I support this ability in a dockerizing template that's supposed to work with random projects' build systems that likely use setuptools.

(Right now the template uses "setup.py build_ext -i".)