build/install problems
I'm trying to follow the instructions for "installing from a source tarball".
I cloned the Rust regex repo, put it in a dir named 'rust-regex', and built it okay. I cloned this repo, put it in a sibling dir. So when it says:
RURE_DIR=/path/to/regex/regex-capi python setup.py bdist_wheel
I did this:
RURE_DIR=../rust-regex/regex-capi python3 setup.py bdist_wheel
and it died with this:
running build_rust
error: [Errno 2] No such file or directory: '../rust-regex/regex-capi/target/release'
Now, it's not clear what RURE_DIR is supposed to mean, but I noticed that there's a target dir in the rust-regex dir itself. So I changed my command to:
RURE_DIR=../rust-regex python3 setup.py bdist_wheel
and it seemed to work. So is that a mistake in the README?
Then, when I do this:
pip3 install rure --no-index -f ./dist
I get either
Could not find a version that satisfies the requirement six (from rure) (from versions: )
or
Could not find a version that satisfies the requirement cffi>=1.5.0 (from rure) (from versions: )
I don't know what's going on.
At some point, the regex crate moved to Cargo workspaces. One consequence of that is the consolidation to a single target directory in the root of the repo, no matter which crate is built. Before this change, regex-capi used to contain its own target directory.
Okay, so it sounds like my change to RURE_DIR was correct.
Any idea what's causing the pip3 failures?
No. I don't maintain this project. I maintain the regex library. Sounds like you'll need to futz with the dependency requires on the Python side.
I maintain the regex library.
rust-lang/regex? Cool. RegexSet looks particularly useful for me, and I haven't seen anything like it elsewhere.
Sounds like you'll need to futz with the dependency requires on the Python side.
Yeah. I installed python3-cffi, and that seemed to make pip3's cffi complaint go away. But it was still complaining about six, despite the fact that I've got both python-six and python3-six installed. So I tried just adding --no-deps to the pip3 command, and it seems to have worked! (Shrug.)
@jmdyck I merged #17; thanks for that. Will look at your other issues.
@jmdyck what version of Python is this? Is it PyPy or cPython?
cPython 3.6.5
I swear this was working; I'm hitting other issues building now however. I'm going to try to implement https://github.com/davidblewett/rure-python/issues/14 ; it should address these in a more general way. The Python+Rust landscape has improved a bit since this package was started.