List Arkiverade meddelande #40

Från: "Lewis G Rosenthal" <> Meddelandehuvud
Oavkodat meddelande
Ämne: Assertion error with pip building
Datum: Fri, 30 Sep 2022 22:18:58 -0400
Till: GNU Ports for eCS Mailing List <>


For a project (Privoxy), I got involved in building Mbed TLS ( Mbed TLS seems to require the Jinja2 Pyhthon module (

Unfortunately, pip (well, gcc, more likely) is having a hard time building wheel, as a prereq for MarkupCode, which itself is a prereq for Jinja2.

I've hackishly worked around the problem by removing line 91 from python3.9/site-packages/setuptools/command/

assert preserve_mode and preserve_times and not preserve_symlinks

What I'm failing to understand, however, is why the assertion fails in the first place. It seems perfectly reasonable, unless I'm missing something. Before I open a ticket for bww about this, I thought I might mention it here, in case anyone has any ideas.


Here's a bit of the output (mind the wrapping):


[j:\usr\lib\python3.9\site-packages] python pip install MarkupSafe
WARNING: The directory 'c:/home/default/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Collecting MarkupSafe
  Downloading MarkupSafe-2.1.1.tar.gz (18 kB)
  Preparing metadata ( ... done
Building wheels for collected packages: MarkupSafe
  Building wheel for MarkupSafe ( ... error
  error: subprocess-exited-with-error

  python bdist_wheel did not run successfully.
  exit code: 1

  [69 lines of output]
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.os2knix-3.9
  creating build/lib.os2knix-3.9/markupsafe
  copying src/markupsafe/ -> build/lib.os2knix-3.9/markupsafe
  copying src/markupsafe/ -> build/lib.os2knix-3.9/markupsafe
  running egg_info
  writing src/MarkupSafe.egg-info/PKG-INFO
  writing dependency_links to src/MarkupSafe.egg-info/dependency_links.txt
  writing top-level names to src/MarkupSafe.egg-info/top_level.txt
  reading manifest file 'src/MarkupSafe.egg-info/SOURCES.txt'
  reading manifest template ''
  no previously-included directories found matching 'docs/_build'
  warning: no previously-included files matching '*.pyc' found anywhere in distribution
  adding license file 'LICENSE.rst'
  writing manifest file 'src/MarkupSafe.egg-info/SOURCES.txt'
  copying src/markupsafe/_speedups.c -> build/lib.os2knix-3.9/markupsafe
  copying src/markupsafe/_speedups.pyi -> build/lib.os2knix-3.9/markupsafe
  copying src/markupsafe/py.typed -> build/lib.os2knix-3.9/markupsafe
  running build_ext
  building 'markupsafe._speedups' extension
  creating build/temp.os2knix-3.9
  creating build/temp.os2knix-3.9/src
  creating build/temp.os2knix-3.9/src/markupsafe
  gcc.exe -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -O2 -g -march=pentium4 -mno-avx -mstackrealign -fno-common -ffile-prefix-map=E:/rpmbuild/BUILD=. -O2 -g -march=pentium4 -mno-avx -mstackrealign -fno-common -ffile-prefix-map=E:/rpmbuild/BUILD=. -g -O2 -IJ:/USR/include/python3.9 -c src/markupsafe/_speedups.c -o build/temp.os2knix-3.9/src/markupsafe/_speedups.o  writing build/temp.os2knix-3.9/src/markupsafe/_speedups.def
  gcc -Zdll -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp -lcx -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp -lcx -g -O2 -s build/temp.os2knix-3.9/src/markupsafe/_speedups.o build/temp.os2knix-3.9/src/markupsafe/_speedups.def -L/@unixroot/usr/lib -lpython3.9 -o build/lib.os2knix-3.9/markupsafe/_sp4361.pyd
  Warning! W1121: file C:/var/temp\ldconv__speedups_o_2ab6337543c177df8.obj(src\markupsafe\_speedups.c): '_PyInit__speedups' has already been exported
  installing to build/bdist.os2knix/wheel
  running install
  running install_lib
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:/var/temp/pip-install-3wo4q4m7/markupsafe_024ed9301ed84d8aa462f11cfb48c1f9/", line 65, in <module>
    File "C:/var/temp/pip-install-3wo4q4m7/markupsafe_024ed9301ed84d8aa462f11cfb48c1f9/", line 41, in run_setup
    File "J:/USR/lib/python3.9/site-packages/setuptools/", line 153, in setup
      return distutils.core.setup(**attrs)
    File "J:/USR/lib/python3.9/distutils/", line 148, in setup
    File "J:/USR/lib/python3.9/distutils/", line 966, in run_commands
    File "J:/USR/lib/python3.9/distutils/", line 985, in run_command
    File "J:/USR/lib/python3.9/site-packages/wheel/", line 335, in run
    File "J:/USR/lib/python3.9/distutils/", line 313, in run_command
    File "J:/USR/lib/python3.9/distutils/", line 985, in run_command
    File "J:/USR/lib/python3.9/site-packages/setuptools/command/", line 61, in run
    File "J:/USR/lib/python3.9/distutils/command/", line 572, in run
    File "J:/USR/lib/python3.9/distutils/", line 313, in run_command
    File "J:/USR/lib/python3.9/distutils/", line 985, in run_command
    File "J:/USR/lib/python3.9/site-packages/setuptools/command/", line 12, in run
      outfiles = self.install()
    File "J:/USR/lib/python3.9/distutils/command/", line 111, in install
      outfiles = self.copy_tree(self.build_dir, self.install_dir, preserve_symlinks=1)
    File "J:/USR/lib/python3.9/site-packages/setuptools/command/", line 91, in copy_tree
      assert preserve_mode and preserve_times and not preserve_symlinks
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for MarkupSafe
  Running clean for MarkupSafe

Lewis G Rosenthal, CNA, CLP, CLE, CWTS, EA
Rosenthal & Rosenthal, LLC      
visit my IT blog      

Prenumerera: Sändning, Uppsamling, Index.
Stoppa prenumeration
Meddelande till ListMaster