#language en ~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: none-~ ---- = This is a DRAFT!!! = This is a tutorial how to create a Debian package for [[http://www.astropy.org/affiliated/|Astropy Affiliated Packages]]. The tutorial consists of three parts: 1. [[DebianAstro/AstropyPackagingTutorial/Preparation|Preparation]] 2. [[DebianAstro/AstropyPackagingTutorial/Packaging|Packaging]] 3. Advanced packaging and upload ---- = 2. Packaging = [[DebianAstro/AstropyPackagingTutorial/Packaging|Previous page]] = 3. Upload and advanced packaging = == Upload == Only [[DebianDeveloper|Debian Developers]] (DD) and [[DebianMaintainer|Debian Maintainers]] (DM) can upload packages into the Debian repository. Debian Developers can also upload packages for others if they think that the package meets the Debian guidelines. This process is called "[[SponsoredMaintainer|sponsoring]]". The [[http://mentors.debian.net/sponsors|usual way]] to find a sponsor for you package is to file a bug against the "sponsorship-requests" pseudopackage. However, for packages that are maintained by the debian-astro team, there is a simpler approach: Just announce that you have the package ready in the [[mailto:debian-astro@lists.debian.org|debian-astro mailing list]]. We will quickly pick up your package from the git repository, review it and (if needed) discuss further changes. If the package is ready, we will upload it for you. == Documentation package == == Automated testing == Automated tests can ensure that the package builds and works correctly. There are two different types of tests in Debian: * Build time tests, and * Debian CI tests Build time tests are processed during the package build process. Usually, pybuild tries to find and run them automatically. You need, however, to specify the packages that are required for the test (f.e. python3-pytest) as additional build dependency. If the tests are not found automatically, you can specify them manually in `debian/rules`: {{{ PYTHON3:=$(shell py3versions -vr) override_dh_auto_test: for PYTHON in $(PYTHON3); do \ PYTHONPATH=$$(pwd) python$$PYTHON test/TestRecipe.py \ || exit $$? ; \ done }}} Debian CI tests are processed whenever a dependency of the package changes. They are a good tool to make sure that the package will work when new versions of other packages are installed. These tests are specified in the directory `debian/tests/`. Basically, there is one script for each test, and a file `debian/tests/control` with the information about dependencies. For wcsaxes, the file `debian/tests/control` is the following: {{{ Test-Command: cd $AUTOPKGTEST_TMP && python3 -c 'import pytest, os, drms; exit(pytest.main(os.path.dirname(drms.__file__)))' Depends: python3-drms, python3-pytest Restrictions: allow-stderr }}} The [DebianCi] page shows how this file is processed. == upstream/metadata == For some packages, the author may ask to cite a certain reference when referring to the package. These references are collected in a file `upstream/metadata`. The file format is described in [[UpstreamMetadata]]. This file also contains other information, like * a git repository for upstream development, * where to submit bug reports upstream etc. As an example, the `upstream/metadata` from the python-cpl package is shown here: {{{ ASCL-Id: 1612.001 Reference: Author: Streicher, O., and Weilbacher, P. M. Title: Python Bindings for the Common Pipeline Library Journal: Astronomical Data Analysis Software and Systems XXI Year: 2012 Volume: 461 Pages: 853 URL: http://adsabs.harvard.edu/abs/2012ASPC..461..853S Repository: https://github.com/olebole/python-cpl }}} == Further responsibilities == * bug reports * reproducible builds ---- == See also == There is quite a lot documentation available that you can check for further information. The most important pages are * [[http://www.debian.org/doc/manuals/maint-guide/index.en.html|Debian New Maintainers' Guide]] -- tutorial for simple package * [[http://www.debian.org/doc/devel-manuals#packaging-tutorial|Debian Packaging Tutorial]] -- slides-based overview of Debian packaging * [[http://www.debian.org/doc/manuals/developers-reference/|Developers Reference]] -- advanced guide etc. The policies describe the basic rules to follow when packaging: * [[http://www.debian.org/doc/debian-policy/|Common Debian Policy]] * [[https://www.debian.org/doc/packaging-manuals/python-policy/|Debian Python Policy]] * [[http://debian-science.alioth.debian.org/debian-science-policy.html|Debian Science Policy]] ---- CategoryPackaging ---- ## If this page belongs to an existing Category, add it below. ## CategorySomething | CategoryAnother