Quantcast
Viewing latest article 1
Browse Latest Browse All 2

Answer by tumbleweed for How to keep version number in a single place in a python project with setup.py and debian/control

A tool/command is used to generate a version.py module with the version number. However, this doesn't work well with launchpad recipes because the ability to run arbitrary commands in a recipe is disabled in launchpad.

You can, of course, do that at build time, rather that at source-package-creation time.

version.py:

# Overwritten during Debian packaging buildpackage_version="unknown"

debian/rules:

override_dh_auto_build:        dpkg-parsechangelog | sed -rne 's,^Version: (.*),package_version="\1", p'> version.py        dh_auto_build

debian/clean:

version.py

Viewing latest article 1
Browse Latest Browse All 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>