Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gschema and desktop files not copied during setup #25

Closed
user234683 opened this issue Feb 14, 2020 · 4 comments
Closed

gschema and desktop files not copied during setup #25

user234683 opened this issue Feb 14, 2020 · 4 comments

Comments

@user234683
Copy link

Specifically, the files apps.volctl.gschema.xml and volctl.desktop in the data_files in setup.py are not copied to their correct locations during setup. This results in (volctl:10047): GLib-GIO-ERROR **: 21:25:05.356: Settings schema 'apps.volctl' is not installed. I fixed the issue by copying the files manually.

Since the setuptools docs say that data_files are relative to either site.USER_BASE or sys.prefix, I checked these values in a python interpreter. They are /home/[username]/.local and /usr respectively. I checked the directories relative to both of these locations and the files were not copied. I also checked the standard GSettings schema directories listed in the XDG_DATA_DIRS environment variable and did not find the schema file in them.

Environment: Debian Buster 10.2.0, XFCE 4.12, Python 2.7.16, setuptools 40.8.0 (installed from the python-setuptools 40.8.0-1 debian package).

Installation log:

$ sudo ./setup.py install
running install
running bdist_egg
running egg_info
writing volctl.egg-info/PKG-INFO
writing top-level names to volctl.egg-info/top_level.txt
writing dependency_links to volctl.egg-info/dependency_links.txt
writing entry points to volctl.egg-info/entry_points.txt
reading manifest file 'volctl.egg-info/SOURCES.txt'
writing manifest file 'volctl.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/volctl
copying volctl/pulseaudio.py -> build/lib.linux-x86_64-2.7/volctl
copying volctl/prefs.py -> build/lib.linux-x86_64-2.7/volctl
copying volctl/app.py -> build/lib.linux-x86_64-2.7/volctl
copying volctl/meta.py -> build/lib.linux-x86_64-2.7/volctl
copying volctl/tray.py -> build/lib.linux-x86_64-2.7/volctl
copying volctl/__main__.py -> build/lib.linux-x86_64-2.7/volctl
copying volctl/lib_pulseaudio.py -> build/lib.linux-x86_64-2.7/volctl
copying volctl/slider_win.py -> build/lib.linux-x86_64-2.7/volctl
copying volctl/__init__.py -> build/lib.linux-x86_64-2.7/volctl
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/volctl
copying build/lib.linux-x86_64-2.7/volctl/pulseaudio.py -> build/bdist.linux-x86_64/egg/volctl
copying build/lib.linux-x86_64-2.7/volctl/prefs.py -> build/bdist.linux-x86_64/egg/volctl
copying build/lib.linux-x86_64-2.7/volctl/app.py -> build/bdist.linux-x86_64/egg/volctl
copying build/lib.linux-x86_64-2.7/volctl/meta.py -> build/bdist.linux-x86_64/egg/volctl
copying build/lib.linux-x86_64-2.7/volctl/tray.py -> build/bdist.linux-x86_64/egg/volctl
copying build/lib.linux-x86_64-2.7/volctl/__main__.py -> build/bdist.linux-x86_64/egg/volctl
copying build/lib.linux-x86_64-2.7/volctl/lib_pulseaudio.py -> build/bdist.linux-x86_64/egg/volctl
copying build/lib.linux-x86_64-2.7/volctl/slider_win.py -> build/bdist.linux-x86_64/egg/volctl
copying build/lib.linux-x86_64-2.7/volctl/__init__.py -> build/bdist.linux-x86_64/egg/volctl
byte-compiling build/bdist.linux-x86_64/egg/volctl/pulseaudio.py to pulseaudio.pyc
byte-compiling build/bdist.linux-x86_64/egg/volctl/prefs.py to prefs.pyc
byte-compiling build/bdist.linux-x86_64/egg/volctl/app.py to app.pyc
byte-compiling build/bdist.linux-x86_64/egg/volctl/meta.py to meta.pyc
byte-compiling build/bdist.linux-x86_64/egg/volctl/tray.py to tray.pyc
byte-compiling build/bdist.linux-x86_64/egg/volctl/__main__.py to __main__.pyc
byte-compiling build/bdist.linux-x86_64/egg/volctl/lib_pulseaudio.py to lib_pulseaudio.pyc
byte-compiling build/bdist.linux-x86_64/egg/volctl/slider_win.py to slider_win.pyc
byte-compiling build/bdist.linux-x86_64/egg/volctl/__init__.py to __init__.pyc
installing package data to build/bdist.linux-x86_64/egg
running install_data
creating build/bdist.linux-x86_64/egg/share
creating build/bdist.linux-x86_64/egg/share/applications
copying data/volctl.desktop -> build/bdist.linux-x86_64/egg/share/applications
creating build/bdist.linux-x86_64/egg/share/glib-2.0
creating build/bdist.linux-x86_64/egg/share/glib-2.0/schemas
copying data/apps.volctl.gschema.xml -> build/bdist.linux-x86_64/egg/share/glib-2.0/schemas
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying volctl.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying volctl.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying volctl.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying volctl.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying volctl.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/volctl-0.6.2-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing volctl-0.6.2-py2.7.egg
Copying volctl-0.6.2-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding volctl 0.6.2 to easy-install.pth file
Installing volctl script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/volctl-0.6.2-py2.7.egg
Processing dependencies for volctl==0.6.2
Finished processing dependencies for volctl==0.6.2
$ sudo update-desktop-database
$ sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
$ volctl

(volctl:10047): GLib-GIO-ERROR **: 21:25:05.356: Settings schema 'apps.volctl' is not installed
Trace/breakpoint trap

This setuptools issue might be related since I noticed that it created a .egg file in /usr/local/lib/python2.7/dist-packages. I'm new to Linux so I might be missing something obvious.

@buzz
Copy link
Owner

buzz commented Mar 17, 2020

Python 2 is not maintained after January 1, 2020. Could you try again using a recent version of Python?

@buzz
Copy link
Owner

buzz commented Aug 7, 2020

Close due to inactivity.

@buzz buzz closed this as completed Aug 7, 2020
@user234683
Copy link
Author

user234683 commented Dec 14, 2022

@buzz This problem still happens with python 3.9.2. python3-setuptools version: 52.0.0-4

@buzz
Copy link
Owner

buzz commented Dec 15, 2022

This is expected behavior.

As far as I know setuptools won't copy schema files. You're doing a manual installation, so you need to take care of this yourself. It's also stated explicitly in the README.md.

If someone would maintain a Debian package for volctl, Debian packaging would take care of this. I won't be able to maintain such a package as I'm not a Debian user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants