hjweide / pyastar2d

A very simple A* implementation in C++ callable from Python for pathfinding on a two-dimensional grid.
MIT License
150 stars 57 forks source link

Missing .h file in source distribution, causing pip install no-binary to fail. #37

Closed peterchenadded closed 2 years ago

peterchenadded commented 2 years ago

Was getting below error on mac M1 laptop which needed to compile the source distribution.

src/cpp/astar.cpp:7:10: error: 'experimental_heuristics.h' file not found with <angled> include; use "quotes" instead
      #include <experimental_heuristics.h>
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
               "experimental_heuristics.h"
      1 warning and 1 error generated.
      error: command 'clang' failed with exit status 1
      [end of output]

You should be able to reproduce the issue everywhere with below commands:

pip uninstall pyastar2d
pip install pyastar2d --no-binary :all:

The new single MANIFEST.in entry, adds the .h to source dist and allows it to be referenced correctly when installing without binary.

Apologies not testing this scenario and only finding out the issue now.

hjweide commented 2 years ago

Thanks for fixing! I also completely forgot to mention that this would be necessary so don't worry about it at all.

peterchenadded commented 2 years ago

Great, thanks for getting it merged so quickly.

Looks good.

Skipping wheel build for pyastar2d, due to binaries being disabled for it.
Installing collected packages: pyastar2d
  Running setup.py install for pyastar2d ... done
Successfully installed pyastar2d-1.0.6