File: development.rst

package info (click to toggle)
python-pygit2 1.4.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,328 kB
  • sloc: ansic: 11,016; python: 5,943; sh: 275; makefile: 19
file content (60 lines) | stat: -rw-r--r-- 1,332 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
**********************************************************************
The development version
**********************************************************************

.. code-block:: sh

    $ git clone git://github.com/libgit2/pygit2.git
    $ cd pygit2
    $ python setup.py build_ext --inplace
    $ pytest test

Coding style: documentation strings
===================================

Example::

  def f(a, b):
      """
      The general description goes here.

      Returns: bla bla.

      Parameters:

      a : <type>
          Bla bla.

      b : <type>
          Bla bla.

      Examples::

          >>> f(...)
      """

Running Valgrind
===================================

Step 1. Build libc and libgit2 with debug symbols. See your distribution
documentation.

Step 2. Build Python to be used with valgrind, e.g.::

  $ ./configure --prefix=~/Python-3.7.4 --without-pymalloc --with-pydebug --with-valgrind
  $ make
  $ make install
  $ export PYTHONBIN=~/Python-3.7.4/bin

Step 3. Build pygit2 with debug symbols::

  $ rm build -rf && $PYTHONBIN/python3 setup.py build_ext --inplace -g

Step 4. Install requirements::

  $ $PYTHONBIN/python3 setup.py install
  $ pip insall pytest

Step 4. Run valgrind:

  $ valgrind -v --leak-check=full --suppressions=misc/valgrind-python.supp $PYTHONBIN/pytest &> valgrind.txt