Skip to content

Commit

Permalink
Build all dependencies for umu clients (#143)
Browse files Browse the repository at this point in the history
* Build all Python modules for umu clients

- The Makefile currently builds python-xlib and the client is responsible for putting the module within their runtime directory. However, python-xlib depends on six.py and this will not get built for umu clients. To properly build dependencies, we need to use pip to resolve all of the dependencies and have them put in the object directory during the build process.

* Update README.md

* Add note on how to install dependencies

* Update info statements
  • Loading branch information
R1kaB3rN authored Jul 11, 2024
1 parent 25488c1 commit f7164c3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,19 @@ umu-launcher-dist-install:
umu-launcher-install: umu-launcher-dist-install umu-launcher-bin-install


$(OBJDIR)/.build-python-xlib: | $(OBJDIR)
$(info :: Building python-xlib )
cd subprojects/python-xlib && \
$(PYTHON_INTERPRETER) setup.py build
$(OBJDIR)/.build-umu-subprojects: | $(OBJDIR)
$(info :: Building subprojects )
pip install -r requirements.in -t $(OBJDIR)

.PHONY: python-xlib
python-xlib: $(OBJDIR)/.build-python-xlib
.PHONY: umu-subprojects
umu-subprojects: $(OBJDIR)/.build-umu-subprojects

python-xlib-install:
$(info :: Installing python-xlib )
umu-subprojects-install:
$(info :: Installing subprojects )
install -d $(DESTDIR)$(PYTHONDIR)
cp -r subprojects/python-xlib/build/lib/Xlib $(DESTDIR)$(PYTHONDIR)
cp -r $(OBJDIR)/*-info $(DESTDIR)$(PYTHONDIR)
cp -r $(OBJDIR)/Xlib $(DESTDIR)$(PYTHONDIR)
cp $(OBJDIR)/six.py $(DESTDIR)$(PYTHONDIR)

$(OBJDIR):
@mkdir -p $(@)
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ Change the `--prefix` as fit for your distribution, for example `/usr/local`, or

Then run `make` to build. After a successful build the resulting files should be available in the `./builddir` directory

**Note**: For umu clients, [pip](https://github.com/pypa/pip) is required to build its Python dependencies and they will need to be put within same directory as the runtime directory (e.g., `$HOME/.config/heroic/tools/runtimes/umu`).

To build all dependencies:
```shell
make DESTDIR=<packaging_directory> umu-subprojects
```

### Installing
To install umu-launcher run the following command after completing the steps described above
```shell
Expand All @@ -102,6 +109,11 @@ or if you are packaging umu-launcher
make DESTDIR=<packaging_directory> install
```

**Note**: For umu clients, to install all of its dependencies, run:
```shell
make DESTDIR=<packaging_directory> umu-subprojects-install
```

### Installing as user
If you want to install umu just for your user, or for quickly testing, you can configure umu with the following command
```shell
Expand Down

0 comments on commit f7164c3

Please sign in to comment.