Automatic version number both in setup.py (setuptools) AND source code?

前端 未结 7 1307
没有蜡笔的小新
没有蜡笔的小新 2020-12-24 11:21

SITUATION:

I have a python library, which is controlled by git, and bundled with distutils/setuptools. And I want to automatically generate version

相关标签:
7条回答
  • 2020-12-24 11:52

    A classic issue when toying with keyword expansion ;)

    The key is to realize that your tag is part of the release management process, not part of the development (and its version control) process.

    In other word, you cannot include a release management data in a development repository, because of the loop you illustrates in your question.

    You need, when generating the package (which is the "release management part"), to write that information in a file that your library will look for and use (if said file exists) for its User-Agent HTTP header.

    0 讨论(0)
提交回复
热议问题