As some of you know I’m locked to python 2.7 in Haiku 32-bit.
Today I installed Haiku 32bit on a new virtual machine and I was shocked when I realized that there’s no pip_python (for pip for python 2.7) package anymore.
Is there a reason? What can I do?
This brokes all my apps and it prevents me from completing all my usual translation tasks under Haiku.
I know, but there’s no Haiku API available for python3. In python2 (Haiku 32-bit) there’s at least Bethon which works, and I won’t use QT to write Apps in Haiku.
What about Sean Healy’s HaikuAPIBindings? Admittedly I’ve never tried to use them, and it seems they haven’t been updated since beta1, but they look relatively complete.
I’m trying in Haiku hrev 56747 64-bit, to “pip3.7 install Haiku”, with this result:
ERROR: Could not find a version that satisfies the requirement Haiku (from versions: 0.01_20110820-135621)
ERROR: No matching distribution found for Haiku
With the file manually downloaded I’m trying a “python3.7 setup.py build”
but after a lot of errors it returns me
error: command ‘gcc’ failed with exit status 1
Does it works for you?
Edit: Adding Healynet repo does not provide python HaikuAPIBindings (at least for me)
~/Apps/Haiku-0.01> python setup.py build
running build
running build_ext
building ‘Haiku’ extension
creating build
creating build/temp.haiku-1-BePC-2.7
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/packages/python-2.7.18-2/.self/develop/headers/python2.7 -c Haiku.cc -o build/temp.haiku-1-BePC-2.7/Haiku.o -Wno-multichar -Wno-uninitialized
/boot/system/develop/headers/os/interface/Box.h: In function struct PyObject * Haiku_Box_DoLayout(Haiku_Box_Object *, PyObject *)': In file included from /boot/home/Apps/Haiku-0.01/Haiku.cc:26: /boot/system/develop/headers/os/interface/Box.h:76: void BBox::DoLayout()’ is protected
/boot/home/Apps/Haiku-0.01/ext/Haiku/Box.cc:375: within this context
/boot/system/develop/headers/os/interface/TextControl.h: In function struct PyObject * Haiku_TextControl_AllArchived(Haiku_TextControl_Object *, PyObject *)': In file included from /boot/home/Apps/Haiku-0.01/Haiku.cc:34: /boot/system/develop/headers/os/interface/TextControl.h:96: status_t BTextControl::AllArchived(BMessage *) const’ is protected
/boot/home/Apps/Haiku-0.01/ext/Haiku/TextControl.cc:194: within this context
/boot/system/develop/headers/os/interface/TextControl.h: In function struct PyObject * Haiku_TextControl_AllUnarchived(Haiku_TextControl_Object *, PyObject *)': /boot/system/develop/headers/os/interface/TextControl.h:97: status_t BTextControl::AllUnarchived(const BMessage *)’ is protected
/boot/home/Apps/Haiku-0.01/ext/Haiku/TextControl.cc:215: within this context
/boot/home/Apps/Haiku-0.01/ext/Haiku/Menu.cc: In function struct PyObject * Haiku_Menu_InvalidateLayout(Haiku_Menu_Object *, PyObject *)': In file included from /boot/home/Apps/Haiku-0.01/Haiku.cc:37: /boot/home/Apps/Haiku-0.01/ext/Haiku/Menu.cc:173: no matching function for call to BMenu::InvalidateLayout (bool &)’
/boot/system/develop/headers/os/interface/Menu.h:82: candidates are: void BMenu::InvalidateLayout()
/boot/system/develop/headers/os/interface/MenuField.h: In function struct PyObject * Haiku_MenuField_AllArchived(Haiku_MenuField_Object *, PyObject *)': In file included from /boot/home/Apps/Haiku-0.01/Haiku.cc:41: /boot/system/develop/headers/os/interface/MenuField.h:91: status_t BMenuField::AllArchived(BMessage *) const’ is protected
/boot/home/Apps/Haiku-0.01/ext/Haiku/MenuField.cc:224: within this context
/boot/system/develop/headers/os/interface/MenuField.h: In function struct PyObject * Haiku_MenuField_AllUnarchived(Haiku_MenuField_Object *, PyObject *)': /boot/system/develop/headers/os/interface/MenuField.h:92: status_t BMenuField::AllUnarchived(const BMessage *)’ is protected
/boot/home/Apps/Haiku-0.01/ext/Haiku/MenuField.cc:245: within this context
/boot/system/develop/headers/os/interface/ScrollView.h: In function struct PyObject * Haiku_ScrollView_DoLayout(Haiku_ScrollView_Object *, PyObject *)': In file included from /boot/home/Apps/Haiku-0.01/Haiku.cc:43: /boot/system/develop/headers/os/interface/ScrollView.h:87: void BScrollView::DoLayout()’ is protected
/boot/home/Apps/Haiku-0.01/ext/Haiku/ScrollView.cc:207: within this context
/boot/home/Apps/Haiku-0.01/Haiku.cc: In function void initHaiku(...)': /boot/home/Apps/Haiku-0.01/Haiku.cc:1794: SCROLL_BAR_MAXIMUM_KNOB_SIZE’ undeclared (first use this function)
/boot/home/Apps/Haiku-0.01/Haiku.cc:1794: (Each undeclared identifier is reported only once
/boot/home/Apps/Haiku-0.01/Haiku.cc:1794: for each function it appears in.)
/boot/home/Apps/Haiku-0.01/Haiku.cc:1798: SCROLL_BAR_MINIMUM_KNOB_SIZE' undeclared (first use this function) /boot/home/Apps/Haiku-0.01/Haiku.cc:1802: DISABLES_ON_WINDOW_DEACTIVATION’ undeclared (first use this function)
error: command ‘gcc’ failed with exit status 1
this happens in Haiku 32-bit
on Haiku 64 there are more visible errors
I’ll attach them soon
on Haiku 64 the list of errors is longer, quite a lot of pages, these the last errors:
Haiku.cc:1753:17: error: return-statement with no value, in function returning PyObject*’ {aka ‘_object*’} [-fpermissive]
1753 | return;
| ^~~~~~
Haiku.cc:1776:17: error: return-statement with no value, in function returning PyObject*’ {aka ‘_object*’} [-fpermissive]
1776 | return;
| ^~~~~~
Haiku.cc:1794:75: error: ‘SCROLL_BAR_MAXIMUM_KNOB_SIZE’ was not declared in this scope
1794 | Haiku_ScrollBar_SCROLL_BAR_MAXIMUM_KNOB_SIZE = Py_BuildValue(“i”, SCROLL_BAR_MAXIMUM_KNOB_SIZE);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Haiku.cc:1798:75: error: ‘SCROLL_BAR_MINIMUM_KNOB_SIZE’ was not declared in this scope
1798 | Haiku_ScrollBar_SCROLL_BAR_MINIMUM_KNOB_SIZE = Py_BuildValue(“i”, SCROLL_BAR_MINIMUM_KNOB_SIZE);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Haiku.cc:1802:78: error: ‘DISABLES_ON_WINDOW_DEACTIVATION’ was not declared in this scope
1802 | Haiku_ScrollBar_DISABLES_ON_WINDOW_DEACTIVATION = Py_BuildValue(“i”, DISABLES_ON_WINDOW_DEACTIVATION);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Haiku.cc:1809:17: error: return-statement with no value, in function returning PyObject*’ {aka ‘_object*’} [-fpermissive]
1809 | return;
| ^~~~~~
Haiku.cc:1832:17: error: return-statement with no value, in function returning PyObject*’ {aka ‘_object*’} [-fpermissive]
1832 | return;
| ^~~~~~
Haiku.cc:1870:17: error: return-statement with no value, in function returning PyObject*’ {aka ‘_object*’} [-fpermissive]
1870 | return;
| ^~~~~~
Haiku.cc:2656:17: error: return-statement with no value, in function returning PyObject*’ {aka ‘_object*’} [-fpermissive]
2656 | return;
| ^~~~~~
Haiku.cc:2672:17: error: return-statement with no value, in function returning PyObject*’ {aka ‘_object*’} [-fpermissive]
2672 | return;
| ^~~~~~
Haiku.cc:2745:17: error: return-statement with no value, in function returning PyObject*’ {aka ‘_object*’} [-fpermissive]
2745 | return;
| ^~~~~~
Haiku.cc:2868:17: error: return-statement with no value, in function returning PyObject*’ {aka ‘_object*’} [-fpermissive]
2868 | return;
| ^~~~~~
error: command ‘gcc’ failed with exit status 1