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

Help Wanted #44

Open
Roger opened this issue Feb 12, 2018 · 31 comments
Open

Help Wanted #44

Roger opened this issue Feb 12, 2018 · 31 comments

Comments

@Roger
Copy link
Owner

Roger commented Feb 12, 2018

I don't have a lot of time this days to work with this project, so I'm looking for people who wants to mantain it, currently is working as I want but could have some improvements, like finishing #25 or releasing new versions(the last one it's from 2014), also packaging on archlinux should have some improvements.

If anyone it's interested, please let me know.

@orestisfl
Copy link

I can help with the archlinux package, what improvements would you like?

@vchimishuk
Copy link
Contributor

@orestisf1993, actually I'm working on that. We want to add support for recently added man page.

@Roger
Copy link
Owner Author

Roger commented Feb 13, 2018

Would be cool to make the PKGBUILD follows the arch packaging standards, iirc we have to add numpy as an optdep and if we fix the releases, we can also add an stable package(not git one)

@vchimishuk
Copy link
Contributor

vchimishuk commented Feb 13, 2018

if we fix the releases

@Roger, what do you mean here under the "fix"?

@Roger
Copy link
Owner Author

Roger commented Feb 13, 2018

I only mean, have a new release, the last one is from 2014

@vchimishuk
Copy link
Contributor

I've updated PKGBUILD. Changes: added some dependencies, use recommended package version, package man page.

@trinaldi
Copy link
Contributor

Sent a PR #54

@Roger
Copy link
Owner Author

Roger commented Jan 12, 2020

@vchimishuk just released new version "1.0.0" can you check the aur package and maybe is time to release a non git version, downloaded from pypi

@vchimishuk
Copy link
Contributor

Thanks, @Roger. Will do it soon.

@vchimishuk
Copy link
Contributor

@Roger, I have a problem to make the latest version works. I have the same issue for Python 2 & 3. Looks like there is some issue in setup.py. Could you help me with that, please?

$ escrotum
Traceback (most recent call last):
  File "/usr/bin/escrotum", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3252, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'gobject' distribution was not found and is required by escrotum
$

@Roger
Copy link
Owner Author

Roger commented Jan 30, 2020

@vchimishuk this depends on python-gobject, I think we need to add that as a dependency in the PKGBUILD, btw, python2 is not supported anymore in latest version

@vchimishuk
Copy link
Contributor

@Roger, the thing is it is installed and present in PKGBUILD. Also, I've tried to experiment with gi instead of gobject in setup.py, as was suggested under some similar issues in Internet -- it doesn't work either.

https://files.vchimishuk.pp.ua/a3d5677b-7997-4ff0-bf7d-2ed2212db37b

@trinaldi
Copy link
Contributor

trinaldi commented Jan 31, 2020

Replace git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' for git describe --abbrev=0 --tags and it should work. I tested and it seems fine. Somehow the first command is point to the older version.

My PKGBUILD, just in case:

# Maintainer: roger <[email protected]>

pkgname=escrotum-git
pkgver=1.0.1
pkgrel=1
pkgdesc="Screen capture using pygtk, inspired by scrot"
arch=('i686' 'x86_64')
url="https://github.com/Roger/escrotum"
license=('GPL3')
groups=()
depends=('python' 'python-distribute' 'python-gobject' 'python-xcffib' 'pygtk')
makedepends=('git' 'python-setuptools')
optdepends=('python-numpy: fast image generation')
provides=('escrotum=1.0.1')
source=('git://github.com/Roger/escrotum.git')
md5sums=('SKIP')

_gitname="escrotum"

pkgver() {
  cd $_gitname
  git describe --abbrev=0 --tags
}

package() {
  cd $_gitname

  # sed -i 's/gobject/gi/' setup.py

  # install
  msg "Running setup.py"
  python setup.py install --root="${pkgdir}" --prefix=/usr
  install -d "${pkgdir}/usr/share/man/man1"
  install man/escrotum.1 "${pkgdir}/usr/share/man/man1"

}

@vchimishuk
Copy link
Contributor

