Skip to content

Commit

Permalink
add dynamic site-packages directory
Browse files Browse the repository at this point in the history
  • Loading branch information
aichingm authored and gsemet committed Jan 21, 2018
1 parent f54f629 commit a387ebc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ PYTHON_INTERPRETER=python3
MODULE:=guake
INSTALL_ROOT:=/
PREFIX:=$(INSTALL_ROOT)usr/local
DIST_PACKAGE:=$$($(PYTHON_INTERPRETER) -c "import site; import os; print(os.path.basename(site.getsitepackages()[0]))")
OLD_PREFIX:=$(INSTALL_ROOT)usr
SLUG:=fragment_name

Expand Down Expand Up @@ -39,7 +40,7 @@ install-system: install-schemas install-locale
@echo "Please prefer you application package manager (apt, yum, ...)"
@pip3 install -r requirements.txt
@$(PYTHON_INTERPRETER) setup.py install --root "$(INSTALL_ROOT)" --optimize=1
@glib-compile-schemas $(PREFIX)/lib/python$(shell $(PYTHON_INTERPRETER) -c "import sys; v = sys.version_info; print('{}.{}'.format(v.major, v.minor))")/site-packages/guake/data/
@glib-compile-schemas $(PREFIX)/lib/python$(shell $(PYTHON_INTERPRETER) -c "import sys; v = sys.version_info; print('{}.{}'.format(v.major, v.minor))")/$(DIST_PACKAGE)/guake/data/
@rm -rfv build *.egg-info

install-locale:
Expand Down Expand Up @@ -75,7 +76,7 @@ uninstall-schemas: uninstall-old-schemas
rm -f "$(PREFIX)/share/applications/guake-prefs.desktop"
rm -f "$(PREFIX)/share/pixmaps/guake.png"
rm -f "$(PREFIX)/share/glib-2.0/schemas/org.guake.gschema.xml"
rm -f $(PREFIX)/lib/python$(shell $(PYTHON_INTERPRETER) -c "import sys; v = sys.version_info; print('{}.{}'.format(v.major, v.minor))")/site-packages/guake/data/schema.guake.gschema.xml
rm -f $(PREFIX)/lib/python$(shell $(PYTHON_INTERPRETER) -c "import sys; v = sys.version_info; print('{}.{}'.format(v.major, v.minor))")/$(DIST_PACKAGE)/guake/data/schema.guake.gschema.xml
[ -d $(PREFIX)/share/glib-2.0/schemas/ ] && glib-compile-schemas $(PREFIX)/share/glib-2.0/schemas/ || true

uninstall-old-schemas:
Expand All @@ -84,7 +85,7 @@ uninstall-old-schemas:
@rm -f "$(OLD_PREFIX)/share/pixmaps/guake.png"
@rm -f "$(OLD_PREFIX)/share/glib-2.0/schemas/org.guake.gschema.xml"
@rm -f "$(OLD_PREFIX)/share/glib-2.0/schemas/schema.guake.gschema.xml"
@rm -f $(OLD_PREFIX)/lib/python$(shell $(PYTHON_INTERPRETER) -c "import sys; v = sys.version_info; print('{}.{}'.format(v.major, v.minor))")/site-packages/guake/data/schema.guake.gschema.xml
@rm -f $(OLD_PREFIX)/lib/python$(shell $(PYTHON_INTERPRETER) -c "import sys; v = sys.version_info; print('{}.{}'.format(v.major, v.minor))")/$(DIST_PACKAGE)/guake/data/schema.guake.gschema.xml
@glib-compile-schemas $(OLD_PREFIX)/share/glib-2.0/schemas/

compile-glib-schemas: clean-schemas
Expand Down

0 comments on commit a387ebc

Please sign in to comment.