ueber-devel / ueberzug

Continuation of ueberzug
GNU General Public License v3.0
98 stars 6 forks source link

Installs its C source files to site-packages? #9

Open ionenwks opened 1 year ago

ionenwks commented 1 year ago

aka:

/usr/lib/python3.11/site-packages/ueberzug/X/X.c
/usr/lib/python3.11/site-packages/ueberzug/X/X.h
/usr/lib/python3.11/site-packages/ueberzug/X/Xshm.c
/usr/lib/python3.11/site-packages/ueberzug/X/Xshm.h
/usr/lib/python3.11/site-packages/ueberzug/X/display.c
/usr/lib/python3.11/site-packages/ueberzug/X/display.h
/usr/lib/python3.11/site-packages/ueberzug/X/math.h
/usr/lib/python3.11/site-packages/ueberzug/X/python.h
/usr/lib/python3.11/site-packages/ueberzug/X/util.h
/usr/lib/python3.11/site-packages/ueberzug/X/window.c
/usr/lib/python3.11/site-packages/ueberzug/X/window.h

Also getting a setuptools warning (using setuptools-67.6.1):

/usr/lib/python3.11/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing '
ueberzug.X' as data is deprecated, please list it in `packages`.
    !!

    ############################
    # Package would be ignored #
    ############################
    Python recognizes 'ueberzug.X' as an importable package,
    but it is not listed in the `packages` configuration of setuptools.

    'ueberzug.X' has been automatically added to the distribution only
    because it may contain data files, but this behavior is likely to change
    in future versions of setuptools (and therefore is considered deprecated).

    Please make sure that 'ueberzug.X' is included as a package by using
    the `packages` configuration field or the proper discovery methods
    (for example by using `find_namespace_packages(...)`/`find_namespace:`
    instead of `find_packages(...)`/`find:`).

    You can read more about "package discovery" and "data files" on setuptools
    documentation page.
eylles commented 1 year ago

ah yeh, that is somewhat of a tricky issue as it is more of a packaging caveat created when seebye dropped the python xlib, and it is one of the reasons i'm low key waiting until one distro packages it, as not long ago there was a change on the PEP standars and i would also be interested in having more control over the compilation of the c extension, i'm considering meson + ninja if a simple makefile doesn't suffice.

ionenwks commented 1 year ago

If using meson, may be interested in the semi-new https://github.com/mesonbuild/meson-python/ for PEP517.

As a distro packager, I'd rather not see homebrew solutions like a Makefile (esp. for anything involving python). That aside, in the current situation I could just rm -r excess files and ignore the deprecation warning for now, so it's not a major issue.

eylles commented 1 year ago

Thanks, will look into meson-python and implement to build the c extension, will see if i can make a point release before the end of this month.

As always feedback is appreciated.