Commit 80565e3
committed
properly write version file even if in pretend mode
before this, SETUPTOOLS_SCM_PRETEND_VERSION make setuptools_scm fail
to write the `write_to` file correctly. this was apparently to avoid
issues with archives, which we believe is not a problem anymore.
this *is*, however, a problem for other tools like Debian packaging:
there, we use the pretend mechanism to import the version number from
the Debian packaging system (from `debian/changelog`, usually). this
works at setup time: setuptools_scm has the proper environment and
detects the version. but if the software was written to depend on the
`write_to` file, it will fail to find that version at runtime because
`setup.py` will not have written the `write_to` file properly at build
time.
this patch simply makes sure that the version is written even if the
provided version number is a string, which is usually the case for
pretend version numbers. a fixed test case is also provided.
Closes: #1011 parent cf19a20 commit 80565e3
2 files changed
+12
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
107 | 112 | | |
108 | 113 | | |
109 | 114 | | |
110 | 115 | | |
111 | 116 | | |
112 | 117 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | 118 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
0 commit comments