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
2 years ago
apt Rename Cdrom and Disc to Installation medium 3 years ago
aptsources Remove `if True` and dedent 3 years ago
data/templates Update 2 years ago
debian Add dep on libwww-perl for utils/get_devuan_mirrors.pl 2 years ago
doc Fix URL to python-apt Repository in Documentation. 2 years ago
po Release 2.3.0 2 years ago
python SourceRecordFiles: Set exception in __getitem__ 2 years ago
tests test_tagfile: Avoid leaking file descriptor 2 years ago
typehinting Improve type annotations for apt_pkg.TagFile and apt_pkg.TagSection 4 years ago
utils Generate Devuan mirror list in a single place 2 years ago
.gitlab-ci.yml Replace only statement by rules clause to properly parse CI variables. 2 years ago
.travis.yml Drop remaining references to pep8 4 years ago
AUTHORS AUTHORS: Add me. 15 years ago
COPYING.GPL Added GPL 19 years ago
Dockerfile Switch travis to use Docker based tests 6 years ago
README.md add into how to use mypy 6 years ago
TODO * apt/cache.py, apt/package.py: Fix some bugs. 15 years ago
pre-build.sh Call utils/get_devuan_mirrors.pl 2 years ago
setup.cfg * debian/control: 17 years ago
setup.py Remove -Wstrict-prototypes compiler flag 4 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).