Closed blaggacao closed 1 year ago
v1.19.2
is good, btw:
In [2]: import vrp_cli
In [3]: vrp_cli.solve_pragmatic
Out[3]: <function vrp_cli.vrp_cli.solve_pragmatic(problem, matrices, config)>
Yeah, need to see what I did wrong with maturin
and local Python environment. Or maybe it is better to spend some time and setup dedicated github actions. Need to find some time for it..
As workaround, you can try to build the package locally using maturin
as described here: https://reinterpretcat.github.io/vrp/examples/interop/python.html#using-maturin
I got myself into an environment that builds with nix shell nixpkgs#cargo nixpkgs#rustc nixpkgs#maturin
. Let me see how far I can get from there.
And that looks actually like it built successfully:
❯ /home/blaggacao/src/github.com/reinterpretcat/vrp/vrp-cli/.venv/bin/python
Python 3.9.7 (default, Jun 22 2022, 20:11:26)
[GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import vrp_cli
>>> vrp_cli
<module 'vrp_cli' from '/home/blaggacao/src/github.com/reinterpretcat/vrp/vrp-cli/.venv/lib/python3.9/site-packages/vrp_cli/__init__.py'>
AttributeError: module 'vrp_cli' has no attribute 'lib'
>>> vrp_cli.__all__
['convert_to_pragmatic', 'get_routing_locations', 'solve_pragmatic']
>>>
I've added a dedicated github action [1] to build and publish to PyPI, but cannot make it work as it fails with You are running out of disk space. The runner will stop working when the machine runs out of disk space. Free space left: 43 MB
. Tried multiple times with reduced amount of architectures, cleaning deps, project's target folder.. No luck so far
[1] https://github.com/reinterpretcat/vrp/actions/workflows/maturin.yaml
I was able to publish update (1.21.1) to PyPI using dedicated github action, so it should work now on different OS families (windows, macos, linux) and architectures (x86_64, armv7), see https://github.com/reinterpretcat/vrp/blob/master/.github/workflows/maturin.yaml
I couldn't find the publishing routine in the repo automation so I assume publishing to pip is done manually from your local machine.
Maybe somehow something went wrong for this version, that I use: