Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1716526 - python-pystemd fails to build with Python 3.8
Summary: python-pystemd fails to build with Python 3.8
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pystemd
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL: https://copr.fedorainfracloud.org/cop...
Whiteboard:
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-06-03 14:40 UTC by Miro Hrončok
Modified: 2019-06-04 09:49 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-04 09:49:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2019-06-03 14:40:20 UTC
See https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/python-pystemd/ for actual logs. This report is automated and not very verbose, but feel free to ping me for help.

Comment 1 Neal Gompa 2019-06-03 21:30:53 UTC
Miro, does this commit fix the issue for you? https://github.com/facebookincubator/pystemd/commit/35d1e091f299a8b28f62d8a37d5cc87ec79ddb30

If it does, I can backport this to resolve the issue.

Comment 2 Miro Hrončok 2019-06-03 21:39:55 UTC
Looks reasonable. Will test.

Comment 3 Miro Hrončok 2019-06-03 21:42:18 UTC
May I push this (if it works)?

diff --git a/python-pystemd.spec b/python-pystemd.spec
index 18abd45..3d7ab50 100644
--- a/python-pystemd.spec
+++ b/python-pystemd.spec
@@ -13,6 +13,9 @@ License:        LGPLv2+
 URL:            https://github.com/facebookincubator/pystemd
 Source0:        https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
 
+# Python 3.8 support:
+Patch0:         %{url}/commit/35d1e091f299a8b28f62d8a37d5cc87ec79ddb30.patch
+
 BuildRequires:  gcc
 BuildRequires:  pkgconfig(libsystemd)
 BuildRequires:  python3-devel
@@ -41,7 +44,7 @@ service status from systemd point of view, avoiding subprocessing systemctl
 and then parsing the output to know the result.
 
 %prep
-%autosetup -n %{pypi_name}-%{version}
+%autosetup -n %{pypi_name}-%{version} -p1
 # Remove bundled egg-info
 rm -rf %{pypi_name}.egg-info

Comment 4 Miro Hrončok 2019-06-03 21:51:39 UTC
It fixes the issue, but there is another one:

pystemd/dbuslib.c:19315:15: note: in expansion of macro ‘__Pyx_PyCode_New’
19315 |     py_code = __Pyx_PyCode_New(
      |               ^~~~~~~~~~~~~~~~
In file included from /usr/include/python3.8/compile.h:5,
                 from /usr/include/python3.8/Python.h:137,
                 from pystemd/dbuslib.c:20:
/usr/include/python3.8/code.h:105:28: note: declared here
  105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
      |                            ^~~~~~~~~~
At top level:
pystemd/dbuslib.c:14108:14: warning: ‘__pyx_f_7pystemd_7dbuslib_path_decode’ defined but not used [-Wunused-function]
14108 | static char *__pyx_f_7pystemd_7dbuslib_path_decode(char *__pyx_v_path, char *__pyx_v_prefix) {
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: command 'gcc' failed with exit status 1


This means you need to recythonize the sources.

See the following examples:

https://src.fedoraproject.org/rpms/python-compreffor/pull-request/1
https://src.fedoraproject.org/rpms/python-http-parser/pull-request/2
https://src.fedoraproject.org/rpms/python-llfuse/pull-request/4
https://src.fedoraproject.org/rpms/python-pybloomfiltermmap/pull-request/1
https://src.fedoraproject.org/rpms/python-pykdtree/pull-request/1
https://src.fedoraproject.org/rpms/python-sep/pull-request/1
https://src.fedoraproject.org/rpms/python-shapely/pull-request/4
https://src.fedoraproject.org/rpms/python-ssh2-python/pull-request/1

Comment 5 Neal Gompa 2019-06-04 02:09:53 UTC
Miro, feel free to go ahead and do what's needed to make this work in rawhide. :)


Note You need to log in before you can comment on or make changes to this bug.