Closed mithro closed 3 years ago
I'm not super happy about the way this works, but it does seem to work and I believe this is the final thing blocking uploading wheels / source / etc to PyPi.
It is also pretty clear that the antlr stuff should probably be moved into its own package which is an optional / recommended dependency of the base fasm package.
I'm wondering if we should use https://pypi.org/project/setuptools-scm/ -- I tried to use it a few years ago and was unhappy with it then but it seems to have improved a lot....
PyPIthe blessed package to manage your versions by scm tags
If some reusable/external resource is to be created/used, I think it'd make sense to join forces with @Paebbels in https://github.com/Paebbels/pyVersioning.
GitHubGather version information and export as any programming language source file for inclusion into compilation. - Paebbels/pyVersioning
The idea of pyVersioning is to have one script that collects version information from static config file, version control system or CI platform. Then a string or template file with Python's string formatting is used to replace fields. Because of this, any source file format can be generated. Examples .c, .h, *.vhdl, ...
The project is in a beta state and currently used in some customer projects at @PLC2.
From diffs, I saw, there is a need for author
and comment
information. The dataclass Commit
can be extended for these fields. Currently, only Hash
, Date
and Time
are implemented.
I think I'm going to land this CL for now and then convert to setuptools_scm
potentially in the future.
This pull request generate the version number of the package based on the git history.
Fixes #34.
Signed-off-by: Tim 'mithro' Ansell me@mith.ro