Implement not-so rudimentary support of version string
See original GitHub issueHi
I am using pwlf within https://github.com/pyinstaller/pyinstaller (it compiles python to exe on windows).
However, pwlf is causing some troubles, because version handling is too simple - the file “https://github.com/cjekel/piecewise_linear_fit_py/blob/master/pwlf/VERSION” is not included automatically in the build, and I have to create it every time. Otherwise, it is failing: https://github.com/cjekel/piecewise_linear_fit_py/blob/8f974440c25cf6b57c1af50dfd4f3d5f7ab3ac73/pwlf/__init__.py#L11-L12
For now I’m going to generate empty VERSION file by script, however it is not a solution.
I suggest to use the approach numpy guys use: They generate version.py file by setup.py: https://github.com/numpy/numpy/blob/96abdedcb21df7e1a07a7e73a5f2103895a36faf/setup.py#L127
and then import it as __version__
:
https://github.com/numpy/numpy/blob/b7c27bd2a3817f59c84b004b87bba5db57d9a9b0/numpy/__init__.py#L132
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (6 by maintainers)
Okay, thanks! I’ll push a new release soon.
I’ll let you close this, but whenever you get a chance let me know if the latest version fixes your pyinstaller issue.