[mythtv-commits] [MythTV/mythtv] 7913ac: Python Bindings: Move version info into own file.

Roland Ernst noreply at github.com
Mon May 15 19:42:39 UTC 2023


  Branch: refs/heads/master
  Home:   https://github.com/MythTV/mythtv
  Commit: 7913ac14b625bb439504ba052966ca58c634fbcc
      https://github.com/MythTV/mythtv/commit/7913ac14b625bb439504ba052966ca58c634fbcc
  Author: Roland Ernst <rcrernst at gmail.com>
  Date:   2023-05-15 (Mon, 15 May 2023)

  Changed paths:
    M mythtv/bindings/python/MythTV/.gitignore
    M mythtv/bindings/python/MythTV/__init__.py
    A mythtv/bindings/python/MythTV/_versions.py.in
    A mythtv/bindings/python/MythTV/static.py
    R mythtv/bindings/python/MythTV/static.py.in
    M mythtv/configure

  Log Message:
  -----------
  Python Bindings: Move version info into own file.

The version information is generated during 'configue' into
a dedicated file. This separates the version info from other
global and static variables used within the package MythTV.
The 'INSTALL_PREFIX' is also generated on the fly. This will
ease the build process of the Python Bindings in the future.

Refs MythTV#731


  Commit: 2e628f8f5d68405fb60526c23da2348550853283
      https://github.com/MythTV/mythtv/commit/2e628f8f5d68405fb60526c23da2348550853283
  Author: Roland Ernst <rcrernst at gmail.com>
  Date:   2023-05-15 (Mon, 15 May 2023)

  Changed paths:
    M mythtv/bindings/python/Makefile
    M mythtv/bindings/python/setup.py

  Log Message:
  -----------
  Python: simplify build process via setuptools

Since the 'INSTALL_PREFIX' used within the Python Bindings is now
generated by configure in the file '_versions.py', there is no need
to rewrite the file 'static.py' anymore.
This commit removes now the unnecessary code.

Refs MythTV#731


  Commit: 8ece26b8a3e9cb41ec4c7a192cbbbf61551433ce
      https://github.com/MythTV/mythtv/commit/8ece26b8a3e9cb41ec4c7a192cbbbf61551433ce
  Author: Roland Ernst <rcrernst at gmail.com>
  Date:   2023-05-15 (Mon, 15 May 2023)

  Changed paths:
    M mythtv/bindings/python/.gitignore
    M mythtv/bindings/python/Makefile
    A mythtv/bindings/python/pyproject.toml
    M mythtv/configure

  Log Message:
  -----------
  Python: Adapt configure and make to use python-pip

Since Pythons Setuptools deprecates the 'setup.py install' sequence,
Python PIP will be used on newer python versions as a build frontend
implementing the guidline described in PEP 517 (1).

Albeit this eliminates the deprecation warning
"SetuptoolsDeprecationWarning: setup.py install is deprecated.
Use build and pip and other standards-based tools.",
it creates other pitfalls because Python is moving towards PEP 688 (2)
which clearly describes the ownership of python packages.
When doing a 'configure, make, sudo make install' sequence,
one will get a warning
"WARNING: Running pip as the 'root' user can result in broken
permissions and conflicting behaviour with the system package manager."
which is true for MythTV. This should remind a user to first uninstall
MythTVs packages previously installed by the sytems installation manager.
The environemt variable "PIP_ROOT_USER_ACTION=ignore" silences this
warning.

If a OS distribution protects it's python package by the file
'EXTERNALLY-MANAGED' as described in PEP 688 and the root-flag is not
set, pip will not install packages in these locations.
The environment variable "PIP_BREAK_SYSTEM_PACKAGES=1" overrides this
behaviour.
This reminds the operator to better build system-packages and let the
standard OS installer know of these packages and install them.

(1) https://peps.python.org/pep-0517/
(2) https://peps.python.org/pep-0668/

Refs MythTV#731


  Commit: efecea0cd4ad19b93c148c56bca047ad694db8a1
      https://github.com/MythTV/mythtv/commit/efecea0cd4ad19b93c148c56bca047ad694db8a1
  Author: Roland Ernst <rcrernst at gmail.com>
  Date:   2023-05-15 (Mon, 15 May 2023)

  Changed paths:
    M mythtv/bindings/python/MythTV/_versions.py.in

  Log Message:
  -----------
  Python Bindings: Fix INSTALL_PREFIX in _versions.py.in

The NSTALL_PREFIX in _versions.py.in needs to be surrounded by
single quotes, because it is a string.

Refs #731


Compare: https://github.com/MythTV/mythtv/compare/74864b5fe4c6...efecea0cd4ad


More information about the mythtv-commits mailing list