Giter Site home page Giter Site logo

Comments (8)

krpatter-intc avatar krpatter-intc commented on July 23, 2024 1

I misunderstood that the line was creating and new file for setup.cfg during the build. Yes, creating and making a new setup.cfg fixed it, or for folks doing just a pyproject.toml, the trick is to add:

[tool.distutils.bdist_wheel]
py_limited_api = "cp38"

from setuptools-rust.

davidhewitt avatar davidhewitt commented on July 23, 2024 1

Closing as we've documented a few solutions now between these issues, PRs and the README. Thanks again!

from setuptools-rust.

davidhewitt avatar davidhewitt commented on July 23, 2024

Thanks for the report, I'll try to take a look in the coming days.

it doesn't build with the limited api

Can I check what you're doing to determine to verify that?

from setuptools-rust.

krpatter-intc avatar krpatter-intc commented on July 23, 2024

The resulting .whl with python setup.py bdist_wheel --py-limited-api=cp38 is:

mytarget-0.0.1-cp38-abi3-win_amd64.whl

But with python -m build it is still:

mytarget-0.0.1-cp39-cp39-win_amd64.whl

from setuptools-rust.

davidhewitt avatar davidhewitt commented on July 23, 2024

Ah I see. Probably what is happening is that the Rust build is using the limited API but the bdist_wheel command isn't, so that's why the wheel name is wrong.

You could try creating a file, point the DIST_EXTRA_CONFIG environment variable at it, and set bdist_wheel to use the limited API in that file.

For example we do this in CI at

echo -e "[bdist_wheel]\npy_limited_api=cp39" > $DIST_EXTRA_CONFIG

Probably we need to update some documentation

from setuptools-rust.

krpatter-intc avatar krpatter-intc commented on July 23, 2024

I tried a few variations on that: (i'm on windows)

set DIST_EXTRA_CONFIG=[bdist_wheel]\npy_limited_api=cp39
python -m build -w --config-setting=--py-limited-api=cp38 --no-isolation

but so far no luck

also tried directly putting the setting in to the toml:

[bdist_wheel]
py-limited-api = "cp39"
py_limited_api = "cp39"

from setuptools-rust.

krpatter-intc avatar krpatter-intc commented on July 23, 2024

I looked through that example and the test, and the main difference between what I have and that test is that I have 100% pyproject.toml (well...i have setuptools.setup() but that's it)

from setuptools-rust.

krpatter-intc avatar krpatter-intc commented on July 23, 2024

Submitted #400 to document

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.