Add MANIFEST.in mention to plugins development page #4305

Closed
opened 2025-12-29 18:34:32 +01:00 by adam · 1 comment
Owner

Originally created by @jakubkrysl on GitHub (Nov 25, 2020).

Change Type

[ ] Addition
[x] Correction
[ ] Deprecation
[ ] Cleanup (formatting, typos, etc.)

Area

[ ] Installation instructions
[ ] Configuration parameters
[ ] Functionality/features
[ ] REST API
[x] Administration/development
[ ] Other

Proposed Changes

When using any templates, the static files will not get collected by setup.py find_packages(). It needs to be told so. There are 2 steps to do it:

  1. add include_package_data=True to setup.py (already done)
  2. add MANIFEST.in with include $plugin_name/templates/$plugin_name/* (proposed change)

As of now there is no mention about the MANIFEST.in in the docs page https://netbox.readthedocs.io/en/stable/plugins/development/ so following the tutorial it will never work with any static files.

The proposal is to add MANIFEST.in to Plugin structure section with similar explanations as setup.py.

Originally created by @jakubkrysl on GitHub (Nov 25, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. Please indicate the nature of the change by placing an X in one of the boxes below. --> ### Change Type [ ] Addition [x] Correction [ ] Deprecation [ ] Cleanup (formatting, typos, etc.) ### Area [ ] Installation instructions [ ] Configuration parameters [ ] Functionality/features [ ] REST API [x] Administration/development [ ] Other <!-- Describe the proposed change(s). --> ### Proposed Changes When using any templates, the static files will not get collected by `setup.py` `find_packages()`. It needs to be told so. There are 2 steps to do it: 1. add `include_package_data=True` to `setup.py` (already done) 2. add `MANIFEST.in` with `include $plugin_name/templates/$plugin_name/*` (proposed change) As of now there is no mention about the `MANIFEST.in` in the docs page https://netbox.readthedocs.io/en/stable/plugins/development/ so following the tutorial it will never work with any static files. The proposal is to add `MANIFEST.in` to Plugin structure section with similar explanations as `setup.py`.
adam closed this issue 2025-12-29 18:34:32 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 25, 2020):

The plugins development documentation serves only to document the NetBox plugins API. The packaging and publishing a plugin is not significantly different than any other Python project, and the best practices for doing so are already well-documented in many other places.

@jeremystretch commented on GitHub (Nov 25, 2020): The plugins development documentation serves only to document the NetBox plugins API. The packaging and publishing a plugin is not significantly different than any other Python project, and the best practices for doing so are already well-documented in many other places.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4305