BobBuildTool/bob

Bob 0.22.0 misses sandbox

Ferruck opened this issue · 7 comments

When cleanly installing the latest Bob with pip, bob-namespace-sandbox is not installed (among others). 0.22.0rc1 doesn't show this problem. The diff of the installed files is (as obtained with pip show -f BobBuildTool):

-- 22.0rc1	2023-01-10 12:41:32.061038509 +0100
+++ 22.0	2023-01-10 12:39:06.622293338 +0100
@@ -1,5 +1,5 @@
-Name: BobBuildTool
-Version: 0.22.0rc1
+ame: BobBuildTool
+Version: 0.22.0
 Summary: Functional cross platform build-automation tool
 Home-page: https://bobbuildtool.github.io/
 Author: Jan Klötzke
@@ -10,29 +10,14 @@ Requires: pyparsing, python-magic, PyYAM
 Required-by:
 Files:
   ../../../bin/bob
-  ../../../bin/bob-namespace-sandbox
-  ../../../share/bash-completion/completions/bob
-  ../../../share/man/man1/bob-archive.1
-  ../../../share/man/man1/bob-build.1
-  ../../../share/man/man1/bob-clean.1
-  ../../../share/man/man1/bob-dev.1
-  ../../../share/man/man1/bob-graph.1
-  ../../../share/man/man1/bob-jenkins.1
-  ../../../share/man/man1/bob-ls.1
-  ../../../share/man/man1/bob-project.1
-  ../../../share/man/man1/bob-query-meta.1
-  ../../../share/man/man1/bob-query-path.1
-  ../../../share/man/man1/bob-query-recipe.1
-  ../../../share/man/man1/bob-query-scm.1
-  ../../../share/man/man1/bob-status.1
-  ../../../share/man/man7/bobpaths.7
-  BobBuildTool-0.22.0rc1-py3.10.egg-info/PKG-INFO
-  BobBuildTool-0.22.0rc1-py3.10.egg-info/SOURCES.txt
-  BobBuildTool-0.22.0rc1-py3.10.egg-info/dependency_links.txt
-  BobBuildTool-0.22.0rc1-py3.10.egg-info/entry_points.txt
-  BobBuildTool-0.22.0rc1-py3.10.egg-info/not-zip-safe
-  BobBuildTool-0.22.0rc1-py3.10.egg-info/requires.txt
-  BobBuildTool-0.22.0rc1-py3.10.egg-info/top_level.txt
+  BobBuildTool-0.22.0.dist-info/INSTALLER
+  BobBuildTool-0.22.0.dist-info/LICENSE
+  BobBuildTool-0.22.0.dist-info/METADATA
+  BobBuildTool-0.22.0.dist-info/RECORD
+  BobBuildTool-0.22.0.dist-info/REQUESTED
+  BobBuildTool-0.22.0.dist-info/WHEEL
+  BobBuildTool-0.22.0.dist-info/entry_points.txt
+  BobBuildTool-0.22.0.dist-info/top_level.txt
   bob/__init__.py
   bob/__pycache__/__init__.cpython-310.pyc
   bob/__pycache__/archive.cpython-310.pyc

Bob was installed with python3 -m pip install BobBuildTool==0.22.0rc1 (and ==0.22.0 respectively).

As far as I can tell, the problem is the BobBuildTool-0.22.0-py3-none-any.whl wheel that is created (or uploaded or both) only starting with 0.22.0 onward. It simply doesn't contain neither the sandbox helper nor the man pages. Alas, it's picked up by pip by default.

Interestingly, at least here, the right wheel is installed. I guess somehow the pre-built Linux versions do not match in your case.

Anyway, the BobBuildTool-0.22.0-py3-none-any.whl was introduced by uploading the Windows build. Obviously it will miss the sandbox binary. I've deleted the file so it should fix the problem with the existing release. I'll have to adapt the GitHub pipeline accordingly...

I stumbled across the issue while building a Docker image based on Alpine. 🤷‍♂️ What does manylinux1 stand for, anyways? What is it supposed to match?

AFAICT it's specified in https://peps.python.org/pep-0513/. See also https://github.com/pypa/manylinux. But I have to admit I don't remember the exact details. But because Alpine is based on musl-libc it should not match the binary wheels because they are built for glibc. So the behaviour is kind of expected...

Ah, so that is the culprit. But it seems there's musllinux, as well. I'll have a look into it.

Well, pip should fall back of building the package from source if there is no pre-built binary wheel available. BTW, in the long run I was pondering about abandoning the self-built bob-namespace-sandbox by using bubblewrap as a drop in replacement...

Thanks for the fix! Now installation works on Alpine again. On a side note, the current Fedora also failed to install a working package, just because it uses Python 3.11 and the GA is building up to 3.10 only. Have you considered using something like cibuildwheel for your GA to make that build matrix a little more "automatic"? I don't know if that's the up-to-date Pythonista solution to the problem, though.

BTW, in the long run I was pondering about abandoning the self-built bob-namespace-sandbox by using bubblewrap as a drop in replacement...

Just to get "pure" Python packages or do you see more advantages? bubblewrap's complexity seems way higher and bob-namespace-sandbox has proved itself one time or another...

Thanks for the fix! Now installation works on Alpine again. On a side note, the current Fedora also failed to install a working package, just because it uses Python 3.11 and the GA is building up to 3.10 only. Have you considered using something like cibuildwheel for your GA to make that build matrix a little more "automatic"? I don't know if that's the up-to-date Pythonista solution to the problem, though.

Thanks for the pointer. I'll have a look.

BTW, in the long run I was pondering about abandoning the self-built bob-namespace-sandbox by using bubblewrap as a drop in replacement...

Just to get "pure" Python packages or do you see more advantages? bubblewrap's complexity seems way higher and bob-namespace-sandbox has proved itself one time or another...

Mainly to get a pure python package. That would make the publishing a lot easier. AFAICT bubblewrap is available on all distros and should provide enough functionality to replace the bob-namespace-sandbox. But there is no great benefit either. That's why I never looked into the details...