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

Fix setup.py dependencies, link, and format #28

Closed

Conversation

VladimirSlavik
Copy link
Contributor

@VladimirSlavik VladimirSlavik commented Apr 29, 2020

Could this fix the dependencies problem #27?

@VladimirSlavik
Copy link
Contributor Author

It might be a good idea to change the maintainer or at least email too...

setup.py Outdated
url='https://github.com/rhinstaller/python-meh',
data_files=[('/usr/share/python-meh', ['ui/exception-dialog.glade'])],
packages=['meh', 'meh.ui'],
install_requires=['report', 'pydbus'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should me more requirements than just these two based on spec file.

Copy link
Contributor Author

@VladimirSlavik VladimirSlavik Apr 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed - now there's everything (I believe).

@pep8speaks
Copy link

pep8speaks commented Apr 30, 2020

Hello @VladimirSlavik! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-05-04 16:19:32 UTC

Copy link
Member

@jkonecny12 jkonecny12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't tested it but seems good to me.

Fixes: dependencies, author (maintainer) + email, link.
@VladimirSlavik
Copy link
Contributor Author

Hi @kloczek , can you please check if this fixes what you asked?

@kloczek
Copy link

kloczek commented May 4, 2020

OK one sec :)

@kloczek
Copy link

kloczek commented May 4, 2020

      install_requires=['dbus-python', 'PyGObject', 'report', 'rpm'])

That line dowes not adds any dependencies to egg-info files and it is install time dependency and these are not python pip dependencies but rpm packages names.
https://packaging.python.org/discussions/install-requires-vs-requirements/

$ for i in dbus-python PyGObject report rpm; do rpm -q --whatprovides python3dist\($i\); done
python3-dbus-1.2.16-1.fc33.x86_64
no package provides python3dist(PyGObject)
no package provides python3dist(report)
python-rpm-4.15.1-3.fc33.x86_64

Correct dependencies should add to egg-info dependencies for dbus-python and report dependencies.

Here is list of provided dependencies by dbus python module:

]$ rpm -q --qf "[%{PROVIDES} %{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}\n]\n" python3-dbus
python-dbus = 1.2.16-1.fc33
python3-dbus = 1.2.16-1.fc33
python3-dbus(x86-64) = 1.2.16-1.fc33
python3.8dist(dbus-python) = 1.2.16
python3dist(dbus-python) = 1.2.16               <<=== here that can be used

report python package does not have even egg-info description.

@kloczek
Copy link

kloczek commented May 4, 2020

Hrere is list of modules which needs meh:

[tkloczko@barrel python-meh-0.48]$ grep -r ^import -w | awk -F: '{print $2}'|sort| uniq
import bdb
import copy
import dbus
import gettext
import gi
import glob
import importlib
import inspect
import meh
import meh.dump
import meh.handler
import os
import report
import report.io.TextIO
import subprocess
import sys
import tempfile
import traceback
import unittest

Some does not need to be listed in dependencies as they are part of the python core.

@kloczek
Copy link

kloczek commented May 4, 2020

Below output woud be better on assesing which one modules shoud be added to esternal runtime dependencies:

[tkloczko@barrel python-meh-0.48]$ grep -r import -w | awk -F: '{print $2}'|sort| uniq| grep -v ^from
        from inspect import stack as _stack
import bdb
import copy
import dbus
import gettext
import gi
import glob
        import hashlib
import importlib
import inspect
import meh
import meh.dump
import meh.handler
        import meh.ui.gui
        import meh.ui.text
import os
        import pdb
import report
import report.io.TextIO
            import rpm
import subprocess
import sys
        import tempfile
import tempfile
import traceback
import unittest
    Move "import rpm" to where it's needed to avoid nameserver problems.
- Move "import rpm" to where it's needed to avoid nameserver problems (clumens).
    Pull in a missing import.
    remove unused import subprocess
    Use gi.require_version for Gtk import
- Use gi.require_version for Gtk import (vtrefny)

@VladimirSlavik
Copy link
Contributor Author

So... based on the above, clearly I don't know what I am doing :-/ I'll have to learn more about setup and distutils and that stuff.

@kloczek
Copy link

kloczek commented May 12, 2020

This is what I have now as static (not autogenerated python dependency:

Requires:       python3dist(dbus-python)

So definitelly dbus module on runtime taht dependency must be added.

@VladimirSlavik
Copy link
Contributor Author

A few months later, it's clear I can't find time to actually learn this. Thus closing. The prettifying parts are now in #30, so only the dependencies issue remains.

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

Successfully merging this pull request may close these issues.

4 participants