Giter Site home page Giter Site logo

Comments (7)

davidhewitt avatar davidhewitt commented on July 23, 2024

I think you're correct. Unless things have changed, I don't think PEP517 gives a mechanism to pass arguments to the build backend in general.

This was solved in maturin with MATURIN_PEP517_ARGS env var. See PyO3/maturin#786

I'd accept a PR to achieve a similar control via env var here, though the design might be a bit different.

from setuptools-rust.

mgorny avatar mgorny commented on July 23, 2024

I think you're correct. Unless things have changed, I don't think PEP517 gives a mechanism to pass arguments to the build backend in general.

Actually, PEP517 provides a config_settings dict that can be used to pass options to the backend. However, I don't think that setuptools provides a way for plugins to utilize it.

That said, I'm not really sure because the code is very complex and unreadable to me, and it's undocumented.

from setuptools-rust.

davidhewitt avatar davidhewitt commented on July 23, 2024

Hmm, reading around a little, I think we can try to support something like

python -m build -C--build-option=--rust-debug

Looks like all PEP517 arguments to setuptools builds must go under the --build-option and --global-option namespaces like this.

from setuptools-rust.

mgorny avatar mgorny commented on July 23, 2024

Thinking about it, I'd prefer environment variable approach — if only because it means we can set it globally and not have to worry whether the package in question uses setuptools-rust or not.

from setuptools-rust.

davidhewitt avatar davidhewitt commented on July 23, 2024

Since 1.8.0 we now have SETUPTOOLS_RUST_CARGO_PROFILE, which should meet this need.

Note that for --debug, the profile is called dev, i.e. SETUPTOOLS_RUST_CARGO_PROFILE=dev. (This was a choice made by cargo for a reason which I am not privy to.)

from setuptools-rust.

mgorny avatar mgorny commented on July 23, 2024

Thanks! FWICS, maturin uses dev also, so that's consistent.

from setuptools-rust.

davidhewitt avatar davidhewitt commented on July 23, 2024

Yes I think maturin also inherited this from cargo.

from setuptools-rust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.