You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Boian Bonev 7218d3b258
Add dep on libwww-perl for utils/get_devuan_mirrors.pl
7 months ago
apt Rename Cdrom and Disc to Installation medium 2 years ago
aptsources Remove `if True` and dedent 2 years ago
data/templates Update 7 months ago
debian Add dep on libwww-perl for utils/get_devuan_mirrors.pl 7 months ago
doc Fix URL to python-apt Repository in Documentation. 10 months ago
po Release 2.3.0 10 months ago
python SourceRecordFiles: Set exception in __getitem__ 10 months ago
tests test_tagfile: Avoid leaking file descriptor 10 months ago
typehinting Improve type annotations for apt_pkg.TagFile and apt_pkg.TagSection 2 years ago
utils Generate Devuan mirror list in a single place 7 months ago
.gitlab-ci.yml Replace only statement by rules clause to properly parse CI variables. 10 months ago
.travis.yml Drop remaining references to pep8 3 years ago
AUTHORS AUTHORS: Add me. 13 years ago
COPYING.GPL Added GPL 18 years ago
Dockerfile Switch travis to use Docker based tests 4 years ago
README.md add into how to use mypy 5 years ago
TODO * apt/cache.py, apt/package.py: Fix some bugs. 14 years ago
pre-build.sh Call utils/get_devuan_mirrors.pl 7 months ago
setup.cfg * debian/control: 15 years ago
setup.py Remove -Wstrict-prototypes compiler flag 3 years ago

README.md

Python-apt is a wrapper to use features of apt from python.

It contains the following modules:

C++ Wrapper:

  • apt_pkg - access to libapt-pkg (wrapper to the lowlevel c++ code)
  • apt_inst - access to libapt-inst (wrapper to the lowlevel c++ code)

Python module:

  • apt - high level python interface build on top of apt_pkg, apt_inst
  • aptsources - high level manipulation of sources.list

Development

Building

To build python-apt run:

$ python setup.py build

You may need to install the build-dependencies via:

$ sudo apt build-dep ./

first.

Running the tests

Run the tests with:

$ python tests/test_all.py
$ python3 tests/test_all.py

Running mypy:

To check if the "apt" python module is mypy clean, run:

$ MYPYPATH=./typehinting/ mypy ./apt

To use the annotation with your source code, run:

$ MYPYPATH=/usr/lib/python3/dist-packages/apt mypy ./my-program

(adjust from python3 to python2.7 if you run there).