GithubHelp home page GithubHelp logo

paulross / pymemtrace Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 2.0 731 KB

Python memory tracing.

License: MIT License

Makefile 1.05% Python 64.53% CMake 0.65% C 20.89% DTrace 10.77% Shell 2.11%
python python-memory memory-management

pymemtrace's Introduction

Introduction

pymemtrace provides tools for tracking and understanding Python memory usage at different levels, at different granularities and with different runtime costs.

Full documentation: https://pymemtrace.readthedocs.io

pymemtrace Tools

The tools provided by pymemtrace:

  • process is a very lightweight way of logging the total memory usage at regular time intervals. It can plot memory over time with plotting programs such as gnuplot. See some process examples
  • cPyMemTrace is a memory tracer written in C that can report total memory usage for every function call/return for both C and Python sections. See some cPyMemTrace examples and a technical note on cPyMemTrace.
  • DTrace: Here are a number of D scripts that can trace the low level malloc() and free() system calls and report how much memory was allocated and by whom. See some DTrace examples and a technical note on DTrace.
  • trace_malloc is a convenience wrapper around the Python standard library tracemalloc module. This can report Python memory usage by module and line compensating for the cost of tracemalloc. This can take memory snapshots before and after code blocks and show the change on memory caused by that code. See some trace_malloc examples
  • debug_malloc_stats is a wrapper around the sys._debugmallocstats function that can take snapshots of memory before and after code execution and report the significant differences of the Python small object allocator. See some debug_malloc_stats examples

Tool Characteristics

Each tool can be characterised by:

  • Memory Granularity: In how much detail is a memory change is observed. An example of coarse memory granularity is measuring the Resident Set Size which is normally in chunks of 4096 bytes. An example of fine memory granularity is recording every malloc() and free().
  • Execution Granularity: In how much code detail is the memory change observed. An example of coarse execution granularity is measuring the memory usage every second. An example of fine execution granularity is recording the memory usage every Python line.
  • Memory Cost: How much extra memory the tool needs.
  • Execution Cost: How much the execution time is increased.

Clearly there are trade-offs between these depending on the problem you are trying to solve.

Tool Characteristics
Tool Memory Granularity Execution Granularity Memory Cost Execution Cost
process RSS (total Python and C memory). Regular time intervals. Near zero. Near zero.
cPyMemTrace RSS (total Python and C memory). Per Python line, Python function and C function call. Near zero. x10 to x20.
DTrace Every malloc() and free(). Per function call and return. Minimal. x90 to x100.
trace_malloc Every Python object. Per Python line, per function call. Significant but compensated. x900 for small objects, x6 for large objects.
debug_malloc_stats Python memory pool. Snapshots the CPython memory pool either side of a block of code. Minimal. x2000+ for small objects, x12 for large objects.

Package Metadata

Documentation Status Updates

Licence

Python memory tracing.

Credits

Phil Smith (AHL) with whom a casual lunch time chat lead to the creation of an earlier, but quite different implementation, of cPyMemTrace in pure Python.

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

pymemtrace's People

Contributors

jbarlow83 avatar paulross avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pymemtrace's Issues

get_rss.h is not found when building wheel via pip

  • pymemtrace version: 0.1.1
  • Python version: 3.10.2 (custom build with debug symbols via pyenv)
  • pip version: 22.0.3
  • Operating System: Ubuntu 20.04 LTS/macOS 11.6.4

Description

Attempting to install via pip fails with an error messages that get_rss.h is not found.

What I Did

pip install pymemtrace

