bsd-ac / wayland-desktop

Gentoo overlay for Wayland related ebuilds
https://gentoo.org
ISC License
61 stars 21 forks source link

gui-apps/nwg-panel #17

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hi, I'm using your repository for nwg-launchers and I'd like to add support for nwg-panel as well. I've written the ebuild for it and I'm happy to take responsibility for it as maintainer, or I can update the metadata.xml if you'd like to take ownership instead. The only hitch here is that dev-python/i3ipc is available from guru, not the gentoo repos. I'm not sure you feel about depending on packages from another overlay. Do you have any interest in keeping this in your overlay?

epsilon-0 commented 2 years ago

Hi, I'm using your repository for nwg-launchers and I'd like to add support for nwg-panel as well. I've written the ebuild for it and I'm happy to take responsibility for it as maintainer, or I can update the metadata.xml if you'd like to take ownership instead.

Yes, letting you be the maintainer is fine by me.

The only hitch here is that dev-python/i3ipc is available from guru, not the gentoo repos. I'm not sure you feel about depending on packages from another overlay. Do you have any interest in keeping this in your overlay?

I'd like the i3ipc package to be added here as well, that way it is easier to manage. Please update the PR here by adding the i3ipc package (as well as its live version, which is currently not there in guru).

Also please change the license to ISC in the ebuild header, and change the copyright to yourself. Something like

# Copyright 2021 Knoteye
# Distributed under the terms of the ISC License

But change the knoteye to your preferred real name.

I'll also leave comments in the ebuild for some small changes.

ghost commented 2 years ago

But change the knoteye to your preferred real name.

