[SOLVED] Slackware current - Openssl and python2 update broke python-setuptools?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yea, those slackbuilds on SBo are one of the reasons I tried python2 first, they would need to be updated if caffeine-ng was going to work with python3 on Slackware. Also I would change the caffeine-ng slackbuild to be python3 only then. Of course anyone could always change the slackbuilds manually to use python3, it would not be hard. I would guess that a python3 setuptools slackbuild might also be needed.
The one downside I see so far from using python2 is that python3-xlib which despite its name builds fine with python2 would conflict with the python-xlib slackbuild at SBo which does not work for caffeine-ng.
The one downside I see so far from using python2 is that python3-xlib which despite its name builds fine with python2 would conflict with the python-xlib slackbuild at SBo which does not work for caffeine-ng.
Maybe it could be just a matter of version-bump; on SBo-git python-xlib is at 0.14 and your python3-xlib installs 0.15. It seems to work; I got a coffee-cup in my tray; now I have to see whether it actually prevents the black screen of time-out when watching a video or doing a slideshow.... ;-) (for some reason setting the 'presentation mode' in the power/battery applet doesn't seem to interfere with this....or I forget to set this...)
Its not, I tried python-xlib-0.15rc1. Do let me know if you have any issues with it, short of seeing it disable xscreensaver I have not tested it very much in Slackware yet.
Hi, I do not thinks it works properly; at least at my end. After start up and caffeine being in the tray, the screen saver kicks in. Then, after activating caffeine it is turned off as expected. But then, clicking the damp from the coffee-cup away the screen-saver stays off although it is supposed to work again. When running from the terminal, the messages indicate this but also a subsequent notification as if -after deactivation of caffeine- it resets itself (?) to being active again...
Options:
-a --activate Disables power management and screen saving.
-d --deactivate Re-enables power management and screen saving.
-t --time <HH>:<MM> Use with -a. Activate caffeine for HH:MM.
-p --preferences Start with the Preferences dialog open.
INFO:caffeine.main:User has clicked the Caffeine icon
INFO:caffeine.core:Inhibitor caffeine.inhibitors.DpmsInhibitor is applicable, running it.
INFO:caffeine.core:Inhibitor caffeine.inhibitors.XorgInhibitor is applicable, running it.
<press-icon -> steam off>
INFO:caffeine.main:User has clicked the Caffeine icon
INFO:caffeine.core:Caffeine is now dormant; powersaving is re-enabled.
INFO:caffeine.core:Inhibitor caffeine.inhibitors.DpmsInhibitor is applicable, running it. <- why?
INFO:caffeine.core:Inhibitor caffeine.inhibitors.XorgInhibitor is applicable, running it. <- why?
also when only pressing the mouse down on the icon and then moving it away for release (to prevent two events on the applet) did not change this behavior.
I have uninstalled caffeine-ng now. I found out that now 'presentation mode' seems to be working on my battery/power-manager applet, I only I have to remember to turn that setting off when not needed...
When I find time, I'll check whether installing caffeine-ng and its dependencies in python3 will show the expected behaviour
I'm not really understanding your issue, maybe can you rephrase it? If I understand it correctly you start caffeine, click the icon to enable it and then click it again to disable it, but power management does not resume?
It seems to disable or re-enable xscreensaver appropriately through any combination of the command-line or when clicking the tray icon here, but I only have xscreensaver. What are programs are you expecting it to disable/enable?
If I understand it correctly you start caffeine, click the icon to enable it and then click it again to disable it, but power management does not resume?
yes
Quote:
It seems to disable or re-enable xscreensaver appropriately through any combination of the command-line or when clicking the tray icon here, but I only have xscreensaver. What are programs are you expecting it to disable/enable?
I only use screen-blanking for power-saving (by just setting this in xfce-power manager settings); I do not have xscreensaver installed. With caffeine running, the screen is turned off after the set time of inactivity (say 1 min). But once I have activated caffeine to prevent this blanking to read some bit on the screen and after this turn caffeine off (caffeine -d) the screen is never turned off anymore. I suspect that something is missing to transfer the action; the program responds with the expected message but then the inhibitor is still running (that's why I marked those lines with "<- why?")
Those lines you marked with why appear to be normal, I get them as well with both arch (Which caffeine-ng is developed on) and slackware.
I'm not sure why your power management is not being re-enabled, but its not explained in your term output unfortunately.
When you have a chance can you apply these patches to the SlackBuild directories and rebuild them to see if the problem still occurs with python3? There are now two new required dependencies, python3 and dbus-python3.
diff -urN ../docopt/README docopt/README
--- ../docopt/README 2016-03-12 10:33:48.010018348 -0800
+++ docopt/README 2016-03-12 09:42:51.460301416 -0800
@@ -1,3 +1,5 @@
docopt helps you
* define interface for your command-line app
* automatically generate parser for it.
+
+Python3 is an optional dependency.
\ No newline at end of file
diff -urN ../docopt/docopt.SlackBuild docopt/docopt.SlackBuild
--- ../docopt/docopt.SlackBuild 2016-03-12 10:33:48.010018348 -0800
+++ docopt/docopt.SlackBuild 2016-03-12 09:45:45.025737023 -0800
@@ -24,7 +24,7 @@
PRGNAM=docopt
VERSION=${VERSION:-0.6.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -71,6 +71,11 @@
python setup.py install --root=$PKG
+# Python 3 support.
+if $(python3 -c 'import sys' 2>/dev/null); then
+ python3 setup.py install --root=$PKG
+fi
+
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
pyewmh
Code:
diff -urN ../pyewmh/README pyewmh/README
--- ../pyewmh/README 2016-03-12 10:33:48.010018348 -0800
+++ pyewmh/README 2016-03-12 09:41:50.317794882 -0800
@@ -1,2 +1,4 @@
An implementation of EWMH (Extended Window Manager Hints) for python, based on Xlib.
-It allows EWMH-compliant window managers (most modern WMs) to be queried and controlled.
\ No newline at end of file
+It allows EWMH-compliant window managers (most modern WMs) to be queried and controlled.
+
+Python3 is an optional dependency.
\ No newline at end of file
diff -urN ../pyewmh/pyewmh.SlackBuild pyewmh/pyewmh.SlackBuild
--- ../pyewmh/pyewmh.SlackBuild 2016-03-12 10:33:48.010018348 -0800
+++ pyewmh/pyewmh.SlackBuild 2016-03-12 09:41:37.268686722 -0800
@@ -24,7 +24,7 @@
PRGNAM=pyewmh
VERSION=${VERSION:-0.1.3}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -57,6 +57,11 @@
python setup.py install --root=$PKG
+# Python 3 support.
+if $(python3 -c 'import sys' 2>/dev/null); then
+ python3 setup.py install --root=$PKG
+fi
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a *.txt README.rst $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
python3-xlib
Code:
diff -urN ../python3-xlib/README python3-xlib/README
--- ../python3-xlib/README 2016-03-12 10:33:48.010018348 -0800
+++ python3-xlib/README 2016-03-12 09:40:57.882360140 -0800
@@ -3,5 +3,3 @@
for Python. This is possible to do since X client programs communicate with
the X server via the X protocol. The communication takes over TCP/IP, Unix
sockets, or any other streaming network protocol.
-
-This package will overwrite files that belong to the python-xlib package if installed.
diff -urN ../python3-xlib/python3-xlib.SlackBuild python3-xlib/python3-xlib.SlackBuild
--- ../python3-xlib/python3-xlib.SlackBuild 2016-03-12 10:33:48.010018348 -0800
+++ python3-xlib/python3-xlib.SlackBuild 2016-03-12 09:40:26.984103812 -0800
@@ -24,7 +24,7 @@
PRGNAM=python3-xlib
VERSION=0.15
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -55,7 +55,7 @@
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-python setup.py install --root $PKG
+python3 setup.py install --root $PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a PKG-INFO $PKG/usr/doc/$PRGNAM-$VERSION
diff -urN ../python3-xlib/python3-xlib.info python3-xlib/python3-xlib.info
--- ../python3-xlib/python3-xlib.info 2016-03-12 10:33:48.010018348 -0800
+++ python3-xlib/python3-xlib.info 2016-03-12 09:40:46.465265438 -0800
@@ -5,6 +5,6 @@
MD5SUM="26f409ac3964f8e07377f378dce64f17"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES=""
+REQUIRES="python3"
MAINTAINER="Hunter Sezen"
EMAIL="ovariegata@yahoo.com"
diff -urN ../python3-xlib/slack-desc python3-xlib/slack-desc
--- ../python3-xlib/slack-desc 2016-03-12 10:33:48.010018348 -0800
+++ python3-xlib/slack-desc 2016-03-12 10:23:26.888341733 -0800
@@ -6,7 +6,7 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-python3-xlib: python3-xlib (X Library module for Python)
+python3-xlib: python3-xlib (X Library module for Python3)
python3-xlib:
python3-xlib: The Python X library is intended to be a fully functional X
python3-xlib: client for Python programs. It is written entirely in Python, in
bash-4.3$ caffeine
Traceback (most recent call last):
File "/usr/bin/caffeine", line 9, in <module>
load_entry_point('caffeine-ng==3.3.3', 'gui_scripts', 'caffeine')()
File "/usr/lib64/python3.5/site-packages/setuptools-20.2.2-py3.5.egg/pkg_resources/__init__.py", line 549, in load_entry_point
File "/usr/lib64/python3.5/site-packages/setuptools-20.2.2-py3.5.egg/pkg_resources/__init__.py", line 2542, in load_entry_point
File "/usr/lib64/python3.5/site-packages/setuptools-20.2.2-py3.5.egg/pkg_resources/__init__.py", line 2202, in load
File "/usr/lib64/python3.5/site-packages/setuptools-20.2.2-py3.5.egg/pkg_resources/__init__.py", line 2208, in resolve
File "/usr/lib64/python3.5/site-packages/caffeine/main.py", line 38, in <module>
import gi
ImportError: No module named 'gi'
I adapted Pat's Slackbuild for l/pygobject3 as well as the slackdesc; I bet this can be improved on (the packagename is a bit cumbersome now); see attached. All run in a folder copied from the original source/l/pygobject3 of the slackware installation iso .
Quote:
bash-4.3$ caffeine
INFO:caffeine.core:Caffeine is starting up...
INFO:caffeine.main:User has clicked the Caffeine icon
INFO:caffeine.core:Inhibitor <class 'caffeine.inhibitors.DpmsInhibitor'> is applicable, running it.
INFO:caffeine.core:Inhibitor <class 'caffeine.inhibitors.XorgInhibitor'> is applicable, running it.
INFO:caffeine.main:User has clicked the Caffeine icon
INFO:caffeine.core:Caffeine is now dormant; powersaving is re-enabled.
INFO:caffeine.core:Inhibitor <class 'caffeine.inhibitors.DpmsInhibitor'> is applicable, running it.
INFO:caffeine.core:Inhibitor <class 'caffeine.inhibitors.XorgInhibitor'> is applicable, running it.
it runs and shows the same mesages as seen before; will test it later to see how my system reacts.
Pygobject3 is in current now but without the python3-clause of the SlackBuild for 14.1 you refer to, so that it only gets installed in python2.7.
EDIT: I also had to get setuptools installed for python3
I notice that a pid file is created in /tmp/ that is not removed after closing caffeine-ng; only [as it seems] after deleting this file form /tmp/ my power-management goes back to normal.. I also had noticed this when running from python2.
Yea, I was confused there. It seems at some point I built python3 into my local pygobject3 and forgot... So here is a slackbuild for just the python3 module for pygobjec3.
I don't think you need setuptools for python3, it seems bundled in with the python3 from SBo.
Edit: Also, caffeine cleans up the pid file correctly here if I close it by right clicking in the tray.
Edit2: The pid file is left over if you kill caffeine with a ctrl+c, is that what you are doing?
Edit: Also, caffeine cleans up the pid file correctly here if I close it by right clicking in the tray.
Edit2: The pid file is left over if you kill caffeine with a ctrl+c, is that what you are doing?
Yes, you're right. Only thing is that my screen-blanking still doesn't return to what I set it to after exiting caffeine-ng. Thus somehow after a first use of caffeine, display-management by xfce's power-manager seems no longer active, as I found with the python2 install (so a transfer to python3 might not be completely necessary). Maybe for screensaver-override it works fine but doesn't like to exchange tasks with other progs. I will install xscreensaver and see what happens.
I notice if I enable caffeine by clicking the tray icon and then try to quit it caffeine will get stuck forcing me to ctrl+c or kill it, but the pid file is still cleaned up and xscreensaver still starts.
Anyways python3 support has been added to docopt in the maintainer's repo and the pyxdg maintainer passed off the responsibility to me so I will update my caffeine-ng slackbuild and the other dependencies to use/support python3 when 14.2 comes out. It will be nice to avoid package conflicts like between python-xlib and python3-xlib as well avoid any potential future incompatibilities with upstream development.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.