@trinaldi, strange things here. Your PKGBUILD causes the same exception at the end. I've checked the actual files installed with the package and it is the latest version from Github repo.

@trinaldi
Copy link
Contributor

trinaldi commented Feb 1, 2020 via email

@vchimishuk
Copy link
Contributor

I'm not familiar with easy install and stuff, but it looks like problem somewhere on that level. I can import the package when running python shell.

[vchimishuk@t420 escrotum-git] $ python
Python 3.8.1 (default, Jan 22 2020, 06:38:00) 
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pkg_resources import load_entry_point
>>> load_entry_point
<function load_entry_point at 0x7fc91023bdc0>
>>> 

@vchimishuk
Copy link
Contributor

[vchimishuk@t420 escrotum-git] $ python
Python 3.8.1 (default, Jan 22 2020, 06:38:00) 
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> __requires__ = 'escrotum==1.0.1'
>>> from pkg_resources import load_entry_point
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3252, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'gobject' distribution was not found and is required by escrotum
>>> 

And this doesn't work.

@trinaldi
Copy link
Contributor

trinaldi commented Feb 1, 2020

I'm not able to reproduce it:

~/bin/escrotum (master ✔) ᐅ python
Python 3.8.1 (default, Jan 22 2020, 06:38:00) 
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> __requires__ = 'escrotum==1.0.1'
>>> from pkg_resources import load_entry_point
>>> 

Can you post the output from pacman -Qs python(2?)-gobject ?

@vchimishuk
Copy link
Contributor

vchimishuk commented Feb 1, 2020

[vchimishuk@t420 vchimishuk] $ pacman -Qs python2-gobject
local/python2-gobject 3.34.0-3
    Python2 Bindings for GLib/GObject/GIO/GTK+
local/python2-gobject2 2.28.7-4
    Legacy Python 2 bindings for GObject
[vchimishuk@t420 vchimishuk] $ 

Could you send me the escrotum-git package built by you, please? I want to compare its contents with one built on my machine. You can use my email to send it: vchimishuk living on yandex.ru domain.

@trinaldi
Copy link
Contributor

trinaldi commented Feb 1, 2020

My output is:

~/bin/escrotum (master ✔) ᐅ pacman -Qs python(2?)-gobject
local/python-gobject 3.34.0-3
    Python Bindings for GLib/GObject/GIO/GTK+
local/python2-gobject 3.34.0-3
    Python2 Bindings for GLib/GObject/GIO/GTK+
local/python2-gobject2 2.28.7-4
    Legacy Python 2 bindings for GObject

I'll send the .tar.xz file, sure.

EDIT: Make sure you also have python-gobject installed. I tried removing it in able to reproduce your error and:

~/bin ᐅ sudo pacman -R python-gobject
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
...
:: removing python-gobject breaks dependency 'python-gobject' required by escrotum-git
...

It's worth a look :)

@vchimishuk
Copy link
Contributor

vchimishuk commented Feb 1, 2020

Yeah, I have it. Here is the list of all installed python packages on my machine. https://files.vchimishuk.pp.ua/6638c325-d164-4708-bfd9-e7eab4718b2c
Maybe you can send me yours and I'll try to compare? Maybe some setuptool related package is missed or something.

P. S.
Our .tar.xz files are almost identical.

P. S. S.
yaourt -Qs python | grep '^[^ ].*python' | sort

@trinaldi
Copy link
Contributor

trinaldi commented Feb 1, 2020

All my packages, including Python[2]'s, are described in the BUILDINFO file inside the package.

@vchimishuk
Copy link
Contributor

Very strange. I have installed all the python-* packages are present in your list -- same error.

@trinaldi
Copy link
Contributor

trinaldi commented Feb 1, 2020

Indeed. I'm not sure what you can do. Try some Gtk related packages? I'm just brainstorming here... I used GNOME for a long time before i3, maybe some GNOME related package and/or required packages?

@vchimishuk
Copy link
Contributor

I've tried all python3 related packages, still cannot find the issue. Thanks, @trinaldi. Will try to dig it further.

@guyonvarch
Copy link

I wrote this derivation that builds escrotum at version 1.0.1 with nix:
guyonvarch/nixpkgs@dd09550

It requires #56 and #57, that are currently applied as patches in the derivation.

The produced binary works, but it returns some warnings:

(.escrotum-wrapped:426): Gtk-WARNING **: 10:31:36.396: Theme parsing error: gtk.css:68:35: The style property GtkButton:child-displacement-x is deprecated and shouldn't be used anymore. It will be removed in a future version

(.escrotum-wrapped:426): Gtk-WARNING **: 10:31:36.396: Theme parsing error: gtk.css:69:35: The style property GtkButton:child-displacement-y is deprecated and shouldn't be used anymore. It will be removed in a future version

(.escrotum-wrapped:426): Gtk-WARNING **: 10:31:36.396: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version
No numpy support, saving would be slower

(.escrotum-wrapped:426): GdkPixbuf-WARNING **: 10:31:37.631: Unrecognized parameter (quality) passed to PNG saver.
2020-02-19-103137_1920x1080_escrotum.png

It seems that numpy is not available to escrotum, the derivation may be missing something.

@trinaldi
Copy link
Contributor

Nice, @guyonvarch .

As I've mentioned, my DE was GNOME and probably some requirements were being met.
A simple search using the warning message can help with it. I've seen some threads but I haven't tried anything.

@SammysHP
Copy link
Contributor

@trinaldi

Replace git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' for git describe --abbrev=0 --tags and it should work. I tested and it seems fine. Somehow the first command is point to the older version.

This is the wrong approach. Tags up to 0.2.1 are annotated tags, but 1.0.0 and 1.0.1 are not, thus they are not considered as a release. The proper fix is to create the next tag with git tag -a to create an annotated tag.

@SammysHP
Copy link
Contributor

Independent of this issue I created a new PKGBUILD from scratch using the latest Arch Python packaging guidelines and some simplifications.

pkgname=escrotum-git
pkgver=0.2.1.r41.e7ed25d
pkgrel=1
pkgdesc='Linux screen capture using pygtk, inspired by scrot'
arch=('x86_64')
url='https://github.com/Roger/escrotum'
license=('GPL3')
depends=('python' 'python-gobject' 'python-xcffib')
makedepends=('git' 'python-setuptools')
optdepends=('python-numpy: fast image generation'
            'ffmpeg: screen recording')
provides=('escrotum')
source=('git+https://github.com/Roger/escrotum.git')
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/${pkgname%-git}"
  git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g'
}

build() {
  cd "$srcdir/${pkgname%-git}"
  python setup.py build
}

package() {
  cd "$srcdir/${pkgname%-git}"
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
  install -Dm644 "man/escrotum.1" "$pkgdir/usr/share/man/man1/escrotum.1"
}

@SammysHP
Copy link
Contributor

@guyonvarch

The produced binary works, but it returns some warnings:

(.escrotum-wrapped:426): Gtk-WARNING **: 10:31:36.396: Theme parsing error: gtk.css:68:35: The style property GtkButton:child-displacement-x is deprecated and shouldn't be used anymore. It will be removed in a future version

(.escrotum-wrapped:426): Gtk-WARNING **: 10:31:36.396: Theme parsing error: gtk.css:69:35: The style property GtkButton:child-displacement-y is deprecated and shouldn't be used anymore. It will be removed in a future version

(.escrotum-wrapped:426): Gtk-WARNING **: 10:31:36.396: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version
No numpy support, saving would be slower

(.escrotum-wrapped:426): GdkPixbuf-WARNING **: 10:31:37.631: Unrecognized parameter (quality) passed to PNG saver.
2020-02-19-103137_1920x1080_escrotum.png

It seems that numpy is not available to escrotum, the derivation may be missing something.

The first three warnings are from your GTK theme.

I don't get the warning about missing numpy with my PKGBUILD.

But I get the last error Unrecognized parameter (quality) passed to PNG saver..

@jorgicio
Copy link

jorgicio commented Jun 8, 2020

Hi.
Yesterday, I just started to maintain this package for Gentoo. It's in my overlay.
https://github.com/jorgicio/jorgicio-gentoo-overlay

Greetings!

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

No branches or pull requests

7 participants