{"id":12,"date":"2025-08-07T02:51:36","date_gmt":"2025-08-07T02:51:36","guid":{"rendered":"https:\/\/wordpress.debian.social\/spaciouscoder78\/?p=12"},"modified":"2025-08-07T02:51:37","modified_gmt":"2025-08-07T02:51:37","slug":"how-to-install-python-library-examples-in-a-debian-package","status":"publish","type":"post","link":"https:\/\/wordpress.debian.social\/spaciouscoder78\/2025\/08\/07\/how-to-install-python-library-examples-in-a-debian-package\/","title":{"rendered":"How to install Python Library examples in a Debian Package"},"content":{"rendered":"\n<p>If you&#8217;re packaging Python Libraries into Debian, you&#8217;ll someday or the other encounter a lot of libraries using different files and folders such as tests and examples. <\/p>\n\n\n\n<p>While tests are automatically handled by dh_python helper tools, examples are usually not and you&#8217;ll have to manually configure your setup to install python library examples, let me show you how.<\/p>\n\n\n\n<p>For this, we need to create a new file inside the Debian folder called package.examples. Here, &#8220;package&#8221; refers to your package that will install the examples. Since we&#8217;re installing the examples of a python library, your file should be titled &#8220;python3-packagename.examples&#8221;.<\/p>\n\n\n\n<p>Now all you have to do is just insert the directory of the examples folder into this file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>examples\/*<\/code><\/pre>\n\n\n\n<p>That&#8217;s it. Now when you run sbuild or pbuilder again, it will automatically install the examples for you. <\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re packaging Python Libraries into Debian, you&#8217;ll someday or the other encounter a lot of libraries using different files and folders such as tests and examples. While tests are automatically handled by dh_python helper tools, examples are usually not and you&#8217;ll have to manually configure your setup to install python library examples, let me &hellip; <a href=\"https:\/\/wordpress.debian.social\/spaciouscoder78\/2025\/08\/07\/how-to-install-python-library-examples-in-a-debian-package\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">How to install Python Library examples in a Debian Package<\/span><\/a><\/p>\n","protected":false},"author":41,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"federated","footnotes":""},"categories":[4],"tags":[3,2],"class_list":["post-12","post","type-post","status-publish","format-standard","hentry","category-packaging-guides","tag-debian","tag-python"],"_links":{"self":[{"href":"https:\/\/wordpress.debian.social\/spaciouscoder78\/wp-json\/wp\/v2\/posts\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.debian.social\/spaciouscoder78\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.debian.social\/spaciouscoder78\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.debian.social\/spaciouscoder78\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.debian.social\/spaciouscoder78\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.debian.social\/spaciouscoder78\/wp-json\/wp\/v2\/posts\/12\/revisions"}],"predecessor-version":[{"id":16,"href":"https:\/\/wordpress.debian.social\/spaciouscoder78\/wp-json\/wp\/v2\/posts\/12\/revisions\/16"}],"wp:attachment":[{"href":"https:\/\/wordpress.debian.social\/spaciouscoder78\/wp-json\/wp\/v2\/media?parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.debian.social\/spaciouscoder78\/wp-json\/wp\/v2\/categories?post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.debian.social\/spaciouscoder78\/wp-json\/wp\/v2\/tags?post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}