davesteele / comitup

Bootstrap Wifi support over Wifi
https://davesteele.github.io/comitup/
GNU General Public License v2.0
320 stars 54 forks source link

Comitupweb templates install directory #89

Closed PetervdPerk closed 4 years ago

PetervdPerk commented 4 years ago

Hi I'm the creator of https://github.com/PetervdPerk/meta-comitup which provides a Yocto layer for comitup.

I've created a recipe for comitup that uses setuptools to make a Yocto package. Setuptools installs comitupweb.py to /usr/lib/python3.7/site-packages/web/comitupweb.py and the templates to /usr/share/comitup/web/template. Which causes that comitupweb.py can't find the templates.

As a hotfix I'm patching comitup using this patch https://github.com/PetervdPerk/meta-comitup/blob/master/recipes-connectivity/comitup/files/web_path_hack.patch

Unfortunately I'm not that advanced in setuptools to find the root cause of this problem that causes that the templates and comitupweb.py don't end up in the same folder. Any suggestions that might cause this problem?

davesteele commented 4 years ago

I'm happy to see Comitup showing up as a Yocto feature.

For building, I use the "debian" branch. The makefile causes everything to be installed to /usr/share/comitup, using two options appended to "setup.py install". Then, links are created to put executables on the PATH, resulting in this.

I hadn't considered your issue, and would be happy to apply your patch. Would you like to submit a pull request, for proper credit?

You may also be interested in inspecting the customized pi-gen build environment for building Comitup-flavored Raspbian images. Look in stage2/04-comitup.

I don't speak Yocto, but is there an issue with versioning? I don't see where the Comitup version number is used for code retrieval. Do you actually want to reference e.g. https://github.com/davesteele/comitup/archive/master/1.9.tar.gz?

davesteele commented 4 years ago

Nevermind, you're referencing commits.

PetervdPerk commented 4 years ago

Indeed for now I'm just referencing to commits, Yocto can also use the archives just like debian. For developing using git is a bit easier. Maybe in the future I can refer to archives.

Thanks for pointing the debian branch (completely missed that). Unfortunely Yocto doesn't allow override --install-lib argument (it's hardcoded to site-packages see https://github.com/openembedded/openembedded-core/blob/master/meta/classes/distutils3.bbclass) therefore merging my patch #90 would be a great soiution