Collecting pymemtrace
  Downloading pymemtrace-0.1.1.tar.gz (368 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 368.9/368.9 KB 8.7 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting psutil
  Downloading psutil-5.9.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (281 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 281.4/281.4 KB 13.3 MB/s eta 0:00:00
Building wheels for collected packages: pymemtrace
  Building wheel for pymemtrace (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [71 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.10-pydebug
      creating build/lib.linux-x86_64-3.10-pydebug/pymemtrace
      copying pymemtrace/redirect_stdout.py -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace
      copying pymemtrace/parse_dtrace_output.py -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace
      copying pymemtrace/trace_malloc.py -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace
      copying pymemtrace/process.py -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace
      copying pymemtrace/__init__.py -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace
      copying pymemtrace/debug_malloc_stats.py -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace
      creating build/lib.linux-x86_64-3.10-pydebug/tests
      copying tests/_test_redirect_stdout.py -> build/lib.linux-x86_64-3.10-pydebug/tests
      copying tests/test_cMemLeak.py -> build/lib.linux-x86_64-3.10-pydebug/tests
      copying tests/test_trace_malloc.py -> build/lib.linux-x86_64-3.10-pydebug/tests
      copying tests/test_debug_malloc_stats.py -> build/lib.linux-x86_64-3.10-pydebug/tests
      copying tests/test_settrace.py -> build/lib.linux-x86_64-3.10-pydebug/tests
      copying tests/__init__.py -> build/lib.linux-x86_64-3.10-pydebug/tests
      copying tests/test_process.py -> build/lib.linux-x86_64-3.10-pydebug/tests
      creating build/lib.linux-x86_64-3.10-pydebug/pymemtrace/examples
      copying pymemtrace/examples/ex_memory_exercise.py -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace/examples
      copying pymemtrace/examples/ex_dtrace.py -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace/examples
      copying pymemtrace/examples/ex_debug_malloc_stats.py -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace/examples
      copying pymemtrace/examples/ex_cPyMemTrace.py -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace/examples
      copying pymemtrace/examples/ex_trace_malloc.py -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace/examples
      copying pymemtrace/examples/__init__.py -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace/examples
      copying pymemtrace/examples/example.py -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace/examples
      copying pymemtrace/examples/ex_process.py -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace/examples
      running egg_info
      writing pymemtrace.egg-info/PKG-INFO
      writing dependency_links to pymemtrace.egg-info/dependency_links.txt
      writing requirements to pymemtrace.egg-info/requires.txt
      writing top-level names to pymemtrace.egg-info/top_level.txt
      reading manifest file 'pymemtrace.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '__pycache__' found under directory '*'
      warning: no previously-included files matching '*.py[co]' found under directory '*'
      warning: no files found matching '*.jpg' under directory 'docs'
      warning: no files found matching '*.gif' under directory 'docs'
      adding license file 'LICENSE'
      adding license file 'AUTHORS.rst'
      writing manifest file 'pymemtrace.egg-info/SOURCES.txt'
      creating build/lib.linux-x86_64-3.10-pydebug/pymemtrace/src
      creating build/lib.linux-x86_64-3.10-pydebug/pymemtrace/src/c
      copying pymemtrace/src/c/get_rss.c -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace/src/c
      copying pymemtrace/src/c/pymemtrace_util.c -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace/src/c
      creating build/lib.linux-x86_64-3.10-pydebug/pymemtrace/src/cpy
      copying pymemtrace/src/cpy/cCustom.c -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace/src/cpy
      copying pymemtrace/src/cpy/cMemLeak.c -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace/src/cpy
      copying pymemtrace/src/cpy/cPyMemTrace.c -> build/lib.linux-x86_64-3.10-pydebug/pymemtrace/src/cpy
      warning: build_py: byte-compiling is disabled, skipping.
      
      running build_ext
      building 'pymemtrace.custom' extension
      creating build/temp.linux-x86_64-3.10-pydebug
      creating build/temp.linux-x86_64-3.10-pydebug/pymemtrace
      creating build/temp.linux-x86_64-3.10-pydebug/pymemtrace/src
      creating build/temp.linux-x86_64-3.10-pydebug/pymemtrace/src/cpy
      gcc -pthread -Wno-unused-result -Wsign-compare -g -Og -Wall -O0 -fPIC -I/usr/local/include -I/home/kent/.local/share/virtualenvs/easysnmp-pjIEyjUo/include -I/home/kent/.pyenv/versions/3.10.2-debug/include/python3.10d -c pymemtrace/src/cpy/cCustom.c -o build/temp.linux-x86_64-3.10-pydebug/pymemtrace/src/cpy/cCustom.o -Wall -Wextra -Werror -Wfatal-errors -Wpedantic -std=c99 -O3 -UDEBUG -DNDEBUG
      gcc -pthread -shared -L/home/kent/.pyenv/versions/3.10.2-debug/lib -L/home/kent/.pyenv/versions/3.10.2-debug/lib build/temp.linux-x86_64-3.10-pydebug/pymemtrace/src/cpy/cCustom.o -L/tmp/pip-install-bxvk3sjm/pymemtrace_0e42696c61954c1985585d5d93a56d7a -o build/lib.linux-x86_64-3.10-pydebug/pymemtrace/custom.cpython-310d-x86_64-linux-gnu.so
      building 'pymemtrace.cPyMemTrace' extension
      creating build/temp.linux-x86_64-3.10-pydebug/pymemtrace/src/c
      gcc -pthread -Wno-unused-result -Wsign-compare -g -Og -Wall -O0 -fPIC -I/usr/local/include -Ipymemtrace/src/include -I/home/kent/.local/share/virtualenvs/easysnmp-pjIEyjUo/include -I/home/kent/.pyenv/versions/3.10.2-debug/include/python3.10d -c pymemtrace/src/c/get_rss.c -o build/temp.linux-x86_64-3.10-pydebug/pymemtrace/src/c/get_rss.o -Wall -Wextra -Werror -Wfatal-errors -Wpedantic -std=c99 -O3 -UDEBUG -DNDEBUG
      pymemtrace/src/c/get_rss.c:14:10: fatal error: get_rss.h: No such file or directory
         14 | #include "get_rss.h"
            |          ^~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1

error: implicit declaration of function ‘gmtime_r’ when installing with pip

  • pymemtrace version: 0.1.4
  • Python version: Python 3.9 / 3.10 / 3.11
  • Operating System: Ubuntu

Description

I am trying to install pymemtrace with pip as part of a GitHub Actions pipeline.
However I'm facing with a gcc error when the wheel is being built by pip.

What I Did

$ python -m pip install --upgrade pymemtrace
Collecting pymemtrace
  Downloading pymemtrace-0.1.4.tar.gz (375 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 375.7/375.7 kB 18.6 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
...
Building wheels for collected packages: pymemtrac
  Building wheel for pymemtrace (setup.py): started
  Building wheel for pymemtrace (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [153 lines of output]
      /opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/site-packages/setuptools/__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`.
        dist.fetch_build_eggs(dist.setup_requires)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/pymemtrace
  Running setup.py clean for pymemtrace
      copying pymemtrace/redirect_stdout.py -> build/lib.linux-x86_64-cpython-311/pymemtrace
      copying pymemtrace/trace_malloc.py -> build/lib.linux-x86_64-cpython-311/pymemtrace
      copying pymemtrace/debug_malloc_stats.py -> build/lib.linux-x86_64-cpython-311/pymemtrace
      copying pymemtrace/parse_dtrace_output.py -> build/lib.linux-x86_64-cpython-311/pymemtrace
      copying pymemtrace/__init__.py -> build/lib.linux-x86_64-cpython-311/pymemtrace
      copying pymemtrace/process.py -> build/lib.linux-x86_64-cpython-311/pymemtrace
      creating build/lib.linux-x86_64-cpython-311/tests
      copying tests/test_cMemLeak.py -> build/lib.linux-x86_64-cpython-311/tests
      copying tests/test_process.py -> build/lib.linux-x86_64-cpython-311/tests
      copying tests/test_debug_malloc_stats.py -> build/lib.linux-x86_64-cpython-311/tests
      copying tests/_test_redirect_stdout.py -> build/lib.linux-x86_64-cpython-311/tests
      copying tests/test_settrace.py -> build/lib.linux-x86_64-cpython-311/tests
      copying tests/test_trace_malloc.py -> build/lib.linux-x86_64-cpython-311/tests
      copying tests/__init__.py -> build/lib.linux-x86_64-cpython-311/tests
      creating build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      copying pymemtrace/examples/ex_cPyMemTrace.py -> build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      copying pymemtrace/examples/ex_memory_exercise.py -> build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      copying pymemtrace/examples/ex_process.py -> build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      copying pymemtrace/examples/ex_debug_malloc_stats.py -> build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      copying pymemtrace/examples/ex_dtrace.py -> build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      copying pymemtrace/examples/ex_trace_malloc.py -> build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      copying pymemtrace/examples/__init__.py -> build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      copying pymemtrace/examples/example.py -> build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      running egg_info
      writing pymemtrace.egg-info/PKG-INFO
      writing dependency_links to pymemtrace.egg-info/dependency_links.txt
      writing requirements to pymemtrace.egg-info/requires.txt
      writing top-level names to pymemtrace.egg-info/top_level.txt
      reading manifest file 'pymemtrace.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '__pycache__' found under directory '*'
      warning: no previously-included files matching '*.py[co]' found under directory '*'
      warning: no files found matching '*.jpg' under directory 'docs'
      adding license file 'LICENSE'
      adding license file 'AUTHORS.rst'
      writing manifest file 'pymemtrace.egg-info/SOURCES.txt'
      /opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'pymemtrace.src.c' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'pymemtrace.src.c' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'pymemtrace.src.c' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'pymemtrace.src.c' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      /opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'pymemtrace.src.cpy' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'pymemtrace.src.cpy' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'pymemtrace.src.cpy' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'pymemtrace.src.cpy' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      /opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'pymemtrace.src.include' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'pymemtrace.src.include' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'pymemtrace.src.include' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'pymemtrace.src.include' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      creating build/lib.linux-x86_64-cpython-311/pymemtrace/src
      creating build/lib.linux-x86_64-cpython-311/pymemtrace/src/c
      copying pymemtrace/src/c/get_rss.c -> build/lib.linux-x86_64-cpython-311/pymemtrace/src/c
      copying pymemtrace/src/c/pymemtrace_util.c -> build/lib.linux-x86_64-cpython-311/pymemtrace/src/c
      creating build/lib.linux-x86_64-cpython-311/pymemtrace/src/cpy
      copying pymemtrace/src/cpy/cCustom.c -> build/lib.linux-x86_64-cpython-311/pymemtrace/src/cpy
      copying pymemtrace/src/cpy/cMemLeak.c -> build/lib.linux-x86_64-cpython-311/pymemtrace/src/cpy
      copying pymemtrace/src/cpy/cPyMemTrace.c -> build/lib.linux-x86_64-cpython-311/pymemtrace/src/cpy
      creating build/lib.linux-x86_64-cpython-311/pymemtrace/src/include
      copying pymemtrace/src/include/get_rss.h -> build/lib.linux-x86_64-cpython-311/pymemtrace/src/include
      copying pymemtrace/src/include/pymemtrace_util.h -> build/lib.linux-x86_64-cpython-311/pymemtrace/src/include
      running build_ext
      building 'pymemtrace.custom' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/pymemtrace
      creating build/temp.linux-x86_64-cpython-311/pymemtrace/src
      creating build/temp.linux-x86_64-cpython-311/pymemtrace/src/cpy
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include -I/opt/hostedtoolcache/Python/3.11.2/x64/include/python3.11 -c pymemtrace/src/cpy/cCustom.c -o build/temp.linux-x86_64-cpython-311/pymemtrace/src/cpy/cCustom.o -Wall -Wextra -Werror -Wfatal-errors -Wpedantic -std=c99 -Wno-cast-function-type -O3 -UDEBUG -DNDEBUG
      gcc -shared -Wl,--rpath=/opt/hostedtoolcache/Python/3.11.2/x64/lib -Wl,--rpath=/opt/hostedtoolcache/Python/3.11.2/x64/lib build/temp.linux-x86_64-cpython-311/pymemtrace/src/cpy/cCustom.o -L/tmp/pip-install-u095os7p/pymemtrace_80284ee589ce4595b5c8d95e6bafbcbc -L/opt/hostedtoolcache/Python/3.11.2/x64/lib -o build/lib.linux-x86_64-cpython-311/pymemtrace/custom.cpython-311-x86_64-linux-gnu.so
      building 'pymemtrace.cPyMemTrace' extension
      creating build/temp.linux-x86_64-cpython-311/pymemtrace/src/c
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include -Ipymemtrace/src/include -I/opt/hostedtoolcache/Python/3.11.2/x64/include/python3.11 -c pymemtrace/src/c/get_rss.c -o build/temp.linux-x86_64-cpython-311/pymemtrace/src/c/get_rss.o -Wall -Wextra -Werror -Wfatal-errors -Wpedantic -std=c99 -Wno-cast-function-type -O3 -UDEBUG -DNDEBUG
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include -Ipymemtrace/src/include -I/opt/hostedtoolcache/Python/3.11.2/x64/include/python3.11 -c pymemtrace/src/c/pymemtrace_util.c -o build/temp.linux-x86_64-cpython-311/pymemtrace/src/c/pymemtrace_util.o -Wall -Wextra -Werror -Wfatal-errors -Wpedantic -std=c99 -Wno-cast-function-type -O3 -UDEBUG -DNDEBUG
      pymemtrace/src/c/pymemtrace_util.c: In function ‘create_filename’:
      pymemtrace/src/c/pymemtrace_util.c:18:5: error: implicit declaration of function ‘gmtime_r’; did you mean ‘gmtime’? [-Werror=implicit-function-declaration]
         18 |     gmtime_r(&t, &now);
            |     ^~~~~~~~
            |     gmtime
      compilation terminated due to -Wfatal-errors.
      cc1: all warnings being treated as errors
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pymemtrace
Failed to build pymemtrace
Installing collected packages: pymemtrace 
  Running setup.py install for pymemtrace: started
  Running setup.py install for pymemtrace: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Running setup.py install for pymemtrace did not run successfully.
  │ exit code: 1
  ╰─> [155 lines of output]
      /opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/site-packages/setuptools/__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`.
        dist.fetch_build_eggs(dist.setup_requires)
      running install
      /opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/pymemtrace
      copying pymemtrace/redirect_stdout.py -> build/lib.linux-x86_64-cpython-311/pymemtrace
      copying pymemtrace/trace_malloc.py -> build/lib.linux-x86_64-cpython-311/pymemtrace
      copying pymemtrace/debug_malloc_stats.py -> build/lib.linux-x86_64-cpython-311/pymemtrace
      copying pymemtrace/parse_dtrace_output.py -> build/lib.linux-x86_64-cpython-311/pymemtrace
      copying pymemtrace/__init__.py -> build/lib.linux-x86_64-cpython-311/pymemtrace
      copying pymemtrace/process.py -> build/lib.linux-x86_64-cpython-311/pymemtrace
      creating build/lib.linux-x86_64-cpython-311/tests
      copying tests/test_cMemLeak.py -> build/lib.linux-x86_64-cpython-311/tests
      copying tests/test_process.py -> build/lib.linux-x86_64-cpython-311/tests
      copying tests/test_debug_malloc_stats.py -> build/lib.linux-x86_64-cpython-311/tests
      copying tests/_test_redirect_stdout.py -> build/lib.linux-x86_64-cpython-311/tests
      copying tests/test_settrace.py -> build/lib.linux-x86_64-cpython-311/tests
      copying tests/test_trace_malloc.py -> build/lib.linux-x86_64-cpython-311/tests
      copying tests/__init__.py -> build/lib.linux-x86_64-cpython-311/tests
      creating build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      copying pymemtrace/examples/ex_cPyMemTrace.py -> build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      copying pymemtrace/examples/ex_memory_exercise.py -> build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      copying pymemtrace/examples/ex_process.py -> build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      copying pymemtrace/examples/ex_debug_malloc_stats.py -> build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      copying pymemtrace/examples/ex_dtrace.py -> build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      copying pymemtrace/examples/ex_trace_malloc.py -> build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      copying pymemtrace/examples/__init__.py -> build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      copying pymemtrace/examples/example.py -> build/lib.linux-x86_64-cpython-311/pymemtrace/examples
      running egg_info
      writing pymemtrace.egg-info/PKG-INFO
      writing dependency_links to pymemtrace.egg-info/dependency_links.txt
      writing requirements to pymemtrace.egg-info/requires.txt
      writing top-level names to pymemtrace.egg-info/top_level.txt
      reading manifest file 'pymemtrace.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '__pycache__' found under directory '*'
      warning: no previously-included files matching '*.py[co]' found under directory '*'
      warning: no files found matching '*.jpg' under directory 'docs'
      adding license file 'LICENSE'
      adding license file 'AUTHORS.rst'
      writing manifest file 'pymemtrace.egg-info/SOURCES.txt'
      /opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'pymemtrace.src.c' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'pymemtrace.src.c' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'pymemtrace.src.c' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'pymemtrace.src.c' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      /opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'pymemtrace.src.cpy' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'pymemtrace.src.cpy' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'pymemtrace.src.cpy' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'pymemtrace.src.cpy' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      /opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'pymemtrace.src.include' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'pymemtrace.src.include' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'pymemtrace.src.include' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'pymemtrace.src.include' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      creating build/lib.linux-x86_64-cpython-311/pymemtrace/src
      creating build/lib.linux-x86_64-cpython-311/pymemtrace/src/c
      copying pymemtrace/src/c/get_rss.c -> build/lib.linux-x86_64-cpython-311/pymemtrace/src/c
      copying pymemtrace/src/c/pymemtrace_util.c -> build/lib.linux-x86_64-cpython-311/pymemtrace/src/c
      creating build/lib.linux-x86_64-cpython-311/pymemtrace/src/cpy
      copying pymemtrace/src/cpy/cCustom.c -> build/lib.linux-x86_64-cpython-311/pymemtrace/src/cpy
      copying pymemtrace/src/cpy/cMemLeak.c -> build/lib.linux-x86_64-cpython-311/pymemtrace/src/cpy
      copying pymemtrace/src/cpy/cPyMemTrace.c -> build/lib.linux-x86_64-cpython-311/pymemtrace/src/cpy
      creating build/lib.linux-x86_64-cpython-311/pymemtrace/src/include
      copying pymemtrace/src/include/get_rss.h -> build/lib.linux-x86_64-cpython-311/pymemtrace/src/include
      copying pymemtrace/src/include/pymemtrace_util.h -> build/lib.linux-x86_64-cpython-311/pymemtrace/src/include
      running build_ext
      building 'pymemtrace.custom' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/pymemtrace
      creating build/temp.linux-x86_64-cpython-311/pymemtrace/src
      creating build/temp.linux-x86_64-cpython-311/pymemtrace/src/cpy
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include -I/opt/hostedtoolcache/Python/3.11.2/x64/include/python3.11 -c pymemtrace/src/cpy/cCustom.c -o build/temp.linux-x86_64-cpython-311/pymemtrace/src/cpy/cCustom.o -Wall -Wextra -Werror -Wfatal-errors -Wpedantic -std=c99 -Wno-cast-function-type -O3 -UDEBUG -DNDEBUG
      gcc -shared -Wl,--rpath=/opt/hostedtoolcache/Python/3.11.2/x64/lib -Wl,--rpath=/opt/hostedtoolcache/Python/3.11.2/x64/lib build/temp.linux-x86_64-cpython-311/pymemtrace/src/cpy/cCustom.o -L/tmp/pip-install-u095os7p/pymemtrace_80284ee589ce4595b5c8d95e6bafbcbc -L/opt/hostedtoolcache/Python/3.11.2/x64/lib -o build/lib.linux-x86_64-cpython-311/pymemtrace/custom.cpython-311-x86_64-linux-gnu.so
      building 'pymemtrace.cPyMemTrace' extension
      creating build/temp.linux-x86_64-cpython-311/pymemtrace/src/c
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include -Ipymemtrace/src/include -I/opt/hostedtoolcache/Python/3.11.2/x64/include/python3.11 -c pymemtrace/src/c/get_rss.c -o build/temp.linux-x86_64-cpython-311/pymemtrace/src/c/get_rss.o -Wall -Wextra -Werror -Wfatal-errors -Wpedantic -std=c99 -Wno-cast-function-type -O3 -UDEBUG -DNDEBUG
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include -Ipymemtrace/src/include -I/opt/hostedtoolcache/Python/3.11.2/x64/include/python3.11 -c pymemtrace/src/c/pymemtrace_util.c -o build/temp.linux-x86_64-cpython-311/pymemtrace/src/c/pymemtrace_util.o -Wall -Wextra -Werror -Wfatal-errors -Wpedantic -std=c99 -Wno-cast-function-type -O3 -UDEBUG -DNDEBUG
      pymemtrace/src/c/pymemtrace_util.c: In function ‘create_filename’:
      pymemtrace/src/c/pymemtrace_util.c:18:5: error: implicit declaration of function ‘gmtime_r’; did you mean ‘gmtime’? [-Werror=implicit-function-declaration]
         18 |     gmtime_r(&t, &now);
            |     ^~~~~~~~
            |     gmtime
      compilation terminated due to -Wfatal-errors.
      cc1: all warnings being treated as errors
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

The full log is available there: https://github.com/PyFPDF/fpdf2/actions/runs/4408893331/jobs/7724489633

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.