#40 Add explicit requirement on tzdata (needed for zoneinfo)
Merged 5 years ago by churchyard. Opened 5 years ago by churchyard.
rpms/ churchyard/python3.9 tzdata  into  master

file modified
+7
@@ -237,6 +237,7 @@ 

  BuildRequires: tcl-devel

  BuildRequires: tix-devel

  BuildRequires: tk-devel

+ BuildRequires: tzdata

  

  %if %{with valgrind}

  BuildRequires: valgrind-devel
@@ -515,6 +516,9 @@ 

  # we recommend it when tk is already installed (for better UX)

  Recommends: (%{pkgname}-tkinter%{?_isa} = %{version}-%{release} if tk%{?_isa})

  

+ # The zoneinfo module needs tzdata

+ Requires: tzdata

+ 

  # https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package

  # In Fedora 31, several "unversioned" files like /usr/bin/pydoc and all the

  # "unversioned" provides were moved from python2 to python3.
@@ -694,6 +698,9 @@ 

  Provides: bundled(python3dist(setuptools)) = %{setuptools_version}

  %endif

  

+ # The zoneinfo module needs tzdata

+ Requires: tzdata

+ 

  # The description for the flat package (SRPM and built)

  %description

  Python %{pybasever} package for developers.

See https://twitter.com/pganssle/status/1327344516475531272

Not bumping a release, tzdata is pulled in transitively, so the impact is minimal.

Build failed.

Funny:

/builddir/build/BUILD/Python-3.9.0/Modules/_weakref.c:131:5: error: '_WEAKREF_GETWEAKREFCOUNT_METHODDEF' undeclared here (not in a function)
  131 |     _WEAKREF_GETWEAKREFCOUNT_METHODDEF
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/Python-3.9.0/Modules/_weakref.c:132:5: error: expected '}' before '_WEAKREF__REMOVE_DEAD_WEAKREF_METHODDEF'
  132 |     _WEAKREF__REMOVE_DEAD_WEAKREF_METHODDEF
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

LGTM.

_WEAKREF_GETWEAKREFCOUNT_METHODDEF macro is defined by Modules/clinic/_weakref.c.h which is included by Modules/_weakref.c (at line 13).

Build succeeded.

_WEAKREF_GETWEAKREFCOUNT_METHODDEF macro is defined by Modules/clinic/_weakref.c.h which is included by Modules/_weakref.c (at line 13).

Yes, but why has the first build attempt failed? Is it a race condition?

Yes, but why has the first build attempt failed? Is it a race condition?

Does the Fedora package run "make regen-all"? If yes, maybe there is a race condition in the "clinic" target. Is make run with multiple jobs in parallel (-j option)?

Pull-Request has been merged by churchyard

5 years ago

Yes, but why has the first build attempt failed? Is it a race condition?

Yes, there is a race condition when "make regen-all" is run with make -jN option to run jobs in parallel. The root issue is that "make clinic" does not use atomic file writes.

I reported the issue to upstream as https://bugs.python.org/issue42398 and I proposed https://github.com/python/cpython/pull/23362 to fix it.

I reported the issue to upstream as https://bugs.python.org/issue42398 and I proposed https://github.com/python/cpython/pull/23362 to fix it.

It's now fixed upstream in 3.8, 3.9 and master branches ;-)

Metadata