Unfortunately, I can't attach my real name to this identity online. I'd have approached you with a different one if I'd known. I'll be doing this within the next few days (I'm a bit busy at the moment). If you'd like to take the package anyway I can provide a CC0 copy for you relicense to yourself as ISC or something like that, I just wouldn't be able to maintain it here. Otherwise just go ahead and close this, and I'll keep it in my personal overlay.

epsilon-0 commented 2 years ago

But change the knoteye to your preferred real name.

Unfortunately, I can't attach my real name to this identity online. I'd have approached you with a different one if I'd known. I'll be doing this within the next few days (I'm a bit busy at the moment). If you'd like to take the package anyway I can provide a CC0 copy for you relicense to yourself as ISC or something like that, I just wouldn't be able to maintain it here. Otherwise just go ahead and close this, and I'll keep it in my personal overlay.

That is fine, no need to add your real name, keeping knoteye should be fine (I hope). Not like someone's gonna sue for an ebuild. I think of it as mostly for giving proper credit to contributors.

Just make the other changes (including the ISC change but give the copyright to yourself [knoteye]), and you can keep the maintainership.

ghost commented 2 years ago

Not like someone's gonna sue for an ebuild. I think of it as mostly for giving proper credit to contributors.

Oh, okay. I thought you were following gentoo's real name policy. Legally speaking copyright and authorship can be attributed to a pen name with no legal problems so that should be fine.

I fixed up the ebuild and added a live ebuild. I will add i3ipc tomorrow and then it will be ready.

epsilon-0 commented 2 years ago

I fixed up the ebuild and added a live ebuild. I will add i3ipc tomorrow and then it will be ready.

Sounds great!

ghost commented 2 years ago

Okay, take a look and let me know if there are any issues.

epsilon-0 commented 2 years ago

It looks good.

Another small change, please enable the tests for i3ipc and check if they are passing. I'm away from my main dev machine so can't test this myself. Here is the modified ebuild with tests enabled -

# Copyright 2021 knotteye <knotteye@waldn.net>
# Distributed under the terms of the ISC License

EAPI=7

PYTHON_COMPAT=( python3_9 )

inherit virtualx distutils-r1 git-r3

DESCRIPTION="An improved Python library to control i3wm and sway."
HOMEPAGE="https://github.com/altdesktop/i3ipc-python/"
EGIT_REPO_URI="https://github.com/altdesktop/i3ipc-python.git"
LICENSE="BSD"

SLOT="0"
RDEPEND="${DEPEND}
    $(python_gen_cond_dep '
        dev-python/python-xlib[${PYTHON_USEDEP}]
    ')
    test? (
        x11-wm/i3
        $(python_gen_cond_dep '
            dev-python/pytest-asyncio[${PYTHON_USEDEP}]
        ')
    )
"

distutils_enable_tests pytest

python_test() {
    distutils_install_for_testing
    virtx py.test --verbose
}
ghost commented 2 years ago

Testing gives strange results. On the live ebuild, all tests but test_shutdown_event.py pass. test_shutdown_event_reconnect fails once, then tries again and will hang until I kill the process:

 * Scanning for an open DISPLAY to start Xvfb ...
 * Starting Xvfb on $DISPLAY=1 ...
========================================= test session starts =========================================
platform linux -- Python 3.9.8, pytest-6.2.5, py-1.10.0, pluggy-1.0.0 -- /usr/bin/python3.9
cachedir: .pytest_cache
rootdir: /var/tmp/portage/dev-python/i3ipc-9999/work/i3ipc-9999, configfile: pytest.ini
plugins: asyncio-0.15.1
collecting ... collected 30 items

test/test_event_exceptions.py::TestEventExceptions::test_event_exceptions PASSED                [  3%]
test/test_get_bindings_modes.py::TestBindingModes::test_binding_modes PASSED                    [  6%]
test/test_get_config.py::TestGetConfig::test_get_config PASSED                                  [ 10%]
test/test_get_marks.py::TestGetMarks::test_get_marks PASSED                                     [ 13%]
test/test_leaves.py::TestLeaves::test_workspace_leaves PASSED                                   [ 16%]
test/test_restart.py::TestRestart::test_auto_reconnect PASSED                                   [ 20%]
test/test_shutdown_event.py::TestShutdownEvent::test_shutdown_event_reconnect FAILED            [ 23%]
test/test_ticks.py::TestTicks::test_tick_event PASSED                                           [ 26%]
test/test_window.py::TestWindow::test_window_event PASSED                                       [ 30%]
test/test_window.py::TestWindow::test_marks PASSED                                              [ 33%]
test/test_window.py::TestWindow::test_detailed_window_event PASSED                              [ 36%]
test/test_window.py::TestWindow::test_detailed_window_event_decorator PASSED                    [ 40%]
test/test_window.py::TestWindow::test_resize PASSED                                             [ 43%]
test/aio/test_event_exceptions.py::TestEventExceptions::test_event_exceptions PASSED            [ 46%]
test/aio/test_get_bindings_modes.py::TestBindingModes::test_binding_modes PASSED                [ 50%]
test/aio/test_get_config.py::TestGetConfig::test_get_config PASSED                              [ 53%]
test/aio/test_get_marks.py::TestGetMarks::test_get_marks PASSED                                 [ 56%]
test/aio/test_leaves.py::TestLeaves::test_workspace_leaves PASSED                               [ 60%]
test/aio/test_output.py::TestOutput::test_output PASSED                                         [ 63%]
test/aio/test_requests.py::TestResquests::test_requests PASSED                                  [ 66%]
test/aio/test_restart.py::TestRestart::test_auto_reconnect PASSED                               [ 70%]
test/aio/test_scratchpad.py::TestScratchpad::test_scratchpad PASSED                             [ 73%]
test/aio/test_shutdown_event.py::TestShutdownEvent::test_shutdown_event_reconnect 

On 2.2.1 I get this:

running install_egg_info
Copying i3ipc.egg-info to /var/tmp/portage/dev-python/i3ipc-2.2.1/work/i3ipc-2.2.1-python3_9/test/lib/i3ipc-2.2.1-py3.9.egg-info
running install_scripts
/var/tmp/portage/dev-python/i3ipc-2.2.1/temp/environment: line 2848: virtx: command not found
 * python3_9: running distutils-r1_run_phase _distutils-r1_clean_egg_info
>>> Completed testing dev-python/i3ipc-2.2.1

I don't know if you intended tests to be run on 2.2.1, I'm not sure how tests interact with ebuilds. I generally don't enable them.

epsilon-0 commented 2 years ago

Enabling tests is useful for easy validation when you update the package and check if it still compatible with the older versions of other packages. Else you have to install and manually see in day to day usage if things are crashing. OK, so far only that one test is failing, which is fine I guess.

I'll merge the package with the tests enabled for both 9999 and 2.2.1.

I suggest you take a look at how the final ebuild looks like and see how the tests are working.