| 99 | == Version of your plugin |
| 100 | |
| 101 | You should use the {{{major.minor.micro}}} semantic versioning scheme also used by [trac:TracDev/ReleaseChecklist#Versionidentification Trac (version identification)]. Some additional guidance can be found in PEP:0440. |
| 102 | |
| 103 | In the event that a defect or packaging distribution error is discovered after a release is made, the ''micro'' version number should be incremented and a new minor release created. Note that a filename cannot be reused when uploading to PyPI more than once, so the ''micro'' version must also be incremented in the event of a packaging or uploading error. |
| 104 | |
| 105 | Development releases are created directly from the current source. These are not uploaded to PyPI and usually done by the user to get the latest snapshot. To distinguish them from final releases a {{{dev}}} suffix should be added. This can be done for you by creating a {{{setup.cfg}}} file in the same directory where {{{setup.py}}} is located with the following contents. |
| 106 | {{{#!ini |
| 107 | [egg_info] |
| 108 | tag_build = dev |
| 109 | }}} |
| 110 | |
| 111 | === Development cycle |
| 112 | The proposed development and release cycle is described here. The current final version is {{{1.0.1}}}. The next planned release version is {{{1.2.0}}}. |
| 113 | |
| 114 | 1. In {{{setup.py}}} specify the next version: |
| 115 | {{{#!python |
| 116 | setup( |
| 117 | name='YourPluginsName', |
| 118 | version='1.2.0', |
| 119 | [...] |
| 120 | ) |
| 121 | }}} |
| 122 | 1. in {{{setup.cfg}}} add the development tag as described before: |
| 123 | {{{#!ini |
| 124 | [egg_info] |
| 125 | tag_build = dev |
| 126 | }}} |
| 127 | |
| 128 | You may proceed with development now. Whenever a user is creating his own development release it will be marked like {{{YourPluginName-1.2.0.dev0-py3.8.egg}}}. |
| 129 | |
| 130 | When creating a release do the following: |
| 131 | 1. Temporarily remove the entry from {{{setup.cfg}}}: |
| 132 | {{{#!ini |
| 133 | #[egg_info] |
| 134 | #tag_build = dev |
| 135 | }}} |
| 136 | 1. Create a release version which will be named like {{{YourPluginName-1.2.0-py3.8.egg}}}. If you want to publish to PyPI see the Instructions below. |
| 137 | 1. After publishing the release version prepare the next development cycle by increasing the version number in {{{setup.py}}} and putting back the development tag in {{{setup.cfg}}}: |
| 138 | {{{#!python |
| 139 | setup( |
| 140 | name='YourPluginsName', |
| 141 | # Note that the version number was changed from 1.2.0 to 1.3.0 |
| 142 | # which will be the next release. |
| 143 | version='1.3.0', |
| 144 | [...] |
| 145 | ) |
| 146 | }}} |
| 147 | {{{#!ini |
| 148 | [egg_info] |
| 149 | tag_build = dev |
| 150 | }}} |
| 151 | |