New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tox, PyTest, sdist...requires usedevelop for idiomatic tox tests to work #3
Comments
I am not very familiar with tox. if you know where to add hook or when, it'd helpful. regarding wheel, "python setup.py build_wheel" should just work. |
I'm sure I know significantly less than you about setuptools' interfaces and options. :) It's not an essential "feature" anyway, but it was something I encountered that might be relevant to others. Glad to hear that wheel-building should work OK out of the box. The only platform I care about, really, is Linux x86_64; ARM/ARM64 would be nice, though, so I may investigate how cross-compiling binary wheels would work, also. It looks like Python3 has support for importing platform-specific binaries (e.g. filenames like |
added usedevelop=True to [testenv] Following PyO3/setuptools-rust#3
A bit of necrobumping for people who may read this now: You need to make sure all your Rust sources are embedded in the source distribution using a |
1 similar comment
A bit of necrobumping for people who may read this now: You need to make sure all your Rust sources are embedded in the source distribution using a |
I discovered this by trial and error, so perhaps I'm off the mark here. People more familiar with the PyTest/Tox/Rust trifecta (??) may know a better way.
Basically, I've been trying to port a Cython-accelerated python module to Rust, as a learning exercise and as a way of bringing the module into 2017 (previously it was Py2 only). The module uses PyTest and Tox. I was at the point where, using
setuptools-rust
, I could build and manually test the code, and it worked great (thanks!).However, it would consistently fail with
tox
, complaining that the rust extension module wasn't present.In the end, I learned that
tox
usessdist
normally, and apparently this won't trigger Rust module build? Because, it was fixed when I addedusedevelop=True
to the[testenv]
block of mytox.ini
; becausesetuptools-rust
supports build whenpythonX setup.py develop
is invoked, this magically solved my problem.All of which is to say... does it make sense to add a build-hook somewhere to support
tox
when it's operating in the defaultsdist
-centric mode? :)Thanks again for this module, it's amazing to be able to ship Rust so easily, at last. Next thing is learning about how to do binary wheels...
The text was updated successfully, but these errors were encountered: