Commit Graph

15 Commits

Author SHA1 Message Date
Richard W.M. Jones
72cfaff5c5 Update copyright dates for 2025
Automated using this command:

perl -pi.bak -e 's/(20[012][0-9])-20[12][01234]/$1-2025/g' `git ls-files`
2025-02-16 17:00:46 +00:00
Richard W.M. Jones
e2c7bddf10 Update copyright dates for 2023
Run this command across the source:

  perl -pi.bak -e 's/(20[012][0-9])-20[12][012]/$1-2023/g' `git ls-files`

and remove changes to po{,-docs}/*.po{,t} (these will be regenerated
later when we run 'make dist').
2023-02-07 10:50:48 +00:00
Richard W.M. Jones
26940f64a7 build: Replace Python distutils by sysconfig
This module has been deprecated in Python >= 3.10
(https://peps.python.org/pep-0632/).  Replace distutils.sysconfig with
sysconfig which is not quite a drop-in replacement.

This fix is incomplete as we still reference distutils in
python/setup.py.in.  However that is only used for PIP-style
distributions (make -C python sdist) which we don't really use or
recommend.

Thanks: Miro Hrončok
See-also: https://peps.python.org/pep-0632/
See-also: https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/N6ITYHLRWIDNYNXGPYG2ZHF3ZLQWZN7L/
2022-10-24 17:11:31 +01:00
Richard W.M. Jones
403d17a876 python: Drop support for Python 2.
Python 2 reached end of life on 2020-01-01:
https://python3statement.org/
https://pythonclock.org/

The minimum version required is now Python 3.4 (since that is the
version in Debian oldoldstable), but 3.6 is the minimum version that
I actually test.
2020-07-06 12:40:33 +01:00
Richard W.M. Jones
0e17236d7d Update copyright dates to 2020. 2020-03-06 19:32:32 +00:00
Richard W.M. Jones
4e90febbaa RHEL 7: python: Check for _Py_IsFinalizing.
This symbol is not present in Python 2.7 or 3.6.  It's not really
necessary to call this, it just avoids a crash in certain corner cases
when the interpreter is shutting down.  So make the call conditional
on the function existing.

Fixes commit e6f9e0b0f6.
2020-03-06 18:59:52 +00:00
Pino Toscano
5d8cca738e build: define HAVE_PYCODESTYLE in all the cases
Fixes commit cad3ea9e74 in case Python is
disabled, or not available.
2020-01-16 11:02:25 +01:00
Pino Toscano
cad3ea9e74 python: add a pycodestyle test
Look for pycodestyle, and use it to check all the Python sources (tests
and auxiliary scripts included) of the Python bindings.
2020-01-14 16:21:22 +01:00
Pino Toscano
a68a0298b5 python: remove compile time check for PyString_AsString
The PyString API is specific to Python < 3, replaced by PyBytes and
PyUnicode in Python 3+; hence, drop the compile time check, and use the
right API depending on the Python version.
2020-01-09 17:45:26 +01:00
Pino Toscano
c3728416fb python: assume support for Capsules
They were introduced in Python 2.7 and 3.1, so we can assume they exist
(as Python 2.7 is the minimum version required, and 3.0 is long gone).
2020-01-09 17:29:15 +01:00
Pino Toscano
d8cb64dbe7 build: enforce a minimum Python version
In case the Python bindings are enabled, enforce a minimum version.
Set this minimum version to 2.7, as it has been de-facto for a while
now.
2020-01-09 17:15:20 +01:00
Richard W.M. Jones
c4638739d6 python: PYTHON_LIBS is not set in Python 3.8 (RHBZ#1705482).
Python 3.8 no longer links C extensions to -lpython, instead relying
on the fact that the python binary itself already contains those
symbols.  This means $PYTHON_LIBS is empty and so the Python bindings
are not built.

Use a different test to see if the python module is available.
2019-05-31 13:07:25 +01:00
Richard W.M. Jones
05d4fcb64d Update copyright dates for 2019.
This command run over the source:

perl -pi.bak -e 's/(20[01][0-9])-2018/$1-2019/g' `git ls-files`
2019-01-08 11:58:30 +00:00
Richard W.M. Jones
212762c593 Update copyright dates for 2018.
Run the following command over the source:

  perl -pi.bak -e 's/(20[01][0-9])-2017/$1-2018/g' `git ls-files`
2018-01-04 15:30:10 +00:00
Richard W.M. Jones
fbf044a11c m4: Rename guestfs_*.m4 to guestfs-*.m4.
For consistency with other code.
2017-10-06 14:36:16 +